]> Pileus Git - ~andy/sunrise/blob - net-firewall/nufw/nufw-2.0.10.ebuild
net-firewall/nufw: Add certificates
[~andy/sunrise] / net-firewall / nufw / nufw-2.0.10.ebuild
1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit ssl-cert
6
7 DESCRIPTION="An enterprise grade authenticating firewall based on netfilter"
8 HOMEPAGE="http://www.nufw.org/"
9 SRC_URI="http://www.nufw.org/download/${PN}/${P}-1.tar.bz2"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~x86"
14 IUSE="debug gdbm ident ldap mysql pam pam_nuauth pic postgres prelude \
15 unicode nfqueue nfconntrack static"
16
17 DEPEND=">=dev-libs/glib-2
18         dev-libs/libgcrypt
19         >=dev-libs/cyrus-sasl-2
20         net-firewall/iptables
21         >=net-libs/gnutls-1.1
22         gdbm? ( sys-libs/gdbm )
23         ident? ( net-libs/libident )
24         ldap? ( >=net-nds/openldap-2 )
25         mysql? ( dev-db/mysql )
26         pam? ( sys-libs/pam )
27         pam_nuauth? ( sys-libs/pam )
28         postgres? ( dev-db/postgresql )
29         nfqueue? ( net-firewall/libnfnetlink
30                 net-firewall/libnetfilter_queue )
31         nfconntrack? ( net-firewall/libnetfilter_conntrack )"
32 RDEPEND="${DEPEND}"
33
34 src_unpack() {
35         unpack ${A}
36         cd "${S}"
37         sed -i \
38                 -e "s/nuauth-key.pem/nuauth.key/" \
39                 -e "s/nuauth-cert.pem/nuauth.pem/" \
40                 conf/nuauth.conf || die "sed failed"
41 }
42
43 src_compile() {
44         econf \
45                 $(use_enable static) \
46                 $(use_enable pam_nuauth pam-nuauth) \
47                 $(use_with pic) \
48                 $(use_with prelude prelude-log) \
49                 $(use_with mysql mysql-log) \
50                 $(use_with postgres pgsql-log) \
51                 $(use_with pam system-auth) \
52                 $(use_with ldap) \
53                 $(use_with gdbm) \
54                 $(use_with ident) \
55                 $(use_with nfqueue) \
56                 $(use_with nfconntrack) \
57                 $(use_with unicode utf8) \
58                 $(use_enable debug) \
59                 --sysconfdir="/etc/nufw" \
60                 --localstatedir="/var" \
61                 || die "econf failed"
62         emake || die "emake failed"
63 }
64
65 src_install() {
66         emake DESTDIR="${D}" install || die "emake install failed"
67
68         newinitd "${FILESDIR}"/nufw-init.d nufw
69         newconfd "${FILESDIR}"/nufw-conf.d nufw
70
71         newinitd "${FILESDIR}"/nuauth-init.d nuauth
72         newconfd "${FILESDIR}"/nuauth-conf.d nuauth
73
74         insinto /etc/nufw
75         doins conf/nuauth.conf
76         docert nufw
77         docert nuauth
78         keepdir /var/run/nuauth
79
80         dodoc AUTHORS ChangeLog NEWS README TODO
81         docinto scripts
82         dodoc scripts/*
83         docinto conf
84         dodoc conf/*.{nufw,schema,conf,dump,xml}
85 }