diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2004-01-28 04:38:48 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2004-01-28 04:38:48 +0000 |
commit | 6f14e9220527f3770a795aa8b3e45845da236bd7 (patch) | |
tree | 2748f6e3ff980acab68fd7cb40aeaf63d04fa446 /net-nds/openldap | |
parent | Version bump. See bug #38548. minor ebuild changes. repoman fixes. (diff) | |
download | historical-6f14e9220527f3770a795aa8b3e45845da236bd7.tar.gz historical-6f14e9220527f3770a795aa8b3e45845da236bd7.tar.bz2 historical-6f14e9220527f3770a795aa8b3e45845da236bd7.zip |
fix bug #33718, and version bump to new openldap
Diffstat (limited to 'net-nds/openldap')
-rw-r--r-- | net-nds/openldap/ChangeLog | 11 | ||||
-rw-r--r-- | net-nds/openldap/Manifest | 54 | ||||
-rw-r--r-- | net-nds/openldap/files/digest-openldap-2.0.27-r5 | 1 | ||||
-rw-r--r-- | net-nds/openldap/files/digest-openldap-2.1.26 | 1 | ||||
-rw-r--r-- | net-nds/openldap/openldap-2.0.27-r5.ebuild | 222 | ||||
-rw-r--r-- | net-nds/openldap/openldap-2.1.26.ebuild | 186 |
6 files changed, 448 insertions, 27 deletions
diff --git a/net-nds/openldap/ChangeLog b/net-nds/openldap/ChangeLog index 8f39451f8382..0de8c449bfc6 100644 --- a/net-nds/openldap/ChangeLog +++ b/net-nds/openldap/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-nds/openldap -# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/ChangeLog,v 1.56 2004/01/07 16:28:07 agriffis Exp $ +# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/ChangeLog,v 1.57 2004/01/28 04:38:47 robbat2 Exp $ + +*openldap-2.1.26 (27 Jan 2004) +*openldap-2.0.27-r5 (27 Jan 2004) + + 27 Jan 2004; Robin H. Johnson <robbat2@gentoo.org> + openldap-2.0.27-r5.ebuild, openldap-2.1.26.ebuild: + fix bug #33718, and version bump to new openldap 06 Jan 2004; <agriffis@gentoo.org> openldap-2.0.27-r4.ebuild: Stable on alpha and ia64 diff --git a/net-nds/openldap/Manifest b/net-nds/openldap/Manifest index 761b77726b62..447981199fe7 100644 --- a/net-nds/openldap/Manifest +++ b/net-nds/openldap/Manifest @@ -1,35 +1,39 @@ -MD5 4a9a7e693cc4d5de73d35a5409df394c ChangeLog 12083 +MD5 dc1f4a78331bfd60d15515931c2efd87 openldap-2.1.22-r1.ebuild 6036 +MD5 d8d00496a60c0dca4a147b336d5c5f69 openldap-2.0.25-r2.ebuild 2608 +MD5 ff2a4b3b3f5eafb88fc8f48c246d91ba openldap-2.1.22.ebuild 5265 +MD5 cd50219149c28e0ad5e89bb326312df0 openldap-2.0.27-r5.ebuild 6340 +MD5 803a7dd0676c1bb70fead91bec230189 openldap-2.0.27.ebuild 2260 +MD5 04f32e3d256415e0edcef72258fe1346 openldap-2.0.25-r1.ebuild 2517 +MD5 cfe93a7fc96996ecdc39484230a90309 openldap-2.1.26.ebuild 6115 +MD5 8fd496c4cbfdfa401ba7904793bf1fd8 openldap-2.1.21.ebuild 5291 +MD5 fdbd103ed3eefe0fc3f853843b7e4d2a ChangeLog 12305 +MD5 989cf5b31fced781e1de3a896dab66e9 openldap-2.0.25-r3.ebuild 6258 MD5 a22acc3272a4f93288731dc9b1dabcab metadata.xml 388 -MD5 f4c89948381790589a6f38ae0161ad06 openldap-2.0.25-r1.ebuild 2518 -MD5 63a967c1c320ba41db8fcacae617976a openldap-2.0.25-r2.ebuild 2609 -MD5 d37814179661d8a8db4f7c042b7cfcc3 openldap-2.0.25-r3.ebuild 6259 -MD5 5a0443a4f89bfa0315fb53b7f15c7b2c openldap-2.0.27-r4.ebuild 6425 -MD5 10ed874ce6ccd74b96f43f0ca516e0a8 openldap-2.0.27.ebuild 2261 -MD5 bef6945f37664e29e30304d97d7fc056 openldap-2.1.21.ebuild 5292 -MD5 2e14136b6beb46d43d9d85796065fd2c openldap-2.1.22-r1.ebuild 6037 -MD5 0e72d88ecf5dd908576098773c093095 openldap-2.1.22.ebuild 5266 -MD5 224ab08964d81969d9a3f21621a8cdfa openldap-2.1.23.ebuild 6083 +MD5 af21559842b8ffe2013dc04cf85324bc openldap-2.0.27-r4.ebuild 6424 +MD5 d68976c2d13fde4d430e7743db9354d2 openldap-2.1.23.ebuild 6082 +MD5 ab26c55b61650f4081e4a9c28f972671 files/openldap-2.1.22-perlsedfoo.patch 1029 +MD5 646fd34831ae403ecda2103b01f49a0f files/slapd-2.1.conf 278 MD5 32822e9d47a48af3b1da7e5a3c5c6229 files/digest-openldap-2.0.25-r1 65 MD5 32822e9d47a48af3b1da7e5a3c5c6229 files/digest-openldap-2.0.25-r2 65 MD5 32822e9d47a48af3b1da7e5a3c5c6229 files/digest-openldap-2.0.25-r3 65 -MD5 bc676758f2d1726b75e1d04fd936d029 files/digest-openldap-2.0.27 65 MD5 bc676758f2d1726b75e1d04fd936d029 files/digest-openldap-2.0.27-r4 65 +MD5 bc676758f2d1726b75e1d04fd936d029 files/digest-openldap-2.0.27-r5 65 +MD5 2f3032e2a972520d1a5d428e11a6eb82 files/openldap-2.0.27-db3-gentoo.patch 5995 +MD5 c8d6f4ebeb92ef1085b1bb77d7b4db5f files/gencert.sh 3505 +MD5 d4aef53a2d2ebe6e6df8cfcf33494908 files/digest-openldap-2.1.22-r1 65 +MD5 e67e76ddf0b91a7e72527f5be23b265d files/slapd-2.1.rc6 613 +MD5 97907dada58b504e9fb662b011d62c99 files/rfc2252-bork.patch 1319 +MD5 7b4433b94f0fc68972a0a5a4bbff1cf7 files/slurpd-2.1.rc6 507 +MD5 f742d1da61d191f626b5b6e9986e79a6 files/slapd-2.1-r1.rc6 708 +MD5 8a8a025bf2de63f76d33f244624c3851 files/kerberos-2.0.diff.bz2 385 +MD5 bc676758f2d1726b75e1d04fd936d029 files/digest-openldap-2.0.27 65 MD5 43181f48b522ce05011ff4d0a0b061f7 files/digest-openldap-2.1.21 65 MD5 d4aef53a2d2ebe6e6df8cfcf33494908 files/digest-openldap-2.1.22 65 -MD5 d4aef53a2d2ebe6e6df8cfcf33494908 files/digest-openldap-2.1.22-r1 65 MD5 d1d8e016f9e53ab6886a5d507537f3d1 files/digest-openldap-2.1.23 65 -MD5 c8d6f4ebeb92ef1085b1bb77d7b4db5f files/gencert.sh 3505 -MD5 8a8a025bf2de63f76d33f244624c3851 files/kerberos-2.0.diff.bz2 385 +MD5 30ef1dc504563809f990b72ffe2be6c0 files/digest-openldap-2.1.26 65 +MD5 618aff7f8ec17a4090f07c56d461e775 files/slapd.rc6 590 +MD5 56c55ee6e524dd55c3d38531e792eaa2 files/slurpd.rc6 503 MD5 1de3e9592a8549c165bd43ba11b887f4 files/kerberos-2.1.diff.bz2 402 -MD5 2f3032e2a972520d1a5d428e11a6eb82 files/openldap-2.0.27-db3-gentoo.patch 5995 -MD5 ab26c55b61650f4081e4a9c28f972671 files/openldap-2.1.22-perlsedfoo.patch 1029 -MD5 97907dada58b504e9fb662b011d62c99 files/rfc2252-bork.patch 1319 -MD5 b6dfea76b039b194c4f403d9e7cebde0 files/slapd-2.1-r1.rc6 709 -MD5 646fd34831ae403ecda2103b01f49a0f files/slapd-2.1.conf 278 -MD5 460d3869f98a805e246ce497ac7f5dc5 files/slapd-2.1.rc6 614 -MD5 b7f252f92c11c2041e7bc864c344ecf1 files/slapd.rc6 591 -MD5 a10c9fd548df5774f91a6a10ed604041 files/slurpd-2.1.rc6 508 -MD5 427c91c528ea2cc1719df18d5339706f files/slurpd.rc6 504 +MD5 cc51c5bb0ff8712653668de9697487fa files/2.0/slapd 619 MD5 646fd34831ae403ecda2103b01f49a0f files/2.0/slapd.conf 278 -MD5 62149973636ec267f047c3ebd0f89901 files/2.0/slapd 620 -MD5 80adb9dc3133bd47fbc1168fd29788ee files/2.0/slurpd 505 +MD5 f1fa172a58f551bfa314b39b0725a77f files/2.0/slurpd 504 diff --git a/net-nds/openldap/files/digest-openldap-2.0.27-r5 b/net-nds/openldap/files/digest-openldap-2.0.27-r5 new file mode 100644 index 000000000000..06cad419992d --- /dev/null +++ b/net-nds/openldap/files/digest-openldap-2.0.27-r5 @@ -0,0 +1 @@ +MD5 a1e6508c471dd47205a3492cf57110a6 openldap-2.0.27.tgz 1305050 diff --git a/net-nds/openldap/files/digest-openldap-2.1.26 b/net-nds/openldap/files/digest-openldap-2.1.26 new file mode 100644 index 000000000000..b8ad3a172a52 --- /dev/null +++ b/net-nds/openldap/files/digest-openldap-2.1.26 @@ -0,0 +1 @@ +MD5 e3388c021b1029c15cfbd462d3bfcc9d openldap-2.1.26.tgz 2042658 diff --git a/net-nds/openldap/openldap-2.0.27-r5.ebuild b/net-nds/openldap/openldap-2.0.27-r5.ebuild new file mode 100644 index 000000000000..99305597fa39 --- /dev/null +++ b/net-nds/openldap/openldap-2.0.27-r5.ebuild @@ -0,0 +1,222 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.0.27-r5.ebuild,v 1.1 2004/01/28 04:38:47 robbat2 Exp $ + +inherit eutils + +IUSE="ssl tcpd readline ipv6 berkdb gdbm kerberos odbc" + +DESCRIPTION="LDAP suite of application and development tools" +SRC_URI="ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/${P}.tgz" +HOMEPAGE="http://www.OpenLDAP.org/" + +SLOT="0" +KEYWORDS="x86 ~ppc alpha sparc ia64" +LICENSE="OPENLDAP" + +DEPEND=">=sys-libs/ncurses-5.1 + >=sys-apps/sed-4 + berkdb? ( =sys-libs/db-3* ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) + ssl? ( >=dev-libs/openssl-0.9.6 ) + readline? ( >=sys-libs/readline-4.1 ) + gdbm? ( >=sys-libs/gdbm-1.8.0 ) + kerberos? ( >=app-crypt/mit-krb5-1.2.6 ) + odbc? ( dev-db/unixODBC )" + +MAKEOPTS="${MAKEOPTS} -j1" + +pkg_setup() { + if [ "${SASL1}" != "yes" ]; then + ewarn "" + ewarn "For linking with SASLv1..." + ewarn "emerge cyrus-sasl-1.5.27-r6 (or newest 1.x series build)" + ewarn "SASL1=yes emerge net-nds/openldap" + ewarn "" + sleep 2 + else + ewarn "" + ewarn "You are building ${PVR} linking to SASLv1" + ewarn "" + fi +} + +pkg_preinst() { + if ! grep -q ^ldap: /etc/group + then + groupadd -g 439 ldap || die "problem adding group ldap" + fi + if ! grep -q ^ldap: /etc/passwd + then + useradd -u 439 -d /usr/lib/openldap -g ldap -s /dev/null ldap \ + || die "problem adding user ldap" + fi +} + + +src_unpack() { + unpack ${A} + cd ${S} + + # never worked anyway ? + epatch ${FILESDIR}/kerberos-2.0.diff.bz2 + + # force the use of db3 only, db4 has api breakages + epatch ${FILESDIR}/${P}-db3-gentoo.patch + + # According to MDK, the link order needs to be changed so that + # on systems w/ MD5 passwords the system crypt library is used + # (the net result is that "passwd" can be used to change ldap passwords w/ + # proper pam support) + sed -ie 's/$(SECURITY_LIBS) $(LDIF_LIBS) $(LUTIL_LIBS)/$(LUTIL_LIBS) $(SECURITY_LIBS) $(LDIF_LIBS)/' ${S}/servers/slapd/Makefile.in + + # rfc2252 has some missing characters... + epatch ${FILESDIR}/rfc2252-bork.patch +} + +src_compile() { + local myconf + + # must enable debug for syslog'ing (#16131) + myconf="--enable-debug --enable-syslog" + + use kerberos \ + && myconf="${myconf} --with-kerberos --enable-kpasswd" \ + || myconf="${myconf} --without-kerberos --disable-kpasswd" + + use readline \ + && myconf="${myconf} --with-readline" \ + || myconf="${myconf} --without-readline" + + use ssl \ + && myconf="${myconf} --with-tls" \ + || myconf="${myconf} --without-tls" + + use tcpd \ + && myconf="${myconf} --enable-wrappers" \ + || myconf="${myconf} --disable-wrappers" + + use ipv6 \ + && myconf="${myconf} --enable-ipv6" \ + || myconf="${myconf} --disable-ipv6" + + use odbc \ + && myconf="${myconf} --enable-sql" \ + || myconf="${myconf} --disable-sql" + + use berkdb \ + && myconf="${myconf} --enable-ldbm --with-ldbm-api=berkeley" + + # only set gdbm api if berkdb is not in USE + use gdbm && [ ! `use berkdb` ] \ + && myconf="${myconf} --enable-ldbm --with-ldbm-api=gdbm" \ + || myconf="${myconf} --enable-ldbm --with-ldbm-api=berkeley" + + if [ "${SASL1}" = "yes" ]; then + myconf="${myconf} --with-cyrus-sasl" + else + myconf="${myconf} --without-cyrus-sasl" + fi + + econf \ + --libexecdir=/usr/lib/openldap \ + --enable-crypt \ + --enable-modules \ + --enable-phonetic \ + --enable-dynamic \ + --enable-ldap \ + --disable-spasswd \ + --enable-passwd \ + --enable-shell \ + --enable-slurpd \ + ${myconf} || die "configure failed" + + emake depend || die "make depend failed" + + emake || die "make failed" + + cd tests ; make || die "make tests failed" + +} + +src_install() { + + make DESTDIR=${D} install || die "make install failed" + + dodoc ANNOUNCEMENT CHANGES COPYRIGHT README LICENSE + docinto rfc ; dodoc doc/rfc/*.txt + + # make state directories + for x in data slurp ldbm; do + keepdir /var/lib/openldap-${x} + fowners ldap:ldap /var/lib/openldap-${x} + fperms 0700 /var/lib/openldap-${x} + done + + # manually remove /var/tmp references in .la + # because it is packaged with an ancient libtool + for x in ${D}/usr/lib/lib*.la; do + sed -i -e "s:-L${S}[/]*libraries::" ${x} + done + + # change slapd.pid location in configuration file + keepdir /var/run/openldap + fowners ldap:ldap /var/run/openldap + fperms 0755 /var/run/openldap + sed -i -e "s:/var/lib/slapd.pid:/var/run/openldap/slapd.pid:" ${D}/etc/openldap/slapd.conf + sed -i -e "s:/var/lib/slapd.pid:/var/run/openldap/slapd.pid:" ${D}/etc/openldap/slapd.conf.default + sed -i -e "s:/var/lib/slapd.args:/var/run/openldap/slapd.args:" ${D}/etc/openldap/slapd.conf + sed -i -e "s:/var/lib/slapd.args:/var/run/openldap/slapd.args:" ${D}/etc/openldap/slapd.conf.default + fowners root:ldap /etc/openldap/slapd.conf + fperms 0640 /etc/openldap/slapd.conf + fowners root:ldap /etc/openldap/slapd.conf.default + fperms 0640 /etc/openldap/slapd.conf.default + + # install our own init scripts + exeinto /etc/init.d + newexe ${FILESDIR}/2.0/slapd slapd + newexe ${FILESDIR}/2.0/slurpd slurpd + insinto /etc/conf.d + newins ${FILESDIR}/2.0/slapd.conf slapd + + # install MDK's ssl cert script + dodir /etc/openldap/ssl + exeinto /etc/openldap/ssl + doexe ${FILESDIR}/gencert.sh +} + +pkg_postinst() { + # make a self-signed ssl cert (if there isn't one there already) + if [ ! -e /etc/openldap/ssl/ldap.pem ]; then + cd /etc/openldap/ssl + yes "" | sh gencert.sh + chmod 640 ldap.pem + chown root:ldap ldap.pem + fi + + # Since moving to running openldap as user ldap there are some + # permissions problems with directories and files. + # Let's make sure these permissions are correct. + chown ldap:ldap /var/run/openldap + chmod 0755 /var/run/openldap + chown root:ldap /etc/openldap/slapd.conf + chmod 0640 /etc/openldap/slapd.conf + chown root:ldap /etc/openldap/slapd.conf.default + chmod 0640 /etc/openldap/slapd.conf.default + chown ldap:ldap /var/lib/openldap-{data,ldbm,slurp} + + if [ "${SASL1}" != "yes" ]; then + einfo "" + einfo "For linking with SASLv1..." + einfo "emerge cyrus-sasl-1.5.27-r6 (or newest 1.x series build)" + einfo "SASL1=yes emerge net-nds/openldap" + einfo "" + fi + + ewarn "" + ewarn "slapd is no longer running as root!" + ewarn "If you have upgraded from a previous ebuild you may find problems" + ewarn "Make sure your ldap databases are chown ldap:ldap" + ewarn "See http://bugs.gentoo.org/show_bug.cgi?id=24790 for more info" + ewarn "" +} diff --git a/net-nds/openldap/openldap-2.1.26.ebuild b/net-nds/openldap/openldap-2.1.26.ebuild new file mode 100644 index 000000000000..4ae07c26443f --- /dev/null +++ b/net-nds/openldap/openldap-2.1.26.ebuild @@ -0,0 +1,186 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.1.26.ebuild,v 1.1 2004/01/28 04:38:47 robbat2 Exp $ + +inherit eutils + +DESCRIPTION="LDAP suite of application and development tools" +HOMEPAGE="http://www.OpenLDAP.org/" +SRC_URI="ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/${P}.tgz" + +LICENSE="OPENLDAP" +SLOT="0" +KEYWORDS="~x86 ~ppc ~sparc ~alpha amd64 ppc64" +IUSE="berkdb crypt debug gdbm ipv6 kerberos odbc perl readline samba sasl slp ssl tcpd" + +DEPEND=">=sys-libs/ncurses-5.1 + >=sys-apps/sed-4 + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) + ssl? ( >=dev-libs/openssl-0.9.6 ) + readline? ( >=sys-libs/readline-4.1 ) + sasl? ( >=dev-libs/cyrus-sasl-2.1.7-r3 ) + kerberos? ( >=app-crypt/mit-krb5-1.2.6 ) + odbc? ( dev-db/unixODBC ) + slp? ( >=net-libs/openslp-1.0 ) + perl? ( >=dev-lang/perl-5.6 ) + samba? ( >=dev-libs/openssl-0.9.6 )" + +# if USE=berkdb +# pull in sys-libs/db +# else if USE=gdbm +# pull in sys-libs/gdbm +# else +# pull in sys-libs/db +DEPEND="${DEPEND} + berkdb? ( >=sys-libs/db-4.1.25_p1-r3 ) : ( gdbm? ( >=sys-libs/gdbm-1.8.0 ) : ( >=sys-libs/db-4.1.25_p1-r3 ) )" + +pkg_preinst() { + enewgroup ldap 439 + enewuser ldap 439 /dev/null /usr/lib/openldap ldap +} + +src_unpack() { + unpack ${A} + + # upstream has merged this + ## fix a sed issue + ## we do NOT use epatch here as the patch is against configure.in + ## and I want to patch configure instead + ##patch ${S}/configure ${FILESDIR}/${PN}-2.1.22-perlsedfoo.patch + + # According to MDK, the link order needs to be changed so that + # on systems w/ MD5 passwords the system crypt library is used + # (the net result is that "passwd" can be used to change ldap passwords w/ + # proper pam support) + sed -ie 's/$(SECURITY_LIBS) $(LDIF_LIBS) $(LUTIL_LIBS)/$(LUTIL_LIBS) $(SECURITY_LIBS) $(LDIF_LIBS)/' ${S}/servers/slapd/Makefile.in +} + +src_compile() { + local myconf + + # enable debugging to syslog + use debug && myconf="${myconf} --enable-debug" + myconf="${myconf} --enable-syslog" + + # enable slapd/slurpd servers + myconf="${myconf} --enable-ldap" + myconf="${myconf} --enable-slapd --enable-slurpd" + + myconf="${myconf} `use_enable crypt`" + myconf="${myconf} `use_enable ipv6`" + myconf="${myconf} `use_with sasl cyrus-sasl` `use_enable sasl spasswd`" + myconf="${myconf} `use_with kerberos` `use_enable kerberos kpasswd`" + myconf="${myconf} `use_with readline`" + myconf="${myconf} `use_with ssl tls` `use_with samba lmpasswd`" + myconf="${myconf} `use_enable tcpd wrappers`" + myconf="${myconf} `use_enable odbc sql`" + myconf="${myconf} `use_enable perl`" + myconf="${myconf} `use_enable slp`" + + myconf="${myconf} --enable-ldbm" + myconf_berkdb='--enable-bdb --with-ldbm-api=berkeley' + myconf_gdbm='--disable-bdb --with-ldbm-api=gdbm' + if use berkdb; then + einfo "Using Berkeley DB for local backend" + myconf="${myconf} ${myconf_berkdb}" + elif use gdbm; then + einfo "Using GDBM for local backend" + myconf="${myconf} ${myconf_gdbm}" + else + ewarn "Neither gdbm or berkdb USE flags present, falling back to" + ewarn "Berkeley DB for local backend" + myconf="${myconf} ${myconf_berkdb}" + fi + + # alas, for BSD only + #myconf="${myconf} --with-fetch" + + myconf="${myconf} --enable-dynamic --enable-modules" + myconf="${myconf} --enable-rewrite --enable-rlookups" + myconf="${myconf} --enable-passwd --enable-phonetic" + myconf="${myconf} --enable-dnssrv --enable-ldap" + myconf="${myconf} --enable-meta --enable-monitor" + myconf="${myconf} --enable-null --enable-shell" + myconf="${myconf} --enable-local --enable-proctitle" + + # disabled options + # --with-bdb-module=dynamic + # --enable-dnsserv --with-dnsserv-module=dynamic + + econf \ + --libexecdir=/usr/lib/openldap \ + ${myconf} || die "configure failed" + + make depend || die "make depend failed" + make || die "make failed" + #cd tests ; make || die "make tests failed" + +} + +src_install() { + make DESTDIR=${D} install || die "make install failed" + + dodoc ANNOUNCEMENT CHANGES COPYRIGHT README LICENSE + docinto rfc ; dodoc doc/rfc/*.txt + + # make state directories + for x in data slurp ldbm; do + keepdir /var/lib/openldap-${x} + fowners ldap:ldap /var/lib/openldap-${x} + fperms 0700 /var/lib/openldap-${x} + done + + # manually remove /var/tmp references in .la + # because it is packaged with an ancient libtool + for x in ${D}/usr/lib/lib*.la; do + sed -i -e "s:-L${S}[/]*libraries::" ${x} + done + + # change slapd.pid location in configuration file + keepdir /var/run/openldap + fowners ldap:ldap /var/run/openldap + fperms 0755 /var/run/openldap + sed -i -e "s:/var/lib/slapd.pid:/var/run/openldap/slapd.pid:" ${D}/etc/openldap/slapd.conf + sed -i -e "s:/var/lib/slapd.pid:/var/run/openldap/slapd.pid:" ${D}/etc/openldap/slapd.conf.default + sed -i -e "s:/var/lib/slapd.args:/var/run/openldap/slapd.args:" ${D}/etc/openldap/slapd.conf + sed -i -e "s:/var/lib/slapd.args:/var/run/openldap/slapd.args:" ${D}/etc/openldap/slapd.conf.default + fowners root:ldap /etc/openldap/slapd.conf + fperms 0640 /etc/openldap/slapd.conf + fowners root:ldap /etc/openldap/slapd.conf.default + fperms 0640 /etc/openldap/slapd.conf.default + + # install our own init scripts + exeinto /etc/init.d + newexe ${FILESDIR}/2.0/slapd slapd + newexe ${FILESDIR}/2.0/slurpd slurpd + insinto /etc/conf.d + newins ${FILESDIR}/2.0/slapd.conf slapd + + # install MDK's ssl cert script + dodir /etc/openldap/ssl + exeinto /etc/openldap/ssl + doexe ${FILESDIR}/gencert.sh + +} + +pkg_postinst() { + # make a self-signed ssl cert (if there isn't one there already) + if [ ! -e /etc/openldap/ssl/ldap.pem ] + then + cd /etc/openldap/ssl + yes "" | sh gencert.sh + chmod 640 ldap.pem + chown root:ldap ldap.pem + fi + + # Since moving to running openldap as user ldap there are some + # permissions problems with directories and files. + # Let's make sure these permissions are correct. + chown ldap:ldap /var/run/openldap + chmod 0755 /var/run/openldap + chown root:ldap /etc/openldap/slapd.conf + chmod 0640 /etc/openldap/slapd.conf + chown root:ldap /etc/openldap/slapd.conf.default + chmod 0640 /etc/openldap/slapd.conf.default + chown ldap:ldap /var/lib/openldap-{data,ldbm,slurp} +} |