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