]> Pileus Git - ~andy/sunrise/blob - net-firewall/vuurmuur/vuurmuur-0.8_beta2.ebuild
net-firewall/vuurmuur: Initial ebuild for bug 115697 thanks to TigerP and fredl.
[~andy/sunrise] / net-firewall / vuurmuur / vuurmuur-0.8_beta2.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="2"
6
7 inherit autotools
8
9 MY_PN="Vuurmuur"
10 MY_PV=${PV/_beta/beta}
11 MY_P="${MY_PN}-${MY_PV}"
12
13 DESCRIPTION="Frontend for iptables featuring easy to use command line utils, rule- and logdaemons"
14 HOMEPAGE="http://www.vuurmuur.org"
15 SRC_URI="ftp://ftp.vuurmuur.org/releases/${MY_PV}/${MY_P}.tar.gz"
16
17 LICENSE="GPL-2"
18 SLOT="0"
19 KEYWORDS="~amd64 ~ppc ~x86"
20 IUSE="logrotate"
21
22 RDEPEND="=net-libs/libvuurmuur-${PV}
23         >=sys-libs/ncurses-5
24         logrotate? ( app-admin/logrotate )"
25
26 S="${WORKDIR}/${MY_P}"
27
28 src_unpack() {
29         unpack ${A}
30         cd "${S}"
31         for component in vuurmuur vuurmuur_conf; do
32                 unpack "./${component}-${MY_PV}.tar.gz"
33         done
34 }
35
36 src_prepare() {
37         for component in vuurmuur vuurmuur_conf; do
38                 cd "${S}/${component}-${MY_PV}"
39                 eautoreconf
40         done
41 }
42
43 src_configure() {
44         cd "${S}/vuurmuur-${MY_PV}"
45         econf \
46                 --with-libvuurmuur-includes=/usr/include \
47                 --with-libvuurmuur-libraries=/usr/lib
48         
49         cd "${S}/vuurmuur_conf-${MY_PV}"
50         econf \
51                 --with-libvuurmuur-includes=/usr/include \
52                 --with-libvuurmuur-libraries=/usr/lib \
53                 --with-localedir=/usr/share/locale \
54                 --with-widec=yes
55 }
56
57 src_compile() {
58         for component in vuurmuur vuurmuur_conf; do
59                 cd "${S}/${component}-${MY_PV}"
60                 emake || die "compiling ${component} failed"
61         done
62 }
63
64 src_install() {
65         cd "${S}/vuurmuur-${MY_PV}"
66         emake DESTDIR="${D}" install || die "installing vuurmuur failed"
67
68         newinitd "${FILESDIR}"/vuurmuur.init vuurmuur || die "installing init failed"
69         newconfd "${FILESDIR}"/vuurmuur.conf vuurmuur || die "installing conf failed"
70         
71         insopts -m0600
72         insinto /etc/vuurmuur
73         newins config/config.conf.sample config.conf || die "installing config.conf failed"
74         insopts -m0644
75
76         if use logrotate; then
77                 insinto /etc/logrotate.d
78                 newins scripts/vuurmuur-logrotate vuurmuur || die "installing logrotate config failed"
79         fi
80
81         cd "${S}/vuurmuur_conf-${MY_PV}"
82         emake DESTDIR="${D}" install || die "installing vuurmuur_conf failed"
83         
84         # needed until the wizard scripts are copied by make
85         insopts -m0755
86         insinto /usr/share/scripts
87         doins scripts/*.sh || die "installing vuurmuur scripts failed"
88 }
89
90 pkg_postinst() {
91         elog "Please read the manual on www.vuurmuur.org now - you have"
92         elog "been warned!"
93         elog
94         elog "If this is a new install, make sure you define some rules"
95         elog "BEFORE you start the daemon in order not to lock yourself"
96         elog "out. The necessary steps are:"
97         elog "1) vuurmuur_conf"
98         elog "2) /etc/init.d/vuurmuur start"    
99         elog "3) rc-update add vuurmuur default"
100 }