--- mod_ldap_userdir.orig/mod_ldap_userdir-1.1.4.ebuild 2004-05-12 21:13:04.229397368 +0200 +++ mod_ldap_userdir/mod_ldap_userdir-1.1.4.ebuild 2004-05-12 21:11:22.241901824 +0200 @@ -1,7 +1,7 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. +# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 +# $Header: $ -# supposedly this module also supports apache1, depends on apache2 until tested. detectapache() { local domsg= [ -n "$1" ] && domsg=1 @@ -48,7 +48,8 @@ S=${WORKDIR}/${P} SRC_URI="http://horde.net/~jwm/software/mod_ldap_userdir/mod_ldap_userdir-1.1.4.tar.bz2" -DEPEND="=net-www/apache-2* +DEPEND=" apache2? =net-www/apache-2* + !apache2? =net-www/apache-1* net-nds/openldap" LICENSE="GPL" @@ -57,6 +58,7 @@ src_compile() { local myconf use apache2 && myconf="${myconf} --with-apxs=/usr/sbin/apxs2" + use apache2 || myconf="${myconf} --with-apxs=/usr/sbin/apxs" myconf="${myconf} --with-activate" ./configure ${myconf} || die make clean @@ -70,7 +72,8 @@ exeinto /usr/lib/apache${apache}-extramodules doexe mod_ldap_userdir.so - insinto /etc/apache${apache}/conf/modules.d + use apache2 && insinto /etc/apache${apache}/conf/modules.d + use apache2 || insinto /etc/apache/conf/addon-modules doins ${FILESDIR}/47_mod_ldap_userdir.conf } @@ -79,6 +82,21 @@ if [ -n "${USE_APACHE2}" ] ; then einfo "Adjust /etc/apache2/conf/modules.d/47_mod_ldap_userdir.conf to match your setup and" einfo "add '-D LDAPuserdir' to your APACHE2_OPTS in /etc/conf.d/apache2" + else + einfo + einfo "Execute \"ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config\"" + einfo "to have your apache.conf auto-updated for use with this module." + einfo "You should then edit your /etc/conf.d/apache file to suit." + einfo fi } + + +pkg_config() { + /usr/sbin/apacheaddmod \ + ${ROOT}/etc/apache/conf/apache.conf \ + extramodules/mod_ldap_userdir.so mod_ldap_userdir.c ldap_userdir_module \ + define=LDAPuserdir addconf=conf/addon-modules/47_mod_ldap_userdir.conf +} +