/[gentoo-x86]/net-firewall/firehol/firehol-1.273-r3.ebuild
Gentoo

Contents of /net-firewall/firehol/firehol-1.273-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Wed Aug 22 17:01:16 2012 UTC (6 years ago) by johu
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -2 lines
Stable for x86, wrt bug #429162

(Portage version: 2.2.0_alpha121/cvs/Linux x86_64)

1 xmw 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 johu 1.3 # $Header: /var/cvsroot/gentoo-x86/net-firewall/firehol/firehol-1.273-r3.ebuild,v 1.2 2012/08/03 18:15:18 ago Exp $
4 xmw 1.1
5     EAPI=4
6     inherit eutils linux-info
7    
8     DESCRIPTION="iptables firewall generator"
9     HOMEPAGE="http://firehol.sourceforge.net/"
10     SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
11    
12     LICENSE="GPL-2"
13     SLOT="0"
14     IUSE=""
15 johu 1.3 KEYWORDS="amd64 ~ppc ~sparc x86"
16 xmw 1.1
17     DEPEND="sys-apps/iproute2"
18     RDEPEND="net-firewall/iptables
19     sys-apps/iproute2[-minimal]
20     virtual/modutils
21     || (
22     net-misc/wget
23     net-misc/curl
24     )"
25    
26     src_prepare() {
27     epatch "${FILESDIR}"/${P}-CVE-2008-4953.patch
28     epatch "${FILESDIR}"/${P}-log-output.patch #332507
29     }
30    
31     pkg_setup() {
32     local KCONFIG_OPTS="~NF_CONNTRACK_IPV4 ~NF_CONNTRACK_MARK ~NF_NAT ~NF_NAT_FTP ~NF_NAT_IRC \
33     ~IP_NF_IPTABLES ~IP_NF_FILTER ~IP_NF_TARGET_REJECT ~IP_NF_TARGET_LOG ~IP_NF_TARGET_ULOG \
34     ~IP_NF_TARGET_MASQUERADE ~IP_NF_TARGET_REDIRECT ~IP_NF_MANGLE \
35     ~NETFILTER_XT_MATCH_LIMIT ~NETFILTER_XT_MATCH_STATE ~NETFILTER_XT_MATCH_OWNER"
36    
37     get_version
38     if [ ${KV_PATCH} -ge 25 ]; then
39     CONFIG_CHECK="~NF_CONNTRACK ${KCONFIG_OPTS}"
40     else
41     CONFIG_CHECK="~NF_CONNTRACK_ENABLED ${KCONFIG_OPTS}"
42     fi
43     linux-info_pkg_setup
44     }
45    
46     src_install() {
47     newsbin firehol.sh firehol
48    
49     dodir /etc/firehol /etc/firehol/examples /etc/firehol/services
50     insinto /etc/firehol/examples
51     doins examples/* || die
52    
53     newconfd "${FILESDIR}"/firehol.conf.d firehol
54     newinitd "${FILESDIR}"/firehol.initrd.1 firehol
55    
56     dodoc ChangeLog README TODO WhatIsNew
57     dohtml doc/*.html doc/*.css
58    
59     docinto scripts
60     dodoc get-iana.sh adblock.sh
61    
62     doman man/*.1 man/*.5
63    
64     # Install this RESERVED_IPS as discussed in bug #332135
65     insinto /etc/firehol
66     doins "${FILESDIR}"/RESERVED_IPS
67     }
68    
69     pkg_postinst() {
70     elog "The default path to firehol's configuration file is /etc/firehol/firehol.conf"
71     elog "See /etc/firehol/examples for configuration examples."
72     #
73     # Install a default configuration if none is available yet
74     if [[ ! -e "${ROOT}/etc/firehol/firehol.conf" ]]; then
75     einfo "Installing a sample configuration as ${ROOT}/etc/firehol/firehol.conf"
76     cp "${ROOT}/etc/firehol/examples/client-all.conf" "${ROOT}/etc/firehol/firehol.conf"
77     fi
78     }

  ViewVC Help
Powered by ViewVC 1.1.20