You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
1.8 KiB
83 lines
1.8 KiB
2 years ago
|
# Copyright 1999-2022 Gentoo Authors
|
||
8 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
2 years ago
|
EAPI=8
|
||
8 years ago
|
|
||
5 years ago
|
inherit perl-functions
|
||
8 years ago
|
|
||
|
PATCHVER=0.2
|
||
|
MY_PN=${PN/b/B}
|
||
|
MY_P=${MY_PN}-${PV}
|
||
|
DESCRIPTION="Bastille-Linux is a security hardening tool"
|
||
5 years ago
|
HOMEPAGE="http://bastille-linux.sourceforge.net/"
|
||
8 years ago
|
SRC_URI="mirror://sourceforge/${PN}-linux/${MY_P}.tar.bz2
|
||
|
mirror://gentoo/${P}-gentoo-${PATCHVER}.patch.bz2"
|
||
2 years ago
|
S="${WORKDIR}"/${MY_PN}
|
||
8 years ago
|
|
||
5 years ago
|
LICENSE="GPL-2+"
|
||
8 years ago
|
SLOT="0"
|
||
5 years ago
|
KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
|
||
8 years ago
|
IUSE="X"
|
||
|
|
||
|
RDEPEND="
|
||
|
app-admin/logrotate
|
||
2 years ago
|
dev-lang/perl
|
||
8 years ago
|
dev-perl/Curses
|
||
5 years ago
|
net-firewall/iptables
|
||
8 years ago
|
net-firewall/psad
|
||
|
virtual/logger
|
||
5 years ago
|
X? ( dev-perl/Tk )
|
||
8 years ago
|
"
|
||
|
|
||
|
PATCHES=(
|
||
|
"${WORKDIR}"/${P}-gentoo-${PATCHVER}.patch
|
||
|
# make sure the Perl modules go into vendor dir
|
||
|
"${FILESDIR}/${P}-perl.patch"
|
||
|
# prevent file collision, bug 536292
|
||
|
"${FILESDIR}/${P}-renamewidgets.patch"
|
||
|
# openrc runscript rename
|
||
|
"${FILESDIR}/${P}-openrc.patch"
|
||
|
)
|
||
|
|
||
|
src_prepare() {
|
||
|
perl_set_version
|
||
|
|
||
|
default
|
||
|
|
||
|
cd "${S}" || die
|
||
|
chmod a+x Install.sh bastille-ipchains bastille-netfilter || die
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
perl_set_version
|
||
|
export VENDOR_LIB
|
||
|
|
||
|
cd "${S}" || die
|
||
|
DESTDIR="${D}" ./Install.sh || die
|
||
|
|
||
|
# Example configs
|
||
|
cd "${S}" || die
|
||
|
insinto /usr/share/Bastille
|
||
|
doins *.config
|
||
|
|
||
|
newinitd ${PN}-firewall.gentoo-init ${PN}-firewall
|
||
|
|
||
2 years ago
|
# See bug #455542
|
||
|
keepdir /var/lock/subsys
|
||
|
keepdir /var/lock/bastille
|
||
|
keepdir /var/lock/subsys/bastille
|
||
|
|
||
8 years ago
|
# Documentation
|
||
|
cd "${S}" || die
|
||
|
dodoc *.txt BUGS Change* README*
|
||
|
cd "${S}"/docs || die
|
||
|
doman *.1m
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
elog "Please be aware that when using the Server Lax, Server Moderate, or"
|
||
|
elog "Server Paranoia configurations, you may need to use InteractiveBastille"
|
||
|
elog "to set any advanced network information, such as masquerading and"
|
||
|
elog "internal interfaces, if you plan to use them."
|
||
|
}
|