# HG changeset patch # User Michael Schloh von Bennewitz # Date 1346172140 -7200 # Node ID d0df67c218975484aefb09d9d165be4a55ed8680 # Parent e10b124b2f2160409a0bf352a02d73a5d9673aa6 Update version, adapt patch, correct build configuration, install pkg-config file, swap thread model, modernize packaging, use parallel make, and correct more typical german english linguistic mistakes. diff -r e10b124b2f21 -r d0df67c21897 openldap/openldap.patch --- a/openldap/openldap.patch Sat Feb 04 20:20:10 2012 +0200 +++ b/openldap/openldap.patch Tue Aug 28 18:42:20 2012 +0200 @@ -29,7 +29,7 @@ Index: libraries/libldap_r/tpool.c --- libraries/libldap_r/tpool.c.orig 2011-11-25 19:52:29.000000000 +0100 +++ libraries/libldap_r/tpool.c 2011-12-11 14:01:59.000000000 +0100 -@@ -1019,6 +1019,6 @@ +@@ -968,6 +968,6 @@ { ldap_int_thread_userctx_t *ctx = vctx; @@ -40,7 +40,7 @@ Index: libraries/libmdb/mdb.c --- libraries/libmdb/mdb.c.orig 2011-11-25 19:52:29.000000000 +0100 +++ libraries/libmdb/mdb.c 2011-12-11 14:01:59.000000000 +0100 -@@ -213,7 +213,11 @@ +@@ -198,7 +198,11 @@ * Otherwise compile with the less efficient -DMDB_DSYNC=O_SYNC. */ #ifndef MDB_DSYNC diff -r e10b124b2f21 -r d0df67c21897 openldap/openldap.pc --- a/openldap/openldap.pc Sat Feb 04 20:20:10 2012 +0200 +++ b/openldap/openldap.pc Tue Aug 28 18:42:20 2012 +0200 @@ -6,5 +6,5 @@ Name: openldap Description: OpenLDAP Libraries Version: @version@ -Libs: -L${libdir} @libs@ +Libs: @libdir@ @libs@ Cflags: -I${includedir} diff -r e10b124b2f21 -r d0df67c21897 openldap/openldap.spec --- a/openldap/openldap.spec Sat Feb 04 20:20:10 2012 +0200 +++ b/openldap/openldap.spec Tue Aug 28 18:42:20 2012 +0200 @@ -31,16 +31,16 @@ Class: BASE Group: LDAP License: GPL -Version: 2.4.29 -Release: 20120208 +Version: 2.4.32 +Release: 20120800 # package options %option with_server yes %option with_fsl yes %option with_crypt yes %option with_overlays yes -%option with_pthreads yes -%option with_pth no +%option with_pth yes +%option with_pthreads no %option with_sasl no %option with_perl no %option with_odbc no @@ -53,10 +53,8 @@ Patch0: openldap.patch # build information -Prefix: %{l_prefix} -BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc -PreReq: OpenPKG, openpkg >= 20060823 +BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc +PreReq: OpenPKG, openpkg >= 20100101 BuildPreReq: openssl, db >= 4.5 PreReq: openssl, db >= 4.5 %if "%{with_server}" == "yes" && "%{with_fsl}" == "yes" @@ -79,8 +77,6 @@ BuildPreReq: ODBC PreReq: ODBC %endif -AutoReq: no -AutoReqProv: no %description OpenLDAP is an open source implementation of the Lightweight @@ -138,7 +134,8 @@ ARGS="$ARGS --enable-dnssrv" ARGS="$ARGS --enable-null" ARGS="$ARGS --enable-shell" - ARGS="$ARGS --with-proxycache" + ARGS="$ARGS --enable-proxycache" + ARGS="$ARGS --disable-mdb" %else ARGS="$ARGS --disable-slapd" ARGS="$ARGS --disable-modules" @@ -205,7 +202,7 @@ *-sunos* ) CFLAGS="$CFLAGS -D_AVL_H"; LIBS="$LIBS -lrt" ;; esac - # configuration: use hard links and make sure our Berkeley-DB is picked up first + # configuration: use hard links and make sure our Berkeley DB is picked up first %{l_shtool} subst \ -e 's;ln -s;ln;g' \ -e 's;-ldb4[1-9];%{l_prefix}/lib/libdb.a;g' \ @@ -216,13 +213,10 @@ ./configure --cache-file=./config.cache $ARGS # build toolkit - %{l_make} %{l_mflags} depend - %{l_make} %{l_mflags} + %{l_make} %{l_mflags -O} depend + %{l_make} %{l_mflags -O} %install - # clean build cruft - rm -rf $RPM_BUILD_ROOT - # install toolkit %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT @@ -240,7 +234,7 @@ # post adjustment: enable and correct slapd.pid %if "%{with_server}" == "yes" %{l_shtool} subst \ - -e 's;^[ #]*\(pidfile\).*$;\1 %{l_prefix}/var/openldap/run/slapd.pid;' \ + -e 's;^\(pidfile\).*$;\1 %{l_prefix}/var/openldap/run/slapd.pid;' \ -e 's;^\(argsfile\).*$;\1 %{l_prefix}/var/openldap/run/slapd.args;' \ $RPM_BUILD_ROOT%{l_prefix}/etc/openldap/slapd.conf %endif @@ -252,7 +246,7 @@ $RPM_BUILD_ROOT%{l_prefix}/lib/*.la %endif - # install run-command script + # install run command script %if "%{with_server}" == "yes" %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d @@ -273,16 +267,22 @@ %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig libs="-lldap -llber" + libdir="-L\${libdir}" %if "%{with_sasl}" == "yes" libs="$libs -lsasl2" %endif +%if "%{with_pth}" == "yes" + libs="$libs -lpth" + libdir="$libdir -L\${libdir}/pth" +%endif %{l_shtool} install -c -m 644 %{l_value -s -a} \ -e "s;@version@;%{version};" \ -e "s;@libs@;$libs;" \ + -e "s;@libdir@;$libdir;" \ %{SOURCE openldap.pc} \ $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/ - # optionally remove server-components + # optionally remove server components %if "%{with_server}" != "yes" rm -rf $RPM_BUILD_ROOT%{l_prefix}/etc/openldap/schema rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/openldap/slapd.conf @@ -306,7 +306,6 @@ %files -f files %clean - rm -rf $RPM_BUILD_ROOT %pre %if "%{with_server}" == "yes"