summaryrefslogtreecommitdiff
blob: 6e06a35a68a294607e4176f36dcbbb8c61447998 (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
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-firewall/gshield/gshield-2.8-r3.ebuild,v 1.3 2014/07/18 12:33:32 jer Exp $

EAPI=5

DESCRIPTION="iptables firewall configuration system"
HOMEPAGE="http://muse.linuxmafia.org/gshield.html"
SRC_URI="ftp://muse.linuxmafia.org/pub/gShield/v2/gShield-${PV}.tgz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc x86"

RDEPEND="
	net-dns/bind-tools
	net-firewall/iptables
	virtual/logger
"

S=${WORKDIR}/gShield-${PV}

src_install() {
	# install config files
	dodir /etc/gshield
	cp -pPR * "${D}"/etc/gshield || die
	ln -s gshield "${D}"/etc/firewall || die

	# get rid of docs from config
	rm -r "${D}"/etc/gshield/{Changelog,INSTALL,LICENSE,docs} || die

	# move non-config stuff out of config, but make symlinks
	dodir /usr/share/gshield/routables
	for q in gShield-version gShield.rc tools sourced routables/routable.rules
	do
		mv "${D}"/etc/gshield/$q "${D}"/usr/share/gshield/ || die
		ln -s /usr/share/gshield/$q "${D}"/etc/gshield/$q || die
	done
	chmod -R u+rwX "${D}"/etc/gshield || die

	# install init script
	newinitd "${FILESDIR}"/gshield.init gshield
	chmod -R u+rwx "${D}"/etc/init.d/gshield || die

	# install docs
	dodoc Changelog docs/*
}