blob: baa42b7564c9fef92c344b80dceaa355ca6d2b73 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-www/mod_auth_nufw/mod_auth_nufw-2.2.0.ebuild,v 1.3 2007/01/15 20:42:29 cedk Exp $
WANT_AUTOCONF="latest"
WANT_AUTOMAKE="latest"
inherit eutils apache-module autotools
KEYWORDS="~x86"
DESCRIPTION="A NuFW authentication module for Apache."
HOMEPAGE="http://www.inl.fr/mod-auth-nufw.html"
SRC_URI="http://software.inl.fr/releases/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
IUSE="ldap mysql postgres"
DEPEND="<=dev-libs/apr-1
mysql? ( virtual/mysql )
postgres? ( dev-db/postgresql )
ldap? ( net-nds/openldap )"
RDEPEND=${DEPEND}
APACHE2_MOD_FILE="mod_auth_nufw.so"
APACHE1_MOD_CONF="50_${PN}"
APACHE1_MOD_DEFINE="AUTH_NUFW"
APACHE2_MOD_CONF="50_${PN}"
APACHE2_MOD_DEFINE="AUTH_NUFW"
DOCFILES="doc/mod_auth_nufw.html"
need_apache
pkg_setup() {
local cnt=0
use mysql && cnt="$((${cnt} + 1))"
use postgres && cnt="$((${cnt} + 1))"
if [[ "${cnt}" -ne 1 ]] ; then
eerror "You have set ${P} to use multiple SQL engines."
eerror "I don't know which to use!"
eerror "You can use /etc/portage/package.use to set per-package USE flags."
eerror "Set it so only one SQL engine type, mysql or postgres, is enabled."
die "Please set only one SQL engine type!"
fi
}
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}/${P}-configure_in.patch"
}
src_compile() {
cd "${S}"
local apx
if [[ ${APACHE_VERSION} -eq '1' ]] ; then
apx=${APXS1}
else
apx=${APXS2}
fi
APR_INCLUDE="-I`apr-config --includedir`"
eautoreconf
econf \
$(use_with apache2 apache20) \
$(use_with ldap ldap-uids) \
$(use_with mysql) \
--with-apxs=${apx} \
CPPFLAGS="${APR_INCLUDE} ${CPPFLAGS}" \
|| die "econf failed"
emake || die "emake failed"
}
|