SPECS: openldap.spec - build private DB to isolate OpenLDAP from a...
baggins
baggins at pld-linux.org
Fri Nov 2 17:41:56 CET 2007
Author: baggins Date: Fri Nov 2 16:41:56 2007 GMT
Module: SPECS Tag: HEAD
---- Log message:
- build private DB to isolate OpenLDAP from any future changes
to the system-wide Berkeley DB library.
- build evolution-devel package with NTLM hack for evolution-exchange
---- Files affected:
SPECS:
openldap.spec (1.262 -> 1.263)
---- Diffs:
================================================================
Index: SPECS/openldap.spec
diff -u SPECS/openldap.spec:1.262 SPECS/openldap.spec:1.263
--- SPECS/openldap.spec:1.262 Wed Oct 31 21:01:37 2007
+++ SPECS/openldap.spec Fri Nov 2 17:41:51 2007
@@ -12,6 +12,14 @@
%bcond_without sasl # don't build cyrus sasl support
%bcond_without slp # disable SLP support
#
+# Never change or update Berkeley DB, it's there to isolate OpenLDAP
+# from any future changes to the system-wide Berkeley DB library.
+%define db_version 4.6.21
+#
+%define evolution_exchange_prefix %{_libdir}/evolution-openldap
+%define evolution_exchange_includedir %{evolution_exchange_prefix}/include
+%define evolution_exchange_libdir %{evolution_exchange_prefix}/%{_lib}
+
Summary: Lightweight Directory Access Protocol clients/servers
Summary(es.UTF-8): Clientes y servidor para LDAP
Summary(pl.UTF-8): Klienci Lightweight Directory Access Protocol
@@ -25,9 +33,12 @@
Group: Networking/Daemons
Source0: ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/%{name}-%{version}.tgz
# Source0-md5: 4418da48649297587a3d07c987808a5e
-Source1: ldap.init
-Source2: %{name}.sysconfig
-Source3: ldap.conf
+Source1: http://download.oracle.com/berkeley-db/db-%{db_version}.tar.gz
+# Source1-md5: 718082e7e35fc48478a2334b0bc4cd11
+Source2: ldap.init
+Source3: %{name}.sysconfig
+Source4: ldap.conf
+Source100: %{name}-README.evolution
Patch0: %{name}-make_man_link.patch
Patch1: %{name}-conffile.patch
Patch2: %{name}-config.patch
@@ -45,11 +56,12 @@
Patch14: %{name}-nosql.patch
Patch15: %{name}-smbk5pwd.patch
Patch16: %{name}-ldapc++.patch
+# Patch for the evolution library
+Patch100: %{name}-ntlm.diff
URL: http://www.openldap.org/
BuildRequires: autoconf
BuildRequires: automake
%{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.1.15}
-BuildRequires: db-devel >= 4.2
BuildRequires: gmp-devel
BuildRequires: libltdl-devel
BuildRequires: libstdc++-devel
@@ -185,6 +197,18 @@
Статичні бібліотеки, необхідні для розробки програм, що використовують
LDAP.
+%package evolution-devel
+Summary: LDAP NTLM hack for the evolution-exchange
+Summary(pl.UTF-8): Hack NTLM dla pakietu evolution-exchange
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description evolution-devel
+LDAP NTLM hack for the evolution-exchange.
+
+%description evolution-devel -l pl.UTF-8
+Hack NTLM dla pakietu evolution-exchange.
+
%package ldapc++
Summary: LDAPv3 C++ Class Library
Summary(pl.UTF-8): Biblioteka klas C++ LDAPv3
@@ -733,7 +757,8 @@
Сервера (демони), що поставляються з LDAP.
%prep
-%setup -q
+%setup -q -c -a1
+cd %{name}-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
@@ -753,12 +778,63 @@
%patch16 -p1
ln -s ../../../contrib/slapd-modules/smbk5pwd/smbk5pwd.c servers/slapd/overlays/smbk5pwd.c
+cd ..
+
+install -d db-%{db_version}/build-rpm
+
+# Set up a build tree for a static version of libldap with the hooks for the
+# non-standard NTLM bind type which is needed to connect to Win2k GC servers
+# (Win2k3 supports SASL with DIGEST-MD5, so this shouldn't be needed for those
+# servers, though as of version 1.4 the exchange doesn't try SASL first).
+if ! cp -al %{name}-%{version} evo-%{name}-%{version} ; then
+ rm -fr evo-%{name}-%{version}
+ cp -a %{name}-%{version} evo-%{name}-%{version}
+fi
+cd evo-%{name}-%{version}
+%patch100 -p0
%build
+dbdir=`pwd`/db-instroot
+cd db-%{db_version}/build-rpm
+
+CC="%{__cc}"
+CXX="%{__cxx}"
+CFLAGS="%{rpmcflags}"
+CXXFLAGS="%{rpmcflags} -fno-implicit-templates"
+LDFLAGS="%{rpmcflags} %{rpmldflags}"
+export CC CXX CFLAGS CXXFLAGS LDFLAGS
+
+
+../dist/%configure \
+ --disable-java \
+ --disable-tcl \
+ --disable-cxx \
+ --with-pic \
+ --disable-static \
+ --enable-shared \
+ --with-uniquename=_openldap \
+ --prefix=${dbdir} \
+ --exec-prefix=${dbdir} \
+ --bindir=${dbdir}/bin \
+ --includedir=${dbdir}/include \
+ --libdir=${dbdir}/%{_lib}
+
+%{__make} libdb_base=libslapd_db libso_base=libslapd_db
+%{__make} install libdb_base=libslapd_db libso_base=libslapd_db strip="false"
+ln -sf libslapd_db.so ${dbdir}/%{_lib}/${subdir}/libdb.so
+
+cd ../../%{name}-%{version}
+
+CPPFLAGS="-I${dbdir}/include -I/usr/include/ncurses"
+CFLAGS="%{rpmcflags} $CPPFLAGS -D_REENTRANT -fPIC"
+CXXFLAGS="%{rpmcflags} $CPPFLAGS -D_REENTRANT -fPIC"
+LDFLAGS="%{rpmcflags} %{rpmldflags} -L${dbdir}/%{_lib}"
+LD_LIBRARY_PATH=${dbdir}/%{_lib}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
+export CFLAGS CPPFLAGS CXXFLAGS LDFLAGS LD_LIBRARY_PATH
+
%{__libtoolize}
%{__aclocal}
%{__autoconf}
-CPPFLAGS="-I/usr/include/ncurses"
%configure \
--enable-dynamic \
--enable-syslog \
@@ -783,26 +859,13 @@
--disable-slp \
%endif
--enable-wrappers \
- --enable-bdb=mod \
- --enable-dnssrv=mod \
- --enable-hdb=mod \
- --enable-ldap=mod \
- --enable-meta=mod \
- --enable-monitor=mod \
- --enable-null \
- --enable-passwd=mod \
-%if %{with perl}
- --enable-perl=mod \
-%endif
- --enable-relay=mod \
- --enable-shell=mod \
+ --enable-backands=no \
+ --enable-overlays=no \
%if %{with odbc}
- --enable-sql=mod \
--with-odbc=unixodbc \
%else
--with-odbc=no \
%endif
- --enable-overlays=mod \
--with-threads \
--with-tls \
--with-yielding-select \
@@ -827,11 +890,92 @@
--with-ldap-includes=$__topdir/include
%{__make}
+# Build evolution-specific clients just as we would normal clients,
+# except with a different installation directory in mind
+# and no shared libraries.
+cd ../../../evo-%{name}-%{version}
+
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%configure \
+ --includedir=%{evolution_exchange_includedir} \
+ --libdir=%{evolution_exchange_libdir} \
+ --disable-dynamic \
+ --disable-slapd \
+ --disable-shared \
+ --enable-static \
+ --enable-syslog \
+ --enable-ipv6 \
+ --enable-local \
+ --enable-aci \
+ --enable-crypt \
+ --enable-lmpasswd \
+ --enable-modules \
+ --enable-rewrite \
+ --enable-rlookups \
+%if %{with sasl}
+ --with-cyrus-sasl \
+ --enable-spasswd \
+%else
+ --without-cyrus-sasl \
+%endif
+%if %{with slp}
+ --enable-slp \
+%else
+ --disable-slp \
+%endif
+ --enable-wrappers \
+ --enable-bdb=mod \
+ --enable-dnssrv=mod \
+ --enable-hdb=mod \
+ --enable-ldap=mod \
+ --enable-meta=mod \
+ --enable-monitor=mod \
+ --enable-null \
+ --enable-passwd=mod \
+%if %{with perl}
+ --enable-perl=mod \
+%endif
+ --enable-relay=mod \
+ --enable-shell=mod \
+%if %{with odbc}
+ --enable-sql=mod \
+ --with-odbc=unixodbc \
+%else
+ --with-odbc=no \
+%endif
+ --enable-overlays=mod \
+ --with-threads \
+ --with-tls \
+ --with-yielding-select \
+ --with-mp=gmp
+
+%{__make} -j1 depend
+%{__make}
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},/var/lib/openldap-data} \
$RPM_BUILD_ROOT/var/run/slapd \
- $RPM_BUILD_ROOT%{_datadir}/openldap/schema
+ $RPM_BUILD_ROOT%{_datadir}/openldap/schema \
+ $RPM_BUILD_ROOT{%{_sbindir},%{_libdir}}
+
+# Install evolution hack first and remove everything but devel stuff
+cd evo-%{name}-%{version}
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_ROOT{%{_sysconfdir}/openldap,%{_bindir},%{_mandir}}/*
+install %{SOURCE100} $RPM_BUILD_ROOT%{evolution_exchange_prefix}/README.evolution
+
+cd ../db-instroot
+install -m755 lib/libslapd_db-*.*.so $RPM_BUILD_ROOT/%{_libdir}/
+cd bin
+for binary in db_* ; do
+ install ${binary} $RPM_BUILD_ROOT/%{_sbindir}/slapd_${binary}
+done
+
+cd ../../%{name}-%{version}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
@@ -840,10 +984,10 @@
install servers/slapd/overlays/.libs/syncprov{.la,*.so*} $RPM_BUILD_ROOT%{_libdir}/openldap
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ldap
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ldap
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/ldap
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/ldap
-install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/ldap.conf
+install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/ldap.conf
echo "localhost" > $RPM_BUILD_ROOT%{_sysconfdir}/openldap/ldapserver
@@ -1099,8 +1243,8 @@
%files
%defattr(644,root,root,755)
-%doc ANNOUNCEMENT CHANGES COPYRIGHT README LICENSE
-%doc doc/{drafts,rfc}
+%doc %{name}-%{version}/{ANNOUNCEMENT,CHANGES,COPYRIGHT,README,LICENSE}
+%doc %{name}-%{version}/doc/{drafts,rfc}
%dir %{_sysconfdir}/openldap
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/openldap/ldapserver
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ldap.conf
@@ -1151,8 +1295,18 @@
%{_libdir}/libldap.a
%{_libdir}/libldap_r.a
+%files evolution-devel
+%defattr(644,root,root,755)
+%dir %{evolution_exchange_prefix}
+%dir %{evolution_exchange_includedir}
+%dir %{evolution_exchange_libdir}
+%{evolution_exchange_prefix}/README*
+%{evolution_exchange_includedir}/*.h
+%{evolution_exchange_libdir}/*.a
+
%files backend-bdb
%defattr(644,root,root,755)
+%doc db-%{db_version}/LICENSE
%attr(755,root,root) %{_libdir}/openldap/back_bdb*.so*
%{_libdir}/openldap/back_bdb.la
%{_mandir}/man5/slapd-bdb.5*
@@ -1165,6 +1319,7 @@
%files backend-hdb
%defattr(644,root,root,755)
+%doc db-%{db_version}/LICENSE
%attr(755,root,root) %{_libdir}/openldap/back_hdb*.so*
%{_libdir}/openldap/back_hdb.la
%{_mandir}/man5/slapd-hdb.5*
@@ -1184,7 +1339,7 @@
%files backend-monitor
%defattr(644,root,root,755)
-%doc servers/slapd/back-monitor/README
+%doc %{name}-%{version}/servers/slapd/back-monitor/README
%attr(755,root,root) %{_libdir}/openldap/back_monitor*.so*
%{_libdir}/openldap/back_monitor.la
%{_mandir}/man5/slapd-monitor.5*
@@ -1198,7 +1353,7 @@
%if %{with perl}
%files backend-perl
%defattr(644,root,root,755)
-%doc servers/slapd/back-perl/*.pm
+%doc %{name}-%{version}/servers/slapd/back-perl/*.pm
%attr(755,root,root) %{_libdir}/openldap/back_perl*.so*
%{_libdir}/openldap/back_perl.la
%{_mandir}/man5/slapd-perl.5*
@@ -1219,8 +1374,8 @@
%if %{with odbc}
%files backend-sql
%defattr(644,root,root,755)
-%doc servers/slapd/back-sql/docs/*
-%doc servers/slapd/back-sql/rdbms_depend
+%doc %{name}-%{version}/servers/slapd/back-sql/docs/*
+%doc %{name}-%{version}/servers/slapd/back-sql/rdbms_depend
%attr(755,root,root) %{_libdir}/openldap/back_sql*.so*
%{_libdir}/openldap/back_sql.la
%{_mandir}/man5/slapd-sql.5*
@@ -1300,7 +1455,7 @@
%files overlay-smbk5pwd
%defattr(644,root,root,755)
-%doc contrib/slapd-modules/smbk5pwd/README
+%doc %{name}-%{version}/contrib/slapd-modules/smbk5pwd/README
%attr(755,root,root) %{_libdir}/openldap/smbk5pwd*.so*
%{_libdir}/openldap/smbk5pwd.la
@@ -1348,6 +1503,7 @@
%{_datadir}/openldap/schema/*.schema
%dir %{_libdir}/openldap/
%attr(755,root,root) %{_sbindir}/*
+%attr(755,root,root) %{_libdir}/libslapd_db-4.6.so
%{_mandir}/man5/slapd.*.5*
%{_mandir}/man5/slapd-config.5*
%{_mandir}/man5/slapd-ldbm.5*
@@ -1361,6 +1517,11 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.263 2007/11/02 16:41:51 baggins
+- build private DB to isolate OpenLDAP from any future changes
+ to the system-wide Berkeley DB library.
+- build evolution-devel package with NTLM hack for evolution-exchange
+
Revision 1.262 2007/10/31 20:01:37 baggins
- ldbm backend is gone
- denyop and lastmod overlays are gone
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/openldap.spec?r1=1.262&r2=1.263&f=u
More information about the pld-cvs-commit
mailing list