diff options
author | Markus Ullmann <jokey@gentoo.org> | 2006-12-23 20:20:55 +0000 |
---|---|---|
committer | Markus Ullmann <jokey@gentoo.org> | 2006-12-23 20:20:55 +0000 |
commit | 7dd30e971e34de606c12bedee878908bbe647d1f (patch) | |
tree | 573d4abb9ab3d1c7e047a7a5b384c53dc5b1ea7e /net-nds | |
parent | Stable on ppc wrt bug #152498. (diff) | |
download | historical-7dd30e971e34de606c12bedee878908bbe647d1f.tar.gz historical-7dd30e971e34de606c12bedee878908bbe647d1f.tar.bz2 historical-7dd30e971e34de606c12bedee878908bbe647d1f.zip |
Ebuild clean up, don't build 2.1 libs when building 2.2, just preserve if needed
Package-Manager: portage-2.1.2_rc4
Diffstat (limited to 'net-nds')
-rw-r--r-- | net-nds/openldap/ChangeLog | 9 | ||||
-rw-r--r-- | net-nds/openldap/files/digest-openldap-2.2.28-r6 | 3 | ||||
-rw-r--r-- | net-nds/openldap/openldap-2.1.30-r9.ebuild | 91 | ||||
-rw-r--r-- | net-nds/openldap/openldap-2.2.28-r5.ebuild | 3 | ||||
-rw-r--r-- | net-nds/openldap/openldap-2.2.28-r6.ebuild | 193 | ||||
-rw-r--r-- | net-nds/openldap/openldap-2.3.30-r1.ebuild | 162 | ||||
-rw-r--r-- | net-nds/openldap/openldap-2.3.31.ebuild | 162 |
7 files changed, 218 insertions, 405 deletions
diff --git a/net-nds/openldap/ChangeLog b/net-nds/openldap/ChangeLog index 4ab354b1a782..dcc1f3a269ad 100644 --- a/net-nds/openldap/ChangeLog +++ b/net-nds/openldap/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-nds/openldap # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/ChangeLog,v 1.236 2006/12/23 16:10:26 jokey Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/ChangeLog,v 1.237 2006/12/23 20:20:54 jokey Exp $ + + 23 Dec 2006; Markus Ullmann <jokey@gentoo.org> -files/gencert.sh-2.2.27, + openldap-2.1.30-r9.ebuild, openldap-2.2.28-r5.ebuild, + openldap-2.2.28-r6.ebuild, openldap-2.3.30-r1.ebuild, + openldap-2.3.31.ebuild: + Ebuild clean up, don't build 2.1 libs when building 2.2, just preserve if + needed 23 Dec 2006; Markus Ullmann <jokey@gentoo.org> -openldap-2.1.30-r6.ebuild, -openldap-2.1.30-r7.ebuild, openldap-2.1.30-r8.ebuild, diff --git a/net-nds/openldap/files/digest-openldap-2.2.28-r6 b/net-nds/openldap/files/digest-openldap-2.2.28-r6 index 7f47e31dd5fd..39550e28ab46 100644 --- a/net-nds/openldap/files/digest-openldap-2.2.28-r6 +++ b/net-nds/openldap/files/digest-openldap-2.2.28-r6 @@ -1,6 +1,3 @@ -MD5 e2ae8148c4bed07d7a70edd930bdc403 openldap-2.1.30.tgz 2044673 -RMD160 431aa798c6197530c17611b931f0169d7a53e831 openldap-2.1.30.tgz 2044673 -SHA256 7fcefd45dfc82038cf0875e36b86a67d3af44b6a734e0127bae9ff2582ae8b25 openldap-2.1.30.tgz 2044673 MD5 b51db7328430b9cbe527696da726f1fb openldap-2.2.28.tgz 2630427 RMD160 ca3f5aff42e6afc6b7c0a62beb8c13d4ff43d44c openldap-2.2.28.tgz 2630427 SHA256 05c75b719305578dec799f05eaddae6b77eb51857abc6284e47b6abc4317dfba openldap-2.2.28.tgz 2630427 diff --git a/net-nds/openldap/openldap-2.1.30-r9.ebuild b/net-nds/openldap/openldap-2.1.30-r9.ebuild index 173c59ef6172..fdc9649d117c 100644 --- a/net-nds/openldap/openldap-2.1.30-r9.ebuild +++ b/net-nds/openldap/openldap-2.1.30-r9.ebuild @@ -1,7 +1,10 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.1.30-r9.ebuild,v 1.1 2006/11/21 10:06:39 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.1.30-r9.ebuild,v 1.2 2006/12/23 20:20:55 jokey Exp $ +WANT_AUTOMAKE="1.9" +WANT_AUTOCONF="2.5" +AT_M4DIR="./build" inherit eutils DESCRIPTION="LDAP suite of application and development tools" @@ -13,8 +16,12 @@ SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" IUSE="berkdb crypt debug gdbm ipv6 odbc perl readline samba sasl slp ssl tcpd selinux" +# note that the 'samba' USE flag pulling in OpenSSL is NOT an error. OpenLDAP +# uses OpenSSL for LanMan/NTLM hashing (which is used in some enviroments, like +# mine at work)! +# Robin H. Johnson <robbat2@gentoo.org> March 8, 2004 + 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 ) @@ -22,28 +29,14 @@ DEPEND=">=sys-libs/ncurses-5.1 odbc? ( dev-db/unixODBC ) slp? ( >=net-libs/openslp-1.0 ) perl? ( >=dev-lang/perl-5.6 ) - samba? ( >=dev-libs/openssl-0.9.6 )" - -# note that the 'samba' USE flag pulling in OpenSSL is NOT an error. OpenLDAP -# uses OpenSSL for LanMan/NTLM hashing (which is used in some enviroments, like -# mine at work)! -# Robin H. Johnson <robbat2@gentoo.org> March 8, 2004 - -# 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} + samba? ( >=dev-libs/openssl-0.9.6 ) berkdb? ( >=sys-libs/db-4.1.25_p1-r3 ) !berkdb? ( gdbm? ( >=sys-libs/gdbm-1.8.0 ) !gdbm? ( >=sys-libs/db-4.1.25_p1-r3 ) )" -RDEPEND=" - ${DEPEND} +RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-openldap )" pkg_preinst() { @@ -65,59 +58,52 @@ src_unpack() { # (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 + "${S}"/servers/slapd/Makefile.in # Fix up DB-4.0 linking problem # remember to autoconf! this expands configure by 500 lines (4 lines to m4 # stuff). - epatch ${FILESDIR}/${PN}-2.1.30-db40.patch - epatch ${FILESDIR}/${PN}-2.1.30-tls-activedirectory-hang-fix.patch + epatch "${FILESDIR}"/${PN}-2.1.30-db40.patch + epatch "${FILESDIR}"/${PN}-2.1.30-tls-activedirectory-hang-fix.patch # Security bug #96767 # http://bugzilla.padl.com/show_bug.cgi?id=210 - EPATCH_OPTS="-p1 -d ${S}" epatch ${FILESDIR}/${PN}-2.2.26-tls-fix-connection-test.patch + EPATCH_OPTS="-p1 -d ${S}" epatch "${FILESDIR}"/${PN}-2.2.26-tls-fix-connection-test.patch # supersedes old fix for bug #31202 - cd ${S} - epatch ${FILESDIR}/${PN}-2.1.27-perlthreadsfix.patch + cd "${S}" + epatch "${FILESDIR}"/${PN}-2.1.27-perlthreadsfix.patch # fix up stuff for newer autoconf that simulates autoconf-2.13, but doesn't # do it perfectly. - cd ${S}/build + cd "${S}"/build ln -s shtool install ln -s shtool install.sh # ximian connector 1.4.7 ntlm patch - cd ${S} - epatch ${FILESDIR}/${PN}-2.1.30-ximian_connector.patch - - export WANT_AUTOMAKE="1.9" - export WANT_AUTOCONF="2.5" + cd "${S}" + epatch "${FILESDIR}"/${PN}-2.1.30-ximian_connector.patch #make files ready for new autoconf - EPATCH_OPTS="-p0 -d ${S}" epatch ${FILESDIR}/${PN}-2.1.30-autoconf25.patch + EPATCH_OPTS="-p0 -d ${S}" epatch "${FILESDIR}"/${PN}-2.1.30-autoconf25.patch # fix AC calls bug #114544 - EPATCH_OPTS="-p0 -d ${S}/build" epatch ${FILESDIR}/${PN}-2.1.30-m4_underquoted.patch + EPATCH_OPTS="-p0 -d ${S}/build" epatch "${FILESDIR}"/${PN}-2.1.30-m4_underquoted.patch # make tests rpath ready - EPATCH_OPTS="-p0 -d ${S}/tests" epatch ${FILESDIR}/${PN}-2.1.30-tests.patch + EPATCH_OPTS="-p0 -d ${S}/tests" epatch "${FILESDIR}"/${PN}-2.1.30-tests.patch # make autoconf-archive compatible - EPATCH_OPTS="-p0 -d ${S}" epatch ${FILESDIR}/${PN}-2.1.30-autoconf-archived-fix.patch + EPATCH_OPTS="-p0 -d ${S}" epatch "${FILESDIR}"/${PN}-2.1.30-autoconf-archived-fix.patch # CVE-2006-5779, bug #154349 - EPATCH_OPTS="-p0 -d ${S}" epatch ${FILESDIR}/${PN}-2.3.27-CVE-2006-5779.patch + EPATCH_OPTS="-p0 -d ${S}" epatch "${FILESDIR}"/${PN}-2.3.27-CVE-2006-5779.patch - # reconf compat and current for RPATH solve - cd ${S} - einfo "Running libtoolize on ${S}" + # reconf current for RPATH solve libtoolize --copy --force - einfo "Running aclocal on ${S}" - aclocal || die "aclocal failed" + eaclocal || die "aclocal failed" EPATCH_OPTS="-p0 -d ${S}" epatch ${FILESDIR}/${PN}-2.1.30-rpath.patch - einfo "Running autoconf on ${S}" - autoconf || die "autoconf failed" + eautoconf || die "autoconf failed" } src_compile() { @@ -155,10 +141,6 @@ src_compile() { 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" @@ -167,18 +149,14 @@ src_compile() { 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 \ --enable-static \ --enable-shared \ --libexecdir=/usr/lib/openldap \ ${myconf} || die "configure failed" - make depend || die "make depend failed" - make || die "make failed" + emake depend || die "make depend failed" + emake || die "make failed" } @@ -188,7 +166,7 @@ src_test() { } src_install() { - make DESTDIR=${D} install || die "make install failed" + emake DESTDIR=${D} install || die "make install failed" dodoc ANNOUNCEMENT CHANGES COPYRIGHT README LICENSE ${FILESDIR}/DB_CONFIG.fast.example docinto rfc ; dodoc doc/rfc/*.txt @@ -258,13 +236,6 @@ pkg_postinst() { chown ldap:ldap /var/lib/openldap-{data,ldbm,slurp} # notes from bug #41297, bug #41039 - ewarn "If you are upgrading from OpenLDAP 2.0, major changes have occured:" - ewarn "- bind_anon_dn is now disabled by default for security" - ewarn " add 'allow bind_anon_dn' to your config for the old behavior." - ewarn "- Default schemas have changed, you should slapcat your entire DB to" - ewarn " a file, delete your DB, and then slapadd it again. Alternatively" - ewarn " you can try slapindex which should work in almost all cases. Be" - ewarn " sure to check the permissions on the database files afterwards!" if use ssl; then ewarn "- Self-signed SSL certificates are treated harshly by OpenLDAP 2.1" ewarn " add 'TLS_REQCERT never' if you want to use them." diff --git a/net-nds/openldap/openldap-2.2.28-r5.ebuild b/net-nds/openldap/openldap-2.2.28-r5.ebuild index 510c48466611..6431c13a7076 100644 --- a/net-nds/openldap/openldap-2.2.28-r5.ebuild +++ b/net-nds/openldap/openldap-2.2.28-r5.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.2.28-r5.ebuild,v 1.9 2006/12/23 16:10:26 jokey Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.2.28-r5.ebuild,v 1.10 2006/12/23 20:20:55 jokey Exp $ inherit flag-o-matic toolchain-funcs eutils multilib @@ -355,7 +355,6 @@ src_install() { if use ssl || use samba; then dodir /etc/openldap/ssl exeinto /etc/openldap/ssl - #newexe ${FILESDIR}/gencert.sh-2.2.27 gencert.sh doexe ${FILESDIR}/gencert.sh fi diff --git a/net-nds/openldap/openldap-2.2.28-r6.ebuild b/net-nds/openldap/openldap-2.2.28-r6.ebuild index 39f005e1b284..26b8f3de3aaf 100644 --- a/net-nds/openldap/openldap-2.2.28-r6.ebuild +++ b/net-nds/openldap/openldap-2.2.28-r6.ebuild @@ -1,24 +1,28 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.2.28-r6.ebuild,v 1.1 2006/11/21 10:06:39 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.2.28-r6.ebuild,v 1.2 2006/12/23 20:20:55 jokey Exp $ -inherit flag-o-matic toolchain-funcs eutils multilib libtool - -OLD_PV="2.1.30" -OLD_P="${PN}-${OLD_PV}" -OLD_S="${WORKDIR}/${OLD_P}" +WANT_AUTOMAKE="1.9" +WANT_AUTOCONF="2.5" +AT_M4DIR="./build" +inherit autotools eutils flag-o-matic multilib toolchain-funcs DESCRIPTION="LDAP suite of application and development tools" HOMEPAGE="http://www.OpenLDAP.org/" -SRC_URI="mirror://openldap/openldap-release/${P}.tgz - mirror://openldap/openldap-release/${OLD_P}.tgz" +SRC_URI="mirror://openldap/openldap-release/${P}.tgz" LICENSE="OPENLDAP" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" IUSE="berkdb crypt debug gdbm ipv6 kerberos minimal odbc perl readline samba sasl slp ssl tcpd selinux" -RDEPEND=">=sys-libs/ncurses-5.1 +# note that the 'samba' USE flag pulling in OpenSSL is NOT an error. OpenLDAP +# uses OpenSSL for LanMan/NTLM hashing (which is used in some enviroments, like +# mine at work)! +# Robin H. Johnson <robbat2@gentoo.org> March 8, 2004 + +RDEPEND_BERKDB=">=sys-libs/db-4.2.52_p2-r1" +DEPEND="sys-libs/ncurses tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) ssl? ( >=dev-libs/openssl-0.9.6 ) readline? ( >=sys-libs/readline-4.1 ) @@ -27,57 +31,23 @@ RDEPEND=">=sys-libs/ncurses-5.1 slp? ( >=net-libs/openslp-1.0 ) perl? ( >=dev-lang/perl-5.6 ) samba? ( >=dev-libs/openssl-0.9.6 ) - kerberos? ( virtual/krb5 )" - -# note that the 'samba' USE flag pulling in OpenSSL is NOT an error. OpenLDAP -# uses OpenSSL for LanMan/NTLM hashing (which is used in some enviroments, like -# mine at work)! -# Robin H. Johnson <robbat2@gentoo.org> March 8, 2004 - -# if USE=berkdb -# pull in sys-libs/db -# else if USE=gdbm -# pull in sys-libs/gdbm -# else -# pull in sys-libs/db -RDEPEND_BERKDB=">=sys-libs/db-4.2.52_p2-r1" -RDEPEND_GDBM=">=sys-libs/gdbm-1.8.0" -RDEPEND="${RDEPEND} + kerberos? ( virtual/krb5 ) berkdb? ( ${RDEPEND_BERKDB} ) !berkdb? ( - gdbm? ( ${RDEPEND_GDBM} ) + gdbm? ( sys-libs/gdbm ) !gdbm? ( ${RDEPEND_BERKDB} ) ) selinux? ( sec-policy/selinux-openldap )" - -DEPEND="${RDEPEND} - >=sys-devel/libtool-1.5.18-r1 - >=sys-apps/sed-4" +RDEPEND="${DEPEND}" # for tracking versions OPENLDAP_VERSIONTAG="/var/lib/openldap-data/.version-tag" -#DEPEND="${DEPEND} !<net-nds/openldap-2.2" - -openldap_upgrade_warning() { - ewarn "If you are upgrading from OpenLDAP-2.1, and run slapd on this" - ewarn "machine please see the ebuild for upgrade instructions, otherwise" - ewarn "you may corrupt your database!" - echo - ewarn "Part of the configuration file syntax has changed:" - ewarn "'access to attribute=' is now 'access to attrs='" - echo - ewarn "You must also run revdep-rebuild after upgrading from 2.1 to 2.2:" - ewarn "# revdep-rebuild --library liblber.so.2" - ewarn "# revdep-rebuild --library libldap.so.2" - ewarn "# revdep-rebuild --library libldap_r.so.2" -} - pkg_setup() { # grab lines openldap_datadirs="" - if [ -f ${ROOT}/etc/openldap/slapd.conf ]; then - openldap_datadirs="$(awk '{if($1 == "directory") print $2 }' ${ROOT}/etc/openldap/slapd.conf)" + if [ -f "${ROOT}etc/openldap/slapd.conf" ]; then + openldap_datadirs="$(awk '{if($1 == "directory") print $2 }' ${ROOT}etc/openldap/slapd.conf)" fi datafiles="" for d in $openldap_datadirs; do @@ -85,7 +55,7 @@ pkg_setup() { done # remove extra spaces datafiles="$(echo ${datafiles// })" - # TODO: read OPENLDAP_VERSIONTAG instead in future + if has_version '<net-nds/openldap-2.2' && [ -n "$datafiles" ]; then eerror "A possible old installation of OpenLDAP was detected" eerror "As major version upgrades to 2.2 can corrupt your database" @@ -109,17 +79,14 @@ pkg_setup() { eerror "" eerror "This install will not proceed until your old data directory" eerror "is at least moved out of the way." - #exit 1 die "Warning direct upgrade unsafe!" fi - openldap_upgrade_warning if has_version "<=dev-lang/perl-5.8.8_rc1" && built_with_use dev-lang/perl minimal ; then die "You must have a complete (USE='-minimal') Perl install to use the perl backend!" fi } pkg_preinst() { - openldap_upgrade_warning enewgroup ldap 439 enewuser ldap 439 -1 /usr/$(get_libdir)/openldap ldap } @@ -132,85 +99,59 @@ src_unpack() { # (the net result is that "passwd" can be used to change ldap passwords w/ # proper pam support) sed -i -e 's/$(SECURITY_LIBS) $(LDIF_LIBS) $(LUTIL_LIBS)/$(LUTIL_LIBS) $(SECURITY_LIBS) $(LDIF_LIBS)/' \ - ${S}/servers/slapd/Makefile.in + "${S}"/servers/slapd/Makefile.in # Fix up DB-4.0 linking problem # remember to autoconf! this expands configure by 500 lines (4 lines to m4 # stuff). - EPATCH_OPTS="-p1 -d ${S}" epatch ${FILESDIR}/${PN}-2.2.14-db40.patch + EPATCH_OPTS="-p1 -d ${S}" epatch "${FILESDIR}"/${PN}-2.2.14-db40.patch # supersedes old fix for bug #31202 - EPATCH_OPTS="-p1 -d ${S}" epatch ${FILESDIR}/${PN}-2.2.14-perlthreadsfix.patch + EPATCH_OPTS="-p1 -d ${S}" epatch "${FILESDIR}"/${PN}-2.2.14-perlthreadsfix.patch # Security bug #96767 # http://bugzilla.padl.com/show_bug.cgi?id=210 - EPATCH_OPTS="-p1 -d ${S}" epatch ${FILESDIR}/${PN}-2.2.26-tls-fix-connection-test.patch + EPATCH_OPTS="-p1 -d ${S}" epatch "${FILESDIR}"/${PN}-2.2.26-tls-fix-connection-test.patch # ensure correct SLAPI path by default sed -i -e 's,\(#define LDAPI_SOCK\).*,\1 "/var/run/openldap/slapd.sock",' \ - ${S}/include/ldap_defaults.h + "${S}"/include/ldap_defaults.h - # fix up some automake stuff - #sed -i -e 's,^AC_CONFIG_HEADER,AM_CONFIG_HEADER,' ${S}/configure.in - - # ximian connector 1.4.7 ntlm patch - #EPATCH_OPTS="-p1 -d ${S}" epatch ${FILESDIR}/${PN}-2.2.28-ximian_connector.patch - EPATCH_OPTS="-p0 -d ${S}" epatch ${FILESDIR}/${PN}-2.2.6-ntlm.patch + EPATCH_OPTS="-p0 -d ${S}" epatch "${FILESDIR}"/${PN}-2.2.6-ntlm.patch # fix up stuff for newer autoconf that simulates autoconf-2.13, but doesn't # do it perfectly. - cd ${S}/build + cd "${S}"/build ln -s shtool install ln -s shtool install.sh - export WANT_AUTOMAKE="1.9" - export WANT_AUTOCONF="2.5" - # make files ready for new autoconf - EPATCH_OPTS="-p0 -d ${OLD_S}" epatch ${FILESDIR}/${PN}-2.1.30-autoconf25.patch - EPATCH_OPTS="-p0 -d ${S}" epatch ${FILESDIR}/${PN}-2.1.30-autoconf25.patch + EPATCH_OPTS="-p0 -d ${S}" epatch "${FILESDIR}"/${PN}-2.1.30-autoconf25.patch # fix AC calls bug #114544 - EPATCH_OPTS="-p0 -d ${OLD_S}/build" epatch ${FILESDIR}/${PN}-2.1.30-m4_underquoted.patch - EPATCH_OPTS="-p0 -d ${S}/build" epatch ${FILESDIR}/${PN}-2.1.30-m4_underquoted.patch + EPATCH_OPTS="-p0 -d ${S}/build" epatch "${FILESDIR}"/${PN}-2.1.30-m4_underquoted.patch # make tests rpath ready - EPATCH_OPTS="-p0 -d ${S}/tests" epatch ${FILESDIR}/${PN}-2.2.28-tests.patch + EPATCH_OPTS="-p0 -d ${S}/tests" epatch "${FILESDIR}"/${PN}-2.2.28-tests.patch # make autoconf-archive compatible - EPATCH_OPTS="-p0 -d ${OLD_S}" epatch ${FILESDIR}/${PN}-2.1.30-autoconf-archived-fix.patch - EPATCH_OPTS="-p0 -d ${S}" epatch ${FILESDIR}/${PN}-2.2.28-autoconf-archived-fix.patch + EPATCH_OPTS="-p0 -d ${S}" epatch "${FILESDIR}"/${PN}-2.2.28-autoconf-archived-fix.patch # make autoconf-archive compatible - EPATCH_OPTS="-p1 -d ${OLD_S}" epatch ${FILESDIR}/${PN}-2.1.30-glibc24.patch - EPATCH_OPTS="-p1 -d ${S}" epatch ${FILESDIR}/${PN}-2.1.30-glibc24.patch + EPATCH_OPTS="-p1 -d ${S}" epatch "${FILESDIR}"/${PN}-2.1.30-glibc24.patch # add cleartext passwords backport bug #112554 - EPATCH_OPTS="-p0 -d ${S}" epatch ${FILESDIR}/${PN}-2.2.28-cleartext-passwords.patch + EPATCH_OPTS="-p0 -d ${S}" epatch "${FILESDIR}"/${PN}-2.2.28-cleartext-passwords.patch # CVE-2006-5779, bug #154349 - EPATCH_OPTS="-p0 -d ${S}" epatch ${FILESDIR}/${PN}-2.3.27-CVE-2006-5779.patch + EPATCH_OPTS="-p0 -d ${S}" epatch "${FILESDIR}"/${PN}-2.3.27-CVE-2006-5779.patch - # reconf compat and current for RPATH solve - cd ${WORKDIR}/${OLD_P} - einfo "Running libtoolize on ${OLD_P}" + # reconf for RPATH solve + cd "${S}" libtoolize --copy --force --automake - einfo "Running aclocal on ${OLD_P}" - aclocal || die "aclocal failed" - EPATCH_OPTS="-p0 -d ${WORKDIR}/${OLD_P}" epatch ${FILESDIR}/${PN}-2.1.30-rpath.patch - einfo "Running autoconf on ${OLD_P}" - autoconf || die "autoconf failed" - - cd ${S} - einfo "Running libtoolize on ${P}" - libtoolize --copy --force --automake - einfo "Running aclocal on ${P}" - aclocal || die "aclocal failed" - EPATCH_OPTS="-p0 -d ${S}" epatch ${FILESDIR}/${PN}-2.1.30-rpath.patch - einfo "Running autoconf on ${P}" - autoconf || die "autoconf failed" - - elibtoolize + eaclocal || die "aclocal failed" + EPATCH_OPTS="-p0 -d ${S}" epatch "${FILESDIR}"/${PN}-2.1.30-rpath.patch + eautoconf || die "autoconf failed" } src_compile() { @@ -225,6 +166,7 @@ src_compile() { # enable slapd/slurpd servers if not doing a minimal build if ! use minimal; then myconf="${myconf} --enable-slapd --enable-slurpd" + # base backend stuff myconf="${myconf} --enable-ldbm" if use berkdb; then @@ -238,6 +180,7 @@ src_compile() { ewarn "Berkeley DB for local backend" myconf="${myconf} ${myconf_berkdb}" fi + # extra backend stuff myconf="${myconf} --enable-passwd=mod --enable-phonetic=mod" myconf="${myconf} --enable-dnssrv=mod --enable-ldap" @@ -245,23 +188,20 @@ src_compile() { myconf="${myconf} --enable-null=mod --enable-shell=mod" myconf="${myconf} `use_enable perl perl mod`" myconf="${myconf} `use_enable odbc sql mod`" + # slapd options myconf="${myconf} `use_enable crypt` `use_enable slp`" myconf="${myconf} --enable-rewrite --enable-rlookups" myconf="${myconf} --enable-aci --enable-modules" myconf="${myconf} --enable-cleartext --enable-slapi" myconf="${myconf} `use_with samba lmpasswd`" - # disabled options: - # --with-bdb-module=dynamic - # alas, for BSD only: - # --with-fetch - # slapd overlay options myconf="${myconf} --enable-dyngroup --enable-proxycache" else myconf="${myconf} --disable-slapd --disable-slurpd" myconf="${myconf} --disable-bdb --disable-monitor" myconf="${myconf} --disable-slurpd" fi + # basic functionality stuff myconf="${myconf} --enable-syslog --enable-dynamic" myconf="${myconf} --enable-local --enable-proctitle" @@ -286,28 +226,11 @@ src_compile() { # special kerberos stuff tc-export CC if ! use minimal && use kerberos ; then - cd ${S}/contrib/slapd-modules/passwd/ && \ + cd "${S}"/contrib/slapd-modules/passwd/ && \ ${CC} -shared -I../../../include ${CFLAGS} -fPIC \ -DHAVE_KRB5 -o pw-kerberos.so kerberos.c || \ die "failed to compile kerberos module" fi - - # now build old compat lib - cd ${OLD_S} && \ - econf \ - --disable-static --enable-shared \ - --libexecdir=/usr/$(get_libdir)/openldap \ - --disable-slapd --disable-aci --disable-cleartext --disable-crypt \ - --disable-lmpasswd --disable-spasswd --enable-modules \ - --disable-phonetic --disable-rewrite --disable-rlookups --disable-slp \ - --disable-wrappers --disable-bdb --disable-dnssrv --disable-ldap \ - --disable-ldbm --disable-meta --disable-monitor --disable-null \ - --disable-passwd --disable-perl --disable-shell --disable-sql \ - --disable-slurpd || die "configure-2.1 failed" - make depend || die "make-2.1 depend failed" - cd ${OLD_S}/libraries/liblber && make liblber.la || die "make-2.1 liblber.la failed" - cd ${OLD_S}/libraries/libldap && make libldap.la || die "make-2.1 libldap.la failed" - cd ${OLD_S}/libraries/libldap_r && make libldap_r.la || die "make-2.1 libldap_r.la failed" } src_test() { @@ -318,7 +241,7 @@ src_test() { src_install() { make DESTDIR=${D} install || die "make install failed" - dodoc ANNOUNCEMENT CHANGES COPYRIGHT README LICENSE ${FILESDIR}/DB_CONFIG.fast.example + dodoc ANNOUNCEMENT CHANGES COPYRIGHT README LICENSE "${FILESDIR}"/DB_CONFIG.fast.example docinto rfc ; dodoc doc/rfc/*.txt # openldap modules go here @@ -357,16 +280,16 @@ src_install() { done # install our own init scripts exeinto /etc/init.d - newexe ${FILESDIR}/2.0/slapd slapd - newexe ${FILESDIR}/2.0/slurpd slurpd + newexe "${FILESDIR}"/2.0/slapd slapd + newexe "${FILESDIR}"/2.0/slurpd slurpd if [ $(get_libdir) != lib ]; then sed -e "s,/usr/lib/,/usr/$(get_libdir)/," -i ${D}/etc/init.d/{slapd,slurpd} fi insinto /etc/conf.d - newins ${FILESDIR}/2.0/slapd.conf slapd - if use kerberos && [ -f ${S}/contrib/slapd-modules/passwd/pw-kerberos.so ]; then + newins "${FILESDIR}"/2.0/slapd.conf slapd + if use kerberos && [ -f "${S}"/contrib/slapd-modules/passwd/pw-kerberos.so ]; then insinto /usr/$(get_libdir)/openldap/openldap - doins ${S}/contrib/slapd-modules/passwd/pw-kerberos.so || \ + doins "${S}"/contrib/slapd-modules/passwd/pw-kerberos.so || \ die "failed to install kerberos passwd module" fi fi @@ -375,16 +298,13 @@ src_install() { if use ssl || use samba; then dodir /etc/openldap/ssl exeinto /etc/openldap/ssl - #newexe ${FILESDIR}/gencert.sh-2.2.27 gencert.sh - doexe ${FILESDIR}/gencert.sh + doexe "${FILESDIR}"/gencert.sh fi - dolib.so ${OLD_S}/libraries/liblber/.libs/liblber.so.2.0.130 || \ - die "failed to install old liblber" - dolib.so ${OLD_S}/libraries/libldap/.libs/libldap.so.2.0.130 || \ - die "failed to install old libldap" - dolib.so ${OLD_S}/libraries/libldap_r/.libs/libldap_r.so.2.0.130 || \ - die "failed to install old libldap_r" + # keep old libs if needed + for each in lber.so.2.0.130 libldap.so.2.0.130 libldap_r.so.2.0.130 ; do + preserve_old_lib "${ROOT}usr/$(get_libdir)/${each}" + done } pkg_postinst() { @@ -414,7 +334,6 @@ pkg_postinst() { ewarn "Self-signed SSL certificates are treated harshly by OpenLDAP 2.[12]" ewarn "add 'TLS_REQCERT never' if you want to use them." fi - openldap_upgrade_warning # Reference inclusion bug #77330 echo @@ -426,4 +345,8 @@ pkg_postinst() { echo einfo "An example file for tuning BDB backends with openldap is:" einfo "/usr/share/doc/${P}/DB_CONFIG.fast.example.gz" + + for each in lber.so.2.0.130 libldap.so.2.0.130 libldap_r.so.2.0.130 ; do + preserve_old_lib_notify "${ROOT}usr/$(get_libdir)/${each}" + done } diff --git a/net-nds/openldap/openldap-2.3.30-r1.ebuild b/net-nds/openldap/openldap-2.3.30-r1.ebuild index c3ffd922a2c4..5dd3200ac595 100644 --- a/net-nds/openldap/openldap-2.3.30-r1.ebuild +++ b/net-nds/openldap/openldap-2.3.30-r1.ebuild @@ -1,7 +1,10 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.3.30-r1.ebuild,v 1.1 2006/11/27 15:40:11 strerror Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.3.30-r1.ebuild,v 1.2 2006/12/23 20:20:55 jokey Exp $ +WANT_AUTOCONF="latest" +WANT_AUTOMAKE="latest" +AT_M4DIR="./build" inherit autotools eutils flag-o-matic multilib toolchain-funcs versionator DESCRIPTION="LDAP suite of application and development tools" @@ -42,10 +45,7 @@ RDEPEND="sys-libs/ncurses ) ) selinux? ( sec-policy/selinux-openldap )" - -DEPEND="${RDEPEND} - >=sys-devel/libtool-1.5.18-r1 - >=sys-apps/sed-4" +DEPEND="${RDEPEND}" # for tracking versions OPENLDAP_VERSIONTAG=".version-tag" @@ -96,7 +96,7 @@ openldap_find_versiontags() { for each in ${openldap_datadirs}; do CURRENT_TAGDIR=${ROOT}`echo ${each} | sed "s:\/::"` CURRENT_TAG=${CURRENT_TAGDIR}/${OPENLDAP_VERSIONTAG} - if [ -d ${CURRENT_TAGDIR} ] && [ ${openldap_found_tag} == 0 ] ; then + if [ -d ${CURRENT_TAGDIR} ] && [ ${openldap_found_tag} == 0 ] ; then einfo "- Checking ${each}..." if [ -r ${CURRENT_TAG} ] ; then # yey, we have one :) @@ -160,11 +160,11 @@ pkg_setup() { fi if use minimal && has_version "net-nds/openldap" && built_with_use net-nds/openldap minimal ; then - einfo - einfo "Skipping scan for previous datadirs as requested by minimal useflag" - einfo + einfo + einfo "Skipping scan for previous datadirs as requested by minimal useflag" + einfo else - openldap_find_versiontags + openldap_find_versiontags fi } @@ -214,8 +214,8 @@ src_unpack() { # bug #116045 # patch contrib modules if ! use minimal ; then - cd ${S}/contrib - epatch ${FILESDIR}/${PN}-2.3.24-contrib-smbk5pwd.patch + cd ${S}/contrib + epatch ${FILESDIR}/${PN}-2.3.24-contrib-smbk5pwd.patch fi } @@ -288,50 +288,50 @@ src_compile() { --libexecdir=/usr/$(get_libdir)/openldap \ ${myconf} || die "configure failed" - make depend || die "make depend failed" - make || die "make failed" + emake depend || die "make depend failed" + emake || die "make failed" # openldap/contrib tc-export CC if ! use minimal ; then # dsaschema einfo "Building contributed dsaschema" - cd ${S}/contrib/slapd-modules/dsaschema + cd "${S}"/contrib/slapd-modules/dsaschema ${CC} -shared -I../../../include ${CFLAGS} -fPIC \ -Wall -o libdsaschema-plugin.so dsaschema.c || \ die "failed to compile dsaschema module" # kerberos passwd if use kerberos ; then einfo "Building contributed pw-kerberos" - cd ${S}/contrib/slapd-modules/passwd/ && \ + cd "${S}"/contrib/slapd-modules/passwd/ && \ ${CC} -shared -I../../../include ${CFLAGS} -fPIC \ -DHAVE_KRB5 -o pw-kerberos.so kerberos.c || \ die "failed to compile kerberos password module" fi # netscape mta-md5 password einfo "Building contributed pw-netscape" - cd ${S}/contrib/slapd-modules/passwd/ && \ + cd "${S}"/contrib/slapd-modules/passwd/ && \ ${CC} -shared -I../../../include ${CFLAGS} -fPIC \ -o pw-netscape.so netscape.c || \ die "failed to compile netscape password module" # smbk5pwd overlay # Note: this modules builds, but may not work with - # Gentoo's MIT-Kerberos. It was designed for Heimdal - # Kerberos. + # Gentoo's MIT-Kerberos. It was designed for Heimdal + # Kerberos. if use smbkrb5passwd ; then einfo "Building contributed smbk5pwd" local mydef local mykrb5inc mydef="-DDO_SAMBA -DDO_KRB5" mykrb5inc="-I/usr/include/heimdal/" - cd ${S}/contrib/slapd-modules/smbk5pwd && \ + cd "${S}"/contrib/slapd-modules/smbk5pwd && \ libexecdir="/usr/$(get_libdir)/openldap" \ DEFS="${mydef}" KRB5_INC="${mykrb5inc}" emake || \ die "failed to compile smbk5pwd module" fi # addrdnvalues einfo "Building contributed addrdnvalues" - cd ${S}/contrib/slapi-plugins/addrdnvalues/ && \ + cd "${S}"/contrib/slapi-plugins/addrdnvalues/ && \ ${CC} -shared -I../../../include ${CFLAGS} -fPIC \ -o libaddrdnvalues-plugin.so addrdnvalues.c || \ die "failed to compile addrdnvalues plugin" @@ -339,14 +339,12 @@ src_compile() { } src_test() { - einfo einfo "Doing tests" - einfo cd tests ; make tests || die "make tests failed" } src_install() { - make DESTDIR="${D}" install || die "make install failed" + emake DESTDIR="${D}" install || die "make install failed" dodoc ANNOUNCEMENT CHANGES COPYRIGHT README LICENSE ${FILESDIR}/DB_CONFIG.fast.example docinto rfc ; dodoc doc/rfc/*.txt @@ -372,7 +370,7 @@ src_install() { # manually remove /var/tmp references in .la # because it is packaged with an ancient libtool - for x in ${D}/usr/$(get_libdir)/lib*.la; do + for x in "${D}"/usr/$(get_libdir)/lib*.la; do sed -i -e "s:-L${S}[/]*libraries::" ${x} done @@ -384,60 +382,60 @@ src_install() { if ! use minimal; then # config modifications for f in /etc/openldap/slapd.conf /etc/openldap/slapd.conf.default; do - sed -e "s:/var/lib/run/slapd.:/var/run/openldap/slapd.:" -i ${D}/${f} - sed -e "/database\tbdb$/acheckpoint 32 30 # <kbyte> <min>" -i ${D}/${f} + sed -e "s:/var/lib/run/slapd.:/var/run/openldap/slapd.:" -i "${D}"/${f} + sed -e "/database\tbdb$/acheckpoint 32 30 # <kbyte> <min>" -i "${D}"/${f} fowners root:ldap ${f} fperms 0640 ${f} done # install our own init scripts exeinto /etc/init.d - newexe ${FILESDIR}/2.0/slapd slapd - newexe ${FILESDIR}/2.0/slurpd slurpd + newexe "${FILESDIR}"/2.0/slapd slapd + newexe "${FILESDIR}"/2.0/slurpd slurpd if [ $(get_libdir) != lib ]; then - sed -e "s,/usr/lib/,/usr/$(get_libdir)/," -i ${D}/etc/init.d/{slapd,slurpd} + sed -e "s,/usr/lib/,/usr/$(get_libdir)/," -i "${D}"/etc/init.d/{slapd,slurpd} fi insinto /etc/conf.d - newins ${FILESDIR}/2.0/slapd.conf slapd + newins "${FILESDIR}"/2.0/slapd.conf slapd # install contributed modules docinto / - if [ -e ${S}/contrib/slapd-modules/dsaschema/libdsaschema-plugin.so ]; + if [ -e "${S}"/contrib/slapd-modules/dsaschema/libdsaschema-plugin.so ]; then - cd ${S}/contrib/slapd-modules/dsaschema/ + cd "${S}"/contrib/slapd-modules/dsaschema/ newdoc README README.contrib.dsaschema exeinto /usr/$(get_libdir)/openldap/openldap doexe libdsaschema-plugin.so || \ die "failed to install dsaschema module" fi - if [ -e ${S}/contrib/slapd-modules/passwd/pw-kerberos.so ]; then - cd ${S}/contrib/slapd-modules/passwd/ + if [ -e "${S}"/contrib/slapd-modules/passwd/pw-kerberos.so ]; then + cd "${S}"/contrib/slapd-modules/passwd/ newdoc README README.contrib.passwd exeinto /usr/$(get_libdir)/openldap/openldap doexe pw-kerberos.so || \ die "failed to install kerberos passwd module" fi - if [ -e ${S}/contrib/slapd-modules/passwd/pw-netscape.so ]; then - cd ${S}/contrib/slapd-modules/passwd/ + if [ -e "${S}"/contrib/slapd-modules/passwd/pw-netscape.so ]; then + cd "${S}"/contrib/slapd-modules/passwd/ newdoc README README.contrib.passwd exeinto /usr/$(get_libdir)/openldap/openldap - doexe ${S}/contrib/slapd-modules/passwd/pw-netscape.so || \ + doexe "${S}"/contrib/slapd-modules/passwd/pw-netscape.so || \ die "failed to install Netscape MTA-MD5 passwd module" fi - if [ -e ${S}/contrib/slapd-modules/smbk5pwd/.libs/smbk5pwd.so ]; then - cd ${S}/contrib/slapd-modules/smbk5pwd + if [ -e "${S}"/contrib/slapd-modules/smbk5pwd/.libs/smbk5pwd.so ]; then + cd "${S}"/contrib/slapd-modules/smbk5pwd newdoc README.contrib.smbk5pwd libexecdir="/usr/$(get_libdir)/openldap" \ - DESTDIR="${D}" make install-mod || \ + emake DESTDIR="${D}" install-mod || \ die "failed to install smbk5pwd overlay module" fi - if [ -e ${S}/contrib/slapd-tools/statslog ]; then - cd ${S}/contrib/slapd-tools + if [ -e "${S}"/contrib/slapd-tools/statslog ]; then + cd "${S}"/contrib/slapd-tools exeinto /usr/bin newexe statslog ldapstatslog || \ die "failed to install ldapstatslog script" fi - if [ -e ${S}/contrib/slapi-plugins/addrdnvalues/libaddrdnvalues-plugin.so ]; + if [ -e "${S}"/contrib/slapi-plugins/addrdnvalues/libaddrdnvalues-plugin.so ]; then - cd ${S}/contrib/slapi-plugins/addrdnvalues + cd "${S}"/contrib/slapi-plugins/addrdnvalues newdoc README README.contrib.addrdnvalues exeinto /usr/$(get_libdir)/openldap/openldap doexe libaddrdnvalues-plugin.so || \ @@ -450,55 +448,19 @@ src_install() { if use ssl || use samba; then dodir /etc/openldap/ssl exeinto /etc/openldap/ssl - doexe ${FILESDIR}/gencert.sh + doexe "${FILESDIR}"/gencert.sh fi # keep old libs if any - # from 2.1 - for each in ${ROOT}usr/$(get_libdir)/liblber.so.2.0.1* ; do - preserve_old_lib ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap.so.2.0.1* ; do - preserve_old_lib ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap_r.so.2.0.1* ; do - preserve_old_lib ${each} - done - # from 2.2 - for each in ${ROOT}usr/$(get_libdir)/liblber-2.2* ; do - preserve_old_lib ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap-2.2* ; do - preserve_old_lib ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap_r-2.2* ; do - preserve_old_lib ${each} + LIBSUFFIXES=".so.2.0.130 -2.2.so.7" + for LIBSUFFIX in ${LIBSUFFIXES} ; do + for each in lber libldap libldap_r ; do + preserve_old_lib "${ROOT}usr/$(get_libdir)/${each}${LIBSUFFIX}" + done done } pkg_postinst() { - # keep old libs if any - # from 2.1 - for each in ${ROOT}usr/$(get_libdir)/liblber.so.2.0.1* ; do - preserve_old_lib_notify ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap.so.2.0.1* ; do - preserve_old_lib_notify ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap_r.so.2.0.1* ; do - preserve_old_lib_notify ${each} - done - # from 2.2 - for each in ${ROOT}usr/$(get_libdir)/liblber-2.2* ; do - preserve_old_lib_notify ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap-2.2* ; do - preserve_old_lib_notify ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap_r-2.2* ; do - preserve_old_lib_notify ${each} - done - if use ssl; then # make a self-signed ssl cert (if there isn't one there already) if [ ! -e /etc/openldap/ssl/ldap.pem ] @@ -513,15 +475,11 @@ pkg_postinst() { einfo fi 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{,.default} - chmod 0640 /etc/openldap/slapd.conf{,.default} - chown ldap:ldap /var/lib/openldap-{data,ldbm,slurp} + chown ldap:ldap "${ROOT}"var/run/openldap + chmod 0755 "${ROOT}"var/run/openldap + chown root:ldap "${ROOT}"etc/openldap/slapd.conf{,.default} + chmod 0640 "${ROOT}"etc/openldap/slapd.conf{,.default} + chown ldap:ldap "${ROOT}"var/lib/openldap-{data,ldbm,slurp} if use ssl; then ewarn @@ -545,10 +503,10 @@ pkg_postinst() { einfo "/usr/share/doc/${P}/DB_CONFIG.fast.example.gz" einfo - if has_version "<net-nds/openldap-2.3" ; then - echo - einfo - einfo "*** Remember to run revdep-rebuild to update your packages ***" - einfo - fi + LIBSUFFIXES=".so.2.0.130 -2.2.so.7" + for LIBSUFFIX in ${LIBSUFFIXES} ; do + for each in lber libldap libldap_r ; do + preserve_old_lib_notify "${ROOT}usr/$(get_libdir)/${each}${LIBSUFFIX}" + done + done } diff --git a/net-nds/openldap/openldap-2.3.31.ebuild b/net-nds/openldap/openldap-2.3.31.ebuild index 7fc49fa88124..9e29133fc312 100644 --- a/net-nds/openldap/openldap-2.3.31.ebuild +++ b/net-nds/openldap/openldap-2.3.31.ebuild @@ -1,7 +1,10 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.3.31.ebuild,v 1.1 2006/12/23 15:01:56 jokey Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.3.31.ebuild,v 1.2 2006/12/23 20:20:54 jokey Exp $ +WANT_AUTOCONF="latest" +WANT_AUTOMAKE="latest" +AT_M4DIR="./build" inherit autotools eutils flag-o-matic multilib toolchain-funcs versionator DESCRIPTION="LDAP suite of application and development tools" @@ -42,10 +45,7 @@ RDEPEND="sys-libs/ncurses ) ) selinux? ( sec-policy/selinux-openldap )" - -DEPEND="${RDEPEND} - >=sys-devel/libtool-1.5.18-r1 - >=sys-apps/sed-4" +DEPEND="${RDEPEND}" # for tracking versions OPENLDAP_VERSIONTAG=".version-tag" @@ -96,7 +96,7 @@ openldap_find_versiontags() { for each in ${openldap_datadirs}; do CURRENT_TAGDIR=${ROOT}`echo ${each} | sed "s:\/::"` CURRENT_TAG=${CURRENT_TAGDIR}/${OPENLDAP_VERSIONTAG} - if [ -d ${CURRENT_TAGDIR} ] && [ ${openldap_found_tag} == 0 ] ; then + if [ -d ${CURRENT_TAGDIR} ] && [ ${openldap_found_tag} == 0 ] ; then einfo "- Checking ${each}..." if [ -r ${CURRENT_TAG} ] ; then # yey, we have one :) @@ -160,11 +160,11 @@ pkg_setup() { fi if use minimal && has_version "net-nds/openldap" && built_with_use net-nds/openldap minimal ; then - einfo - einfo "Skipping scan for previous datadirs as requested by minimal useflag" - einfo + einfo + einfo "Skipping scan for previous datadirs as requested by minimal useflag" + einfo else - openldap_find_versiontags + openldap_find_versiontags fi } @@ -214,8 +214,8 @@ src_unpack() { # bug #116045 # patch contrib modules if ! use minimal ; then - cd ${S}/contrib - epatch ${FILESDIR}/${PN}-2.3.24-contrib-smbk5pwd.patch + cd ${S}/contrib + epatch ${FILESDIR}/${PN}-2.3.24-contrib-smbk5pwd.patch fi } @@ -288,50 +288,50 @@ src_compile() { --libexecdir=/usr/$(get_libdir)/openldap \ ${myconf} || die "configure failed" - make depend || die "make depend failed" - make || die "make failed" + emake depend || die "make depend failed" + emake || die "make failed" # openldap/contrib tc-export CC if ! use minimal ; then # dsaschema einfo "Building contributed dsaschema" - cd ${S}/contrib/slapd-modules/dsaschema + cd "${S}"/contrib/slapd-modules/dsaschema ${CC} -shared -I../../../include ${CFLAGS} -fPIC \ -Wall -o libdsaschema-plugin.so dsaschema.c || \ die "failed to compile dsaschema module" # kerberos passwd if use kerberos ; then einfo "Building contributed pw-kerberos" - cd ${S}/contrib/slapd-modules/passwd/ && \ + cd "${S}"/contrib/slapd-modules/passwd/ && \ ${CC} -shared -I../../../include ${CFLAGS} -fPIC \ -DHAVE_KRB5 -o pw-kerberos.so kerberos.c || \ die "failed to compile kerberos password module" fi # netscape mta-md5 password einfo "Building contributed pw-netscape" - cd ${S}/contrib/slapd-modules/passwd/ && \ + cd "${S}"/contrib/slapd-modules/passwd/ && \ ${CC} -shared -I../../../include ${CFLAGS} -fPIC \ -o pw-netscape.so netscape.c || \ die "failed to compile netscape password module" # smbk5pwd overlay # Note: this modules builds, but may not work with - # Gentoo's MIT-Kerberos. It was designed for Heimdal - # Kerberos. + # Gentoo's MIT-Kerberos. It was designed for Heimdal + # Kerberos. if use smbkrb5passwd ; then einfo "Building contributed smbk5pwd" local mydef local mykrb5inc mydef="-DDO_SAMBA -DDO_KRB5" mykrb5inc="-I/usr/include/heimdal/" - cd ${S}/contrib/slapd-modules/smbk5pwd && \ + cd "${S}"/contrib/slapd-modules/smbk5pwd && \ libexecdir="/usr/$(get_libdir)/openldap" \ DEFS="${mydef}" KRB5_INC="${mykrb5inc}" emake || \ die "failed to compile smbk5pwd module" fi # addrdnvalues einfo "Building contributed addrdnvalues" - cd ${S}/contrib/slapi-plugins/addrdnvalues/ && \ + cd "${S}"/contrib/slapi-plugins/addrdnvalues/ && \ ${CC} -shared -I../../../include ${CFLAGS} -fPIC \ -o libaddrdnvalues-plugin.so addrdnvalues.c || \ die "failed to compile addrdnvalues plugin" @@ -339,14 +339,12 @@ src_compile() { } src_test() { - einfo einfo "Doing tests" - einfo cd tests ; make tests || die "make tests failed" } src_install() { - make DESTDIR="${D}" install || die "make install failed" + emake DESTDIR="${D}" install || die "make install failed" dodoc ANNOUNCEMENT CHANGES COPYRIGHT README LICENSE ${FILESDIR}/DB_CONFIG.fast.example docinto rfc ; dodoc doc/rfc/*.txt @@ -372,7 +370,7 @@ src_install() { # manually remove /var/tmp references in .la # because it is packaged with an ancient libtool - for x in ${D}/usr/$(get_libdir)/lib*.la; do + for x in "${D}"/usr/$(get_libdir)/lib*.la; do sed -i -e "s:-L${S}[/]*libraries::" ${x} done @@ -384,60 +382,60 @@ src_install() { if ! use minimal; then # config modifications for f in /etc/openldap/slapd.conf /etc/openldap/slapd.conf.default; do - sed -e "s:/var/lib/run/slapd.:/var/run/openldap/slapd.:" -i ${D}/${f} - sed -e "/database\tbdb$/acheckpoint 32 30 # <kbyte> <min>" -i ${D}/${f} + sed -e "s:/var/lib/run/slapd.:/var/run/openldap/slapd.:" -i "${D}"/${f} + sed -e "/database\tbdb$/acheckpoint 32 30 # <kbyte> <min>" -i "${D}"/${f} fowners root:ldap ${f} fperms 0640 ${f} done # install our own init scripts exeinto /etc/init.d - newexe ${FILESDIR}/2.0/slapd slapd - newexe ${FILESDIR}/2.0/slurpd slurpd + newexe "${FILESDIR}"/2.0/slapd slapd + newexe "${FILESDIR}"/2.0/slurpd slurpd if [ $(get_libdir) != lib ]; then - sed -e "s,/usr/lib/,/usr/$(get_libdir)/," -i ${D}/etc/init.d/{slapd,slurpd} + sed -e "s,/usr/lib/,/usr/$(get_libdir)/," -i "${D}"/etc/init.d/{slapd,slurpd} fi insinto /etc/conf.d - newins ${FILESDIR}/2.0/slapd.conf slapd + newins "${FILESDIR}"/2.0/slapd.conf slapd # install contributed modules docinto / - if [ -e ${S}/contrib/slapd-modules/dsaschema/libdsaschema-plugin.so ]; + if [ -e "${S}"/contrib/slapd-modules/dsaschema/libdsaschema-plugin.so ]; then - cd ${S}/contrib/slapd-modules/dsaschema/ + cd "${S}"/contrib/slapd-modules/dsaschema/ newdoc README README.contrib.dsaschema exeinto /usr/$(get_libdir)/openldap/openldap doexe libdsaschema-plugin.so || \ die "failed to install dsaschema module" fi - if [ -e ${S}/contrib/slapd-modules/passwd/pw-kerberos.so ]; then - cd ${S}/contrib/slapd-modules/passwd/ + if [ -e "${S}"/contrib/slapd-modules/passwd/pw-kerberos.so ]; then + cd "${S}"/contrib/slapd-modules/passwd/ newdoc README README.contrib.passwd exeinto /usr/$(get_libdir)/openldap/openldap doexe pw-kerberos.so || \ die "failed to install kerberos passwd module" fi - if [ -e ${S}/contrib/slapd-modules/passwd/pw-netscape.so ]; then - cd ${S}/contrib/slapd-modules/passwd/ + if [ -e "${S}"/contrib/slapd-modules/passwd/pw-netscape.so ]; then + cd "${S}"/contrib/slapd-modules/passwd/ newdoc README README.contrib.passwd exeinto /usr/$(get_libdir)/openldap/openldap - doexe ${S}/contrib/slapd-modules/passwd/pw-netscape.so || \ + doexe "${S}"/contrib/slapd-modules/passwd/pw-netscape.so || \ die "failed to install Netscape MTA-MD5 passwd module" fi - if [ -e ${S}/contrib/slapd-modules/smbk5pwd/.libs/smbk5pwd.so ]; then - cd ${S}/contrib/slapd-modules/smbk5pwd + if [ -e "${S}"/contrib/slapd-modules/smbk5pwd/.libs/smbk5pwd.so ]; then + cd "${S}"/contrib/slapd-modules/smbk5pwd newdoc README.contrib.smbk5pwd libexecdir="/usr/$(get_libdir)/openldap" \ - DESTDIR="${D}" make install-mod || \ + emake DESTDIR="${D}" install-mod || \ die "failed to install smbk5pwd overlay module" fi - if [ -e ${S}/contrib/slapd-tools/statslog ]; then - cd ${S}/contrib/slapd-tools + if [ -e "${S}"/contrib/slapd-tools/statslog ]; then + cd "${S}"/contrib/slapd-tools exeinto /usr/bin newexe statslog ldapstatslog || \ die "failed to install ldapstatslog script" fi - if [ -e ${S}/contrib/slapi-plugins/addrdnvalues/libaddrdnvalues-plugin.so ]; + if [ -e "${S}"/contrib/slapi-plugins/addrdnvalues/libaddrdnvalues-plugin.so ]; then - cd ${S}/contrib/slapi-plugins/addrdnvalues + cd "${S}"/contrib/slapi-plugins/addrdnvalues newdoc README README.contrib.addrdnvalues exeinto /usr/$(get_libdir)/openldap/openldap doexe libaddrdnvalues-plugin.so || \ @@ -450,55 +448,19 @@ src_install() { if use ssl || use samba; then dodir /etc/openldap/ssl exeinto /etc/openldap/ssl - doexe ${FILESDIR}/gencert.sh + doexe "${FILESDIR}"/gencert.sh fi # keep old libs if any - # from 2.1 - for each in ${ROOT}usr/$(get_libdir)/liblber.so.2.0.1* ; do - preserve_old_lib ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap.so.2.0.1* ; do - preserve_old_lib ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap_r.so.2.0.1* ; do - preserve_old_lib ${each} - done - # from 2.2 - for each in ${ROOT}usr/$(get_libdir)/liblber-2.2* ; do - preserve_old_lib ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap-2.2* ; do - preserve_old_lib ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap_r-2.2* ; do - preserve_old_lib ${each} + LIBSUFFIXES=".so.2.0.130 -2.2.so.7" + for LIBSUFFIX in ${LIBSUFFIXES} ; do + for each in lber libldap libldap_r ; do + preserve_old_lib "${ROOT}usr/$(get_libdir)/${each}${LIBSUFFIX}" + done done } pkg_postinst() { - # keep old libs if any - # from 2.1 - for each in ${ROOT}usr/$(get_libdir)/liblber.so.2.0.1* ; do - preserve_old_lib_notify ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap.so.2.0.1* ; do - preserve_old_lib_notify ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap_r.so.2.0.1* ; do - preserve_old_lib_notify ${each} - done - # from 2.2 - for each in ${ROOT}usr/$(get_libdir)/liblber-2.2* ; do - preserve_old_lib_notify ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap-2.2* ; do - preserve_old_lib_notify ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap_r-2.2* ; do - preserve_old_lib_notify ${each} - done - if use ssl; then # make a self-signed ssl cert (if there isn't one there already) if [ ! -e /etc/openldap/ssl/ldap.pem ] @@ -513,15 +475,11 @@ pkg_postinst() { einfo fi 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{,.default} - chmod 0640 /etc/openldap/slapd.conf{,.default} - chown ldap:ldap /var/lib/openldap-{data,ldbm,slurp} + chown ldap:ldap "${ROOT}"var/run/openldap + chmod 0755 "${ROOT}"var/run/openldap + chown root:ldap "${ROOT}"etc/openldap/slapd.conf{,.default} + chmod 0640 "${ROOT}"etc/openldap/slapd.conf{,.default} + chown ldap:ldap "${ROOT}"var/lib/openldap-{data,ldbm,slurp} if use ssl; then ewarn @@ -545,10 +503,10 @@ pkg_postinst() { einfo "/usr/share/doc/${P}/DB_CONFIG.fast.example.gz" einfo - if has_version "<net-nds/openldap-2.3" ; then - echo - einfo - einfo "*** Remember to run revdep-rebuild to update your packages ***" - einfo - fi + LIBSUFFIXES=".so.2.0.130 -2.2.so.7" + for LIBSUFFIX in ${LIBSUFFIXES} ; do + for each in lber libldap libldap_r ; do + preserve_old_lib_notify "${ROOT}usr/$(get_libdir)/${each}${LIBSUFFIX}" + done + done } |