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