]> Pileus Git - ~andy/sunrise/blob - net-firewall/tuxguardian/tuxguardian-0.5.ebuild
sunrise/ app-portage/elog-list/elog-list-0.0.6.ebuild: Update header
[~andy/sunrise] / net-firewall / tuxguardian / tuxguardian-0.5.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="1"
6 inherit eutils linux-mod qt3
7
8 DESCRIPTION="An application based firewall for Linux"
9 HOMEPAGE="http://tuxguardian.sourceforge.net/"
10 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~x86"
15 IUSE=""
16
17 DEPEND=">=x11-libs/qt-3.1:3"
18 RDEPEND="${DEPEND}"
19
20 CONFIG_CHECK="SECURITY SECURITY_CAPABILITIES"
21
22 pkg_setup() {
23         linux-mod_pkg_setup
24         if kernel_is lt 2 6 12; then
25                 die "${P} needs a kernel >=2.6.12!"
26         fi
27         MODULE_NAMES="tuxg(extra:${S}/module)"
28         BUILD_PARAMS="KERNEL_SRC=${KERNEL_DIR}"
29 }
30
31 src_unpack() {
32         unpack ${A}
33         cd "${S}"
34         epatch "${FILESDIR}"/${P}-makefile.patch
35         kernel_is gt 2 6 18 && epatch "${FILESDIR}"/${P}-config.h.patch
36 }
37
38 src_compile() {
39         linux-mod_src_compile
40         emake DESTDIR="${D}" || die "emake failed"
41 }
42
43 src_install() {
44         linux-mod_src_install
45         emake DESTDIR="${D}" install || die "install failed"
46         newinitd "${FILESDIR}"/tuxguardian.init tuxguardian
47         linux-mod_pkg_preinst
48         dodoc README AUTHORS
49 }
50
51 pkg_postinst() {
52         elog "Run rc-update add tuxguardian {runlevel} to start this automatically at boot"
53         elog
54         elog "Sometimes the module freezes; to solve this, just run"
55         elog "/etc/init.d/tuxguardian restart"
56         elog
57         elog "tg-frontend frontend unfortunately needs superuser priviledges to run."
58         elog "If you decide not to use the tg-frontend, please refer to the documentation"
59         elog "and edit /etc/daemon.conf accordingly."
60 }