diff options
author | Jonny Tyers <jtyers@gmail.com> | 2016-08-21 22:44:06 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-09-22 10:52:39 +0000 |
commit | 436385011f65c60368f8d5ed4f6243199a5bd1aa (patch) | |
tree | e6b445e45837d5a5b64169fad967463aff67d09a /testing | |
parent | 665fe44e4f0b990b3694f54138754fc870056f0f (diff) | |
download | aports-436385011f65c60368f8d5ed4f6243199a5bd1aa.tar.bz2 aports-436385011f65c60368f8d5ed4f6243199a5bd1aa.tar.xz |
firehol: new aport
http://www.firehol.org/
simple yet powerful firewall
Diffstat (limited to 'testing')
-rw-r--r-- | testing/firehol/APKBUILD | 90 | ||||
-rw-r--r-- | testing/firehol/firehol.initd | 33 | ||||
-rw-r--r-- | testing/firehol/firehol.post-install | 3 |
3 files changed, 126 insertions, 0 deletions
diff --git a/testing/firehol/APKBUILD b/testing/firehol/APKBUILD new file mode 100644 index 0000000000..a64fe951d2 --- /dev/null +++ b/testing/firehol/APKBUILD @@ -0,0 +1,90 @@ +# 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" diff --git a/testing/firehol/firehol.initd b/testing/firehol/firehol.initd new file mode 100644 index 0000000000..88f3826953 --- /dev/null +++ b/testing/firehol/firehol.initd @@ -0,0 +1,33 @@ +#!/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 $? +} + diff --git a/testing/firehol/firehol.post-install b/testing/firehol/firehol.post-install new file mode 100644 index 0000000000..c57fbaf056 --- /dev/null +++ b/testing/firehol/firehol.post-install @@ -0,0 +1,3 @@ +#!/bin/sh + +ln -s /sbin/firehol /etc/init.d/firehol |