Commit 43638501 authored by Jonny Tyers's avatar Jonny Tyers Committed by Natanael Copa

firehol: new aport

http://www.firehol.org/
simple yet powerful firewall
parent 665fe44e
# Contributor: Jonny Tyers <jtyers@gmail.com>
# Maintainer: Jonny Tyers <jtyers@gmail.com>
pkgname=firehol
pkgver=3.0.1
pkgrel=0
pkgdesc="easy to use but powerful iptables stateful firewall"
url="http://www.firehol.org/"
arch="noarch"
license="GPL2"
depends="bash iprange ipset iptables"
depends_dev=""
makedepends="$depends_dev"
install="$pkgname.post-install"
subpackages="$pkgname-doc"
source="
https://firehol.org/download/firehol/releases/v3.0.1/firehol-3.0.1.tar.bz2
firehol.initd
"
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
build() {
cd "$_builddir"
export LD="$CC"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc/firehol \
--datadir=/usr/share/firehol \
--libexecdir=/usr/lib/firehol \
--mandir=/usr/share/man \
--with-ldflags="$LDFLAGS" \
--disable-doc \
--disable-fireqos \
--disable-vnetbuild \
--disable-man \
--disable-link-balancer \
|| return 1
make || return 1
}
package() {
cd "$_builddir"
#make DESTDIR="$pkgdir" install || return 1
install -m755 -D sbin/firehol \
"$pkgdir"/sbin/$pkgname || return 1
install -m755 -D sbin/update-ipsets \
"$pkgdir"/sbin/update-ipsets || return 1
install -d "$pkgdir"/usr/lib/$pkgname
install -m755 -D sbin/functions.common.sh \
"$pkgdir"/usr/lib/$pkgname/ || return 1
install -m644 -D etc/firehol.conf.example \
"$pkgdir"/etc/firehol.conf.example || return 1
#install -m755 -D "$srcdir"/$pkgname.initd \
#"$pkgdir"/etc/init.d/$pkgname || return 1
}
doc() {
cd "$_builddir"
pkgdesc="$pkgname documentation and contrib files (including dnsbl and systemd unit files)"
install -d "$subpkgdir"/usr/share/doc/$subpkgname
mv examples "$subpkgdir"/usr/share/doc/$subpkgname/
mv html "$subpkgdir"/usr/share/doc/$subpkgname/
mv COPYING "$subpkgdir"/usr/share/doc/$subpkgname/
mv contrib "$subpkgdir"/usr/share/doc/$subpkgname/
}
md5sums="c66069dfec4b14af5ec2f85fe6f71936 firehol-3.0.1.tar.bz2
b65142a9090cc3b6ad9793f9fc09c73c firehol.initd"
sha256sums="4c385a41705023d60d64f76a7cf4c9d7e193097c90a621beaedb91727ce6afea firehol-3.0.1.tar.bz2
86a8a960fd009eaef9a7b5ac56407eb18cac53bf2c26a6bbb9183f5edfbfd2b1 firehol.initd"
sha512sums="36624ce27f03d5fdd42031d30e8ab00b80674d73131204f90ea9d9dec732fcd1359e6e213b59922cc67435a859961065009c18269dd21bf6eb556dca11c06a80 firehol-3.0.1.tar.bz2
e005ad8a663c735dfb88a751ac3772a5c043fb38f3d35fffc569d8bececf02df48db45a5416b799f13bec9b02ad2dc094e2034f56be5a3386684d0e3f47ecf24 firehol.initd"
#!/sbin/openrc-run
name=firehol
daemon=/usr/sbin/$name
depend() {
need net
}
start() {
ebegin "Starting ${name}"
firehol start
eend $?
}
stop() {
ebegin "Stopping ${name}"
firehol stop
eend $?
}
try() {
ebegin "Testing ${name} configuration"
firehol try
eend $?
}
panic() {
ebegin "Putting ${name} in PANIC mode"
firehol panic "$@"
eend $?
}
#!/bin/sh
ln -s /sbin/firehol /etc/init.d/firehol
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment