1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit eutils apache-module autotools
9 DESCRIPTION="mod_auth_nufw A NuFW authentication module for apache"
10 HOMEPAGE="http://www.inl.fr/mod-auth-nufw.html"
11 SRC_URI="http://software.inl.fr/releases/${PN}/${P}.tar.gz"
16 IUSE="apache2 mysql postgres ldap"
19 mysql? ( virtual/mysql )
20 postgres? ( dev-db/postgresql )
21 ldap? ( net-nds/openldap )"
24 APACHE2_MOD_FILE="mod_auth_nufw.so"
26 APACHE1_MOD_CONF="50_${PN}"
27 APACHE1_MOD_DEFINE="AUTH_NUFW"
29 APACHE2_MOD_CONF="50_${PN}"
30 APACHE2_MOD_DEFINE="AUTH_NUFW"
32 DOCFILES="doc/mod_auth_nufw.html"
38 use mysql && cnt="$((${cnt} + 1))"
39 use postgres && cnt="$((${cnt} + 1))"
40 if [[ "${cnt}" -ne 1 ]] ; then
41 eerror "You have set ${P} to use multiple sql engine."
42 eerror "I don't know which to use!"
43 eerror "You can use /etc/portage/package.use to set per-package USE flags"
44 eerror "Set it so only one sql engine type mysql, postgres"
45 die "Please set only one sql engine type"
53 epatch "${FILESDIR}/${P}-configure_in.patch"
60 if [ ${APACHE_VERSION} -eq '1' ]; then
66 APR_INCLUDE="-I`apr-config --includedir`"
70 $(use_with apache2 apache20) \
72 $(use_with ldap ldap-uids) \
74 CPPFLAGS="${APR_INCLUDE} ${CPPFLAGS}" \
76 emake || die "emake failed"