1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-firewall/firehol/firehol-1.273-r3.ebuild,v 1.3 2012/08/22 17:01:16 johu Exp $
6 inherit eutils linux-info
11 DESCRIPTION
="iptables firewall generator"
12 HOMEPAGE
="http://firehol.sourceforge.net/"
13 SRC_URI
="http://firehol.org/download/releases/v${PPV}/${PP}.tar.gz"
17 KEYWORDS
="~amd64 ~ppc ~sparc ~x86"
19 DEPEND
="sys-apps/iproute2"
20 RDEPEND
="net-firewall/iptables
21 sys-apps/iproute2[-minimal]
29 local KCONFIG_OPTS
="~NF_CONNTRACK_IPV4 ~NF_CONNTRACK_MARK ~NF_NAT ~NF_NAT_FTP ~NF_NAT_IRC \
30 ~IP_NF_IPTABLES ~IP_NF_FILTER ~IP_NF_TARGET_REJECT ~IP_NF_TARGET_LOG ~IP_NF_TARGET_ULOG \
31 ~IP_NF_TARGET_MASQUERADE ~IP_NF_TARGET_REDIRECT ~IP_NF_MANGLE \
32 ~NETFILTER_XT_MATCH_LIMIT ~NETFILTER_XT_MATCH_STATE ~NETFILTER_XT_MATCH_OWNER"
35 if [ ${KV_PATCH} -ge 25 ]; then
36 CONFIG_CHECK
="~NF_CONNTRACK ${KCONFIG_OPTS}"
38 CONFIG_CHECK
="~NF_CONNTRACK_ENABLED ${KCONFIG_OPTS}"
44 emake DESTDIR
="${D}" install
45 dodir
/etc
/firehol
/etc
/firehol
/examples
/etc
/firehol
/services
46 insinto
/etc
/firehol
/examples
47 doins examples
/* || die
49 newconfd
"${FILESDIR}"/firehol.conf.d firehol
50 newinitd
"${FILESDIR}"/firehol.initrd
.1 firehol
52 dodoc ChangeLog README NEWS
53 dohtml
doc
/*.html
doc
/*.css
55 doman
doc
/man
/man
1/*.1 doc
/man
/man
5/*.5
57 # Install this RESERVED_IPS as discussed in bug #332135
59 doins
"${FILESDIR}"/RESERVED_IPS
63 elog
"The default path to firehol's configuration file is /etc/firehol/firehol.conf"
64 elog
"See /etc/firehol/examples for configuration examples."
66 # Install a default configuration if none is available yet
67 if [[ ! -e "${ROOT}/etc/firehol/firehol.conf" ]]; then
68 einfo
"Installing a sample configuration as ${ROOT}/etc/firehol/firehol.conf"
69 cp "${ROOT}/etc/firehol/examples/client-all.conf" "${ROOT}/etc/firehol/firehol.conf"