vuurmuur and appropriate library

This commit is contained in:
Georgy Kovtunov
2012-02-04 12:12:03 +04:00
parent 90a22a14fd
commit ce1bca1b79
7 changed files with 274 additions and 0 deletions

View File

@ -0,0 +1,4 @@
AUX vuurmuur.conf 312 RMD160 d28da3c2abe1c6ec3fc5060576670e871965899c SHA1 b2e66191901fbae74dade2842a01cb6765fd5732 SHA256 9aeb5a2e3a7ebce5d240a2c1986cc700ce4a21d4cb50fac7f3851e965ab7862d
AUX vuurmuur.init 1257 RMD160 66087fa191a5a344d6671ff4aec2fb2f0315fc2d SHA1 7883be040d44ab925425c5eb2994dc85dbf5c7d4 SHA256 3179f7092f180a5287a6d0ed4519313df762f25a4de50acc376c5905729e0cae
DIST Vuurmuur-0.8beta2.tar.gz 1877270 RMD160 d1f202adb5ab076ea7763c215faec2558100d5b6 SHA1 549cc3b7d8c86cac0cbccbb963a3b3d041e8ea70 SHA256 4c74de94698a0a4bca758322b5e4198afc27fb25401309a7ecff445742f28d0e
EBUILD vuurmuur-0.8_beta2.ebuild 2657 RMD160 80b00fef3e213eafe0a608b4ec98f15eef2c7b53 SHA1 6c49cf1bac909d40e7cc9e2414bcde48d617ce27 SHA256 300afcc8db1c1e12ea9fa9e8ea408e52388636b94b19a6fe5e86e6e9c90a1298

View File

@ -0,0 +1,11 @@
# Space separated list of kernel modules to load on start or 'none'.
MODULES="none"
# Configuration file to read.
CONFIG=/etc/vuurmuur/config.conf
# Options to be passed to the Vuurmuur daemon.
OPTIONS="-l"
# Comment the following line if you want more output when starting/stopping the daemons.
QUIET="true"

View File

@ -0,0 +1,57 @@
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
opts="${opts}"
# this next comment is important, don't remove it - it has to be somewhere in
# the init script to kill off a warning that doesn't apply to us
# svc_start svc_stop
depend() {
need net iptables
use modules
}
load_modules() {
if [ "${MODULES}" != "none" ]; then
ebegin "Loading modules for Vuurmuur"
local module
echo -n " "
for module in `echo ${MODULES}`; do
modprobe ${module}
echo -n "${module} "
done
echo
eend $?
fi
}
start() {
if load_modules ; then
ebegin "Starting Vuurmuur"
if test ! -f ${CONFIG}; then
eerror "Configuration file, ${CONFIG} does not exist."
eend 2
return 2
fi
start-stop-daemon --start ${QUIET+--quiet} --exec /usr/bin/vuurmuur -- ${OPTIONS}
eend $?
ebegin "Starting Vuurmuur Log"
start-stop-daemon --start ${QUIET+--quiet} --exec /usr/bin/vuurmuur_log
eend $?
else
eend 1
return 1
fi
}
stop() {
ebegin "Stopping Vuurmuur"
start-stop-daemon --stop ${QUIET+--quiet} --pidfile /var/run/vuurmuur.pid
eend $?
ebegin "Stopping Vuurmuur Log"
start-stop-daemon --stop ${QUIET+--quiet} --exec /usr/bin/vuurmuur_log
eend $?
}

View File

@ -0,0 +1,101 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit multilib
MY_PV=${PV/_beta/beta}
MY_P="Vuurmuur-${MY_PV}"
DESCRIPTION="Frontend for iptables featuring easy to use command line utils, rule- and logdaemons"
HOMEPAGE="http://www.vuurmuur.org"
SRC_URI="ftp://ftp.vuurmuur.org/releases/${MY_PV}/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="logrotate"
DEPEND="=net-libs/libvuurmuur-${PV}
>=sys-libs/ncurses-5"
RDEPEND="${DEPEND}
logrotate? ( app-admin/logrotate )"
S="${WORKDIR}/${MY_P}/${PN}-${MY_PV}"
src_unpack() {
default
cd ${MY_P}
for component in vuurmuur vuurmuur_conf; do
unpack "./${component}-${MY_PV}.tar.gz" # upstream supplies tarball inside tarball
done
}
src_configure() {
econf \
--with-libvuurmuur-includes=/usr/include \
--with-libvuurmuur-libraries=/usr/$(get_libdir)
cd "../vuurmuur_conf-${MY_PV}"
econf \
--with-libvuurmuur-includes=/usr/include \
--with-libvuurmuur-libraries=/usr/$(get_libdir) \
--with-localedir=/usr/share/locale \
--with-widec=yes
}
src_compile() {
# einfo "Running autoreconf"
# autoreconf -f -i || die "autoreconf failed"
##from old ebuild
#einfo "pwd: ${PWD}"
## cd ${WORKDIR}/${MY_PKG_NAME}-${PV/_/}/${PN/-/_}-${PV/_/} || die
libtoolize -f
aclocal
autoheader
automake
autoconf
econf --with-libvuurmuur-includes=/usr/include \
--with-libvuurmuur-libraries=/usr/lib --with-localedir=/usr/share/locale \
--with-widec=yes \
|| die "The configure script failed"
# default
emake -C "../vuurmuur_conf-${MY_PV}" || die "compiling vuurmuur_conf failed"
}
src_install() {
emake DESTDIR="${D}" install || die "installing vuurmuur failed"
newinitd "${FILESDIR}"/vuurmuur.init vuurmuur || die "installing init failed"
newconfd "${FILESDIR}"/vuurmuur.conf vuurmuur || die "installing conf failed"
if use logrotate; then
insinto /etc/logrotate.d
newins scripts/vuurmuur-logrotate vuurmuur || die "installing logrotate config failed"
fi
insopts -m0600
insinto /etc/vuurmuur
newins config/config.conf.sample config.conf || die "installing config.conf failed"
cd "../vuurmuur_conf-${MY_PV}"
emake DESTDIR="${D}" install || die "installing vuurmuur_conf failed"
}
pkg_postinst() {
elog "Please read the manual on www.vuurmuur.org now - you have"
elog "been warned!"
elog
elog "If this is a new install, make sure you define some rules"
elog "BEFORE you start the daemon in order not to lock yourself"
elog "out. The necessary steps are:"
elog "1) vuurmuur_conf"
elog "2) /etc/init.d/vuurmuur start"
elog "3) rc-update add vuurmuur default"
}