Blob Blame History Raw
%define migtools_ver 24
Summary: LDAP servers, libraries, utilities, tools and sample clients.
Name: openldap
Version: 1.2.11
Release: 16
License: OpenLDAP
Group: System Environment/Daemons
Source0: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/openldap-%{version}.tgz
Source1: ldap.init
Source2: ftp://ftp.padl.com/pub/MigrationTools-%{migtools_ver}.tar.gz
Source3: migration-tools.txt
Source4: migrate_automount.pl
Patch0: openldap-1.2.11-config.patch
Patch1: openldap-1.2.11-redhat.patch
Patch2: openldap-1.2.10-ldapuser.patch
Patch3: MigrationTools-24-instdir.patch
Patch4: openldap-1.2.11-pidfile.patch
Patch5: MigrationTools-24-mktemp.patch
Patch6: openldap-1.2.11-syslog.patch
Patch7: openldap-1.2.11-cldap.patch
URL: http://www.openldap.org/
BuildRoot: %{_tmppath}/%{name}-root
BuildPreReq: autoconf, gdbm-devel
Prereq: /etc/init.d
Requires: mktemp, gdbm

%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 = %{version}

%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.

%package servers
Summary: LDAP servers, libraries, utilities, tools and sample clients.
Prereq: openldap = %{version}-%{release}
Group: System Environment/Daemons

%description servers
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 clients
Summary: LDAP servers, libraries, utilities, tools and sample clients.
Prereq: openldap = %{version}-%{release}
Group: Applications/Internet

%description clients
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.

%prep
%setup -q -a 2
%patch0 -p1 -b .config
%patch1 -p1 -b .redhat
%patch2 -p1 -b .ldapuser
%patch3 -p1 -b .instdir
%patch4 -p1 -b .pidfile
%patch5 -p0 -b .mktemp
%patch6 -p1 -b .syslog
%patch7 -p1 -b .cldap
autoconf

%build
CPPFLAGS="-I/usr/kerberos/include"; export CPPFLAGS
CFLAGS="$RPM_OPT_FLAGS -D_REENTRANT -fPIC"; export CFLAGS
LDFLAGS="-L/usr/kerberos/lib"; export LDFLAGS
configure_flags='
	--with-ldbm-api=gdbm
	--enable-cldap --disable-rlookups
	--enable-passwd --with-kerberos
	--enable-shell --enable-wrappers
        --datadir=%{_datadir}/openldap
	--libexecdir=%{_sbindir}
	--localstatedir=%{_var}/run'

%configure ${configure_flags} --without-slapd --with-slurpd --without-ldapd --disable-shared --with-threads
make
cp servers/slurpd/slurpd slurpd.semistatic

make distclean

%configure ${configure_flags} --with-slapd --without-slurpd --without-ldapd --enable-shared --without-threads
make

%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
mkdir $RPM_BUILD_ROOT
%{makeinstall} \
	datadir=$RPM_BUILD_ROOT%{_datadir}/openldap \
	libexecdir=$RPM_BUILD_ROOT%{_sbindir} \
	localstatedir=%{_var}/run \
	sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir}/openldap
install -m755 slurpd.semistatic $RPM_BUILD_ROOT%{_sbindir}/slurpd

# 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

# install init script
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
install -m 755 %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ldap

# install the migration tools
mkdir -p $RPM_BUILD_ROOT%{_datadir}/openldap/migration
install -m 755 MigrationTools-%{migtools_ver}/migrate_* \
	$RPM_BUILD_ROOT%{_datadir}/openldap/migration
install -m 644 MigrationTools-%{migtools_ver}/README %{SOURCE3} \
	$RPM_BUILD_ROOT%{_datadir}/openldap/migration
install -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/openldap/migration
cp MigrationTools-%{migtools_ver}/README README.migration
cp %{SOURCE3} TOOLS.migration

# create the data directory
mkdir -p $RPM_BUILD_ROOT/var/lib/ldap

%clean 
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post servers
/sbin/chkconfig --add ldap

%preun servers
if [ "$1" = "0" ] ; then
	/sbin/service ldap stop > /dev/null 2>&1 || :
	/sbin/chkconfig --del ldap
fi

%postun servers
/sbin/ldconfig
if [ $1 -ge 1 ] ; then
	/sbin/service ldap condrestart > /dev/null 2>&1 || :
fi

%files
%defattr(-,root,root)
%doc ANNOUNCEMENT CHANGES COPYRIGHT LICENSE README
%attr(0755,root,root) %dir /etc/openldap
%attr(0644,root,root) %config /etc/openldap/ldap*.conf
%attr(0755,root,root) %{_libdir}/lib*.so.*
%attr(0644,root,root) %{_mandir}/man5/*
%attr(0755,root,root) %dir %{_datadir}/openldap
%attr(0644,root,root) %{_datadir}/openldap/ldapfriendly

%files servers
%defattr(-,root,root)
%doc README.migration TOOLS.migration
%attr(0755,root,root) %config /etc/rc.d/init.d/ldap
%attr(0600,root,root) %config /etc/openldap/sl*.conf
%attr(0755,root,root) %{_sbindir}/*
%attr(0644,root,root) %{_mandir}/man8/*
%attr(0644,root,root) %{_datadir}/openldap/*.help
%attr(0755,root,root) %dir %{_datadir}/openldap/migration
%attr(0644,root,root) %{_datadir}/openldap/migration/README
%attr(0644,root,root) %config %{_datadir}/openldap/migration/*.ph
%attr(0755,root,root) %{_datadir}/openldap/migration/*.pl
%attr(0755,root,root) %{_datadir}/openldap/migration/*.sh
%attr(0644,root,root) %{_datadir}/openldap/migration/*.txt
%attr(0700,root,root) %dir /var/lib/ldap

%files clients
%defattr(-,root,root)
%attr(0755,root,root) %{_bindir}/*
%attr(0644,root,root) %{_mandir}/man1/*

%files devel
%defattr(-,root,root)
%doc doc/devel/README doc/devel/guidelines doc/devel/todo doc/rfc/*.txt
%attr(0755,root,root) %{_libdir}/lib*.so
%attr(0644,root,root) %{_libdir}/lib*.a
%attr(0644,root,root) %{_includedir}/*
%attr(0644,root,root) %{_mandir}/man3/*

%changelog
* Mon Oct 23 2000 Nalin Dahyabhai <nalin@redhat.com>
- build with -fPIC everywhere

* Tue Aug 22 2000 Nalin Dahyabhai <nalin@redhat.com>
- remove that pesky default password
- change "Copyright:" to "License:"

* Sun Aug 13 2000 Nalin Dahyabhai <nalin@redhat.com>
- adjust permissions in files lists
- move libexecdir from %{_prefix}/sbin to %{_sbindir}

* Fri Aug 11 2000 Nalin Dahyabhai <nalin@redhat.com>
- add migrate_automount.pl to the migration scripts set

* Tue Aug  8 2000 Nalin Dahyabhai <nalin@redhat.com>
- build a semistatic slurpd with threads, everything else without
- disable reverse lookups, per email on OpenLDAP mailing lists
- make sure the execute bits are set on the shared libraries

* Mon Jul 31 2000 Nalin Dahyabhai <nalin@redhat.com>
- change logging facility used from local4 to daemon (#11047)

* Thu Jul 27 2000 Nalin Dahyabhai <nalin@redhat.com>
- split off clients and servers to shrink down the package and remove the
  base package's dependency on Perl
- make certain that the binaries have sane permissions

* Mon Jul 17 2000 Nalin Dahyabhai <nalin@redhat.com>
- move the init script back

* Thu Jul 13 2000 Nalin Dahyabhai <nalin@redhat.com>
- tweak the init script to only source /etc/sysconfig/network if it's found

* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Mon Jul 10 2000 Nalin Dahyabhai <nalin@redhat.com>
- switch to gdbm; I'm getting off the db merry-go-round
- tweak the init script some more
- add instdir to @INC in migration scripts

* Thu Jul  6 2000 Nalin Dahyabhai <nalin@redhat.com>
- tweak init script to return error codes properly
- change initscripts dependency to one on /etc/init.d

* Tue Jul  4 2000 Nalin Dahyabhai <nalin@redhat.com>
- prereq initscripts
- make migration scripts use mktemp

* Tue Jun 27 2000 Nalin Dahyabhai <nalin@redhat.com>
- do condrestart in post and stop in preun
- move init script to /etc/init.d

* Fri Jun 16 2000 Nalin Dahyabhai <nalin@redhat.com>
- update to 1.2.11
- add condrestart logic to init script
- munge migration scripts so that you don't have to be 
  /usr/share/openldap/migration to run them
- add code to create pid files in /var/run

* Mon Jun  5 2000 Nalin Dahyabhai <nalin@redhat.com>
- FHS tweaks
- fix for compiling with libdb2

* Thu May  4 2000 Bill Nottingham <notting@redhat.com>
- minor tweak so it builds on ia64

* Wed May  3 2000 Nalin Dahyabhai <nalin@redhat.com>
- more minimalistic fix for bug #11111 after consultation with OpenLDAP team
- backport replacement for the ldapuser patch

* Tue May  2 2000 Nalin Dahyabhai <nalin@redhat.com>
- fix segfaults from queries with commas in them in in.xfingerd (bug #11111)

* Tue Apr 25 2000 Nalin Dahyabhai <nalin@redhat.com>
- update to 1.2.10
- add revamped version of patch from kos@bastard.net to allow execution as
  any non-root user
- remove test suite from %build because of weirdness in the build system

* Wed Apr 12 2000 Nalin Dahyabhai <nalin@redhat.com>
- move the defaults for databases and whatnot to /var/lib/ldap (bug #10714)
- fix some possible string-handling problems

* Mon Feb 14 2000 Bill Nottingham <notting@redhat.com>
- start earlier, stop later.

* Thu Feb  3 2000 Nalin Dahyabhai <nalin@redhat.com>
- auto rebuild in new environment (release 4)

* Tue Feb  1 2000 Nalin Dahyabhai <nalin@redhat.com>
- 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 <nalin@redhat.com>
- update to 1.2.9

* Mon Sep 13 1999 Bill Nottingham <notting@redhat.com>
- strip files

* Sat Sep 11 1999 Bill Nottingham <notting@redhat.com>
- 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 <jbj@redhat.com>
- missing ;; in init script reload) (#4734).

* Tue Aug 24 1999 Cristian Gafton <gafton@redhat.com>
- move stuff from /usr/libexec to /usr/sbin
- relocate config dirs to /etc/openldap

* Mon Aug 16 1999 Bill Nottingham <notting@redhat.com>
- initscript munging

* Wed Aug 11 1999 Cristian Gafton <gafton@redhat.com>
- add the migration tools to the package

* Fri Aug 06 1999 Cristian Gafton <gafton@redhat.com>
- upgrade to 1.2.6
- add rc.d script
- split -devel package

* Sun Feb 07 1999 Preston Brown <pbrown@redhat.com>
- upgrade to latest stable (1.1.4), it now uses configure macro.

* Fri Jan 15 1999 Bill Nottingham <notting@redhat.com>
- build on arm, glibc2.1

* Wed Oct 28 1998 Preston Brown <pbrown@redhat.com>
- initial cut.
- patches for signal handling on the alpha