# Use --define 'nossl 1' on the command line to disable SSL detection %{!?nossl:%define SSL 1} %{?nossl:%define SSL 0} Summary: LDAP servers, libraries, utilities, tools and sample clients. Name: openldap Version: 2.0.21 Release: 6%{!?nossl:ssl} License: IBM_ILA Group: System Environment/Daemons Source0: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/openldap-%{version}.tgz Source1: IBM_ILA Patch0: %{name}-%{version}.osio.patch # Uses a customized ltconfig/ltmain.sh, so we cant rely on running # libtool from the system. Patch1: %{name}-%{version}.ltconf.patch Patch2: %{name}-%{version}.aix.patch Prefix: %{_prefix} URL: http://www.openldap.org BuildRoot: %{_tmppath}/%{name}-root BuildRequires: libtool >= 1.3.5 Requires: db >= 3.3.11 %define DEFCC cc_r %description OpenLDAP is an open source suite of LDAP (Lightweight Directory Access Protocol) applications and development tools. LDAP is a set of protocols for accessing directory services (usually phone book style information, but other information is possible) over the Internet, similar to the way DNS (Domain Name System) information is propagated over the Internet. The suite includes a stand-alone LDAP server (slapd), a stand-alone LDAP replication server (slurpd), libraries for implementing the LDAP protocol, utilities, tools, and sample clients. Install openldap if you need LDAP applications and tools. %package devel Summary: OpenLDAP development libraries and header files. Group: Development/Libraries Requires: openldap %description devel The openldap-devel package includes the development libraries and header files needed for compiling applications that use LDAP (Lightweight Directory Access Protocol) internals. LDAP is a set of protocols for enabling directory services over the Internet. Install this package only if you plan to develop or will need to compile customized LDAP clients. %prep %setup -q %patch0 -p1 -b .osio %patch1 -p1 -b .ltconfig %patch2 -p0 -b .aix # Add license info cat $RPM_SOURCE_DIR/IBM_ILA > LICENSE.new cat LICENSE >> LICENSE.new mv LICENSE.new LICENSE %build # Use the default compiler for this platform - gcc otherwise if [[ -z "$CC" ]] then if test "X`type %{DEFCC} 2>/dev/null`" != 'X'; then export CC=%{DEFCC} else export CC=gcc fi fi if test "X$CC" != "Xgcc" then export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's:-fsigned-char::'` export CFLAGS="$RPM_OPT_FLAGS" fi # Ensure dynamic; otherwise, taking defaults on everything else LDFLAGS="-Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -L/opt/freeware/lib" export LDFLAGS ./configure --prefix=%{_prefix} \ --enable-dynamic \ %if %{SSL} == 0 --without-ssl %endif make depend make %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT mkdir $RPM_BUILD_ROOT make install prefix=$RPM_BUILD_ROOT%{_prefix} \ sysconfdir=$RPM_BUILD_ROOT/etc/openldap \ localstatedir=$RPM_BUILD_ROOT/var/run \ libexecdir=$RPM_BUILD_ROOT%{_prefix}/sbin /usr/bin/strip $RPM_BUILD_ROOT%{_prefix}/bin/* $RPM_BUILD_ROOT%{_prefix}/sbin/* || : # hack the default config files perl -pi -e "s|$RPM_BUILD_ROOT||g" $RPM_BUILD_ROOT/etc/openldap/slapd.conf # we don't need the default files rm -f $RPM_BUILD_ROOT/etc/openldap/*.default ( cd $RPM_BUILD_ROOT for dir in bin sbin include do mkdir -p usr/$dir cd usr/$dir ln -sf ../..%{prefix}/$dir/* . cd - done mkdir -p usr/lib cd usr/lib ln -sf ../..%{prefix}/lib/* . rm libldap.a libldap_r.a # dont want a link of these here cd - mkdir -p usr/linux/lib cd usr/linux/lib ln -sf ../../..%{prefix}/lib/libldap.a . ln -sf ../../..%{prefix}/lib/libldap_r.a . cd - mkdir ./%{prefix}/etc ln -sf /etc/openldap ./%{prefix}/etc/openldap ) mkdir -p $RPM_BUILD_ROOT/var/lib/ldap %clean rm -rf $RPM_BUILD_ROOT %post /usr/bin/grep "389/tcp" /etc/services > /dev/null if [[ $? -ne 0 ]]; then echo "ldap 389/tcp # Openldap" >> /etc/services fi /usr/bin/grep "389/udp" /etc/services > /dev/null if [[ $? -ne 0 ]]; then echo "ldap 389/udp # Openldap" >> /etc/services fi %files %defattr(-,root,system) %dir /etc/openldap %config /etc/openldap/* %{_prefix}/etc/openldap %attr(0755,-,-) %{_prefix}/bin/* %{_prefix}/man/man1/* %{_prefix}/man/man5/* %{_prefix}/man/man8/* %dir %{_prefix}/share/openldap %{_prefix}/share/openldap/ldapfriendly %{_prefix}/share/openldap/*.help %{_prefix}/sbin/* /usr/bin/* /usr/sbin/* %{_prefix}/lib/lib*.a /usr/lib/lib*.a /usr/linux/lib/libldap.a /usr/linux/lib/libldap_r.a %dir /var/lib/ldap %doc ANNOUNCEMENT CHANGES COPYRIGHT LICENSE README doc/rfc/*.txt %files devel %defattr(-,root,system) %doc LICENSE %{_prefix}/lib/lib*.la %{_prefix}/include/* %{_prefix}/man/man3/* /usr/lib/lib*.la /usr/include/* %changelog * Mon Jan 28 2008 Reza Arbab 2.0.21-6 - Rebuild using system-provided OpenSSL. * Tue Mar 15 2005 David Clissold 2.0.21-5 - Clean up; rebuild with ssl. * Fri Nov 22 2002 David Clissold - Add IBM ILA license. * Wed Apr 03 2002 David Clissold - rev 3: minor; change name of /etc/services ldap entries to simply "ldap" * Wed Apr 03 2002 David Clissold - add 389/tcp and 389/udp to /etc/services if not already there - override libpath in the build to point to /opt/freeware/lib * Tue Mar 19 2002 David Clissold - Update to version 2.0.21. Remove dbm flag from configure (allow - default, which uses -ldb). - Note; still requires patched ltconfig. They haven't ported it - to use generic libtool (right now, 1.4.2, which doesn't use ltconfig). * Wed Apr 11 2001 David Clissold - Link into /usr/linux/lib instead of /usr/lib * Thu Apr 05 2001 David Clissold - Add patch for libtool files * Thu Mar 29 2001 David Clissold - Create inital version for AIX Toolbox. - Add Brian McCorkle's patch; set Requires of gdbm * Mon Feb 14 2000 Bill Nottingham - start earlier, stop later. * Thu Feb 3 2000 Nalin Dahyabhai - auto rebuild in new environment (release 4) * Tue Feb 1 2000 Nalin Dahyabhai - add -D_REENTRANT to make threaded stuff more stable, even though it looks like the sources define it, too - mark *.ph files in migration tools as config files * Fri Jan 21 2000 Nalin Dahyabhai - update to 1.2.9 * Mon Sep 13 1999 Bill Nottingham - strip files * Sat Sep 11 1999 Bill Nottingham - update to 1.2.7 - fix some bugs from bugzilla (#4885, #4887, #4888, #4967) - take include files out of base package * Fri Aug 27 1999 Jeff Johnson - missing ;; in init script reload) (#4734). * Tue Aug 24 1999 Cristian Gafton - move stuff from /usr/libexec to /usr/sbin - relocate config dirs to /etc/openldap * Mon Aug 16 1999 Bill Nottingham - initscript munging * Wed Aug 11 1999 Cristian Gafton - add the migration tools to the package * Fri Aug 06 1999 Cristian Gafton - upgrade to 1.2.6 - add rc.d script - split -devel package * Sun Feb 07 1999 Preston Brown - upgrade to latest stable (1.1.4), it now uses configure macro. * Fri Jan 15 1999 Bill Nottingham - build on arm, glibc2.1 * Wed Oct 28 1998 Preston Brown - initial cut. - patches for signal handling on the alpha