]> Pileus Git - ~andy/sunrise/blob - net-firewall/tuxguardian/tuxguardian-0.5.ebuild
925f28cf25a658ccc5d50b6030d6876a91e08229
[~andy/sunrise] / net-firewall / tuxguardian / tuxguardian-0.5.ebuild
1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils linux-mod qt3
6 DESCRIPTION="Tuxguardian is an appliction based firewall for Linux"
7 HOMEPAGE="http://tuxguardian.sourceforge.net/"
8 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
9 LICENSE="GPL-2"
10 KEYWORDS="~x86"
11 IUSE=""
12 SLOT="0"
13 DEPEND="$(qt_min_version 3.1)"
14 RDEPEND="${DEPEND}"
15
16 pkg_setup() {
17         linux-mod_pkg_setup
18         if kernel_is lt 2 6 12; then
19                 die "${P} needs a kernel >=2.6.12!"
20         fi
21         if ! linux_chkconfig_present SECURITY; then
22                 eerror "${P} needs \"different security models\" in kernel enabled (SECURITY=Y)"
23                 eerror "AND Default Linux Capabilities build as module (SECURITY_CAPABILITIES=M)"
24                 die "Kernel config not suitable"
25         fi
26         if ! linux_chkconfig_module SECURITY_CAPABILITIES; then
27                 eerror "${P} needs \"Default Linux Capabilities\" build as module"
28                 die "Kernel config not suitable"
29         fi
30         MODULE_NAMES="tuxg(extra:${S}/module)"  
31 }
32 src_unpack() {
33         unpack ${A}
34         cd "${S}"
35         epatch "${FILESDIR}"/Makefile-gentoo-0.5.patch
36 }
37 src_compile() {
38         linux-mod_src_compile
39         emake DESTDIR="${D}" || die "emake failed"
40 }
41
42 src_install() {
43         linux-mod_src_install
44         emake DESTDIR="${D}" install
45         newinitd "${FILESDIR}"/tuxguardian.init tuxguardian
46         linux-mod_pkg_preinst
47         dodoc README COPYING AUTHORS
48     
49 }
50
51 pkg_postinst() {
52         elog "Inint script installed. use:"
53         elog "rc-update add tuxguardian {runlevel} (runlevel e.g. boot)"
54         elog "Toubleshooting:"
55         elog "Sometimes it occures, that the module freezes.. Use:"
56         elog "\"etc/init.d/tuxguardian restart\" to solve this"
57         elog "tg-frontend is the frontend to tuxguardian. Unfortunatly it needs superuser rights to run,"
58         elog "so you should use visudo to add a rule to your sudoers file. "
59         elog "Notice: if you decide not to use the tg-frontend please refer to the documentation, how to"
60         elog "edit \"/etc/daemon.conf\""
61 }
62