aboutsummaryrefslogtreecommitdiffstats
path: root/main/ferm/APKBUILD
blob: 4377ad767123dd0f4fc5349f143312f7546efc3e (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
48
49
50
51
52
53
54
55
56
57
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Michael Mason <ms13sp@gmail.com>
pkgname=ferm
pkgver=2.5
pkgrel=0
case $pkgver in
	*.*.*)  _pkgver=${pkgver%.*};;
	*.*) _pkgver=$pkgver;;
esac

pkgdesc="firewall configuration tool"
url="http://ferm.foo-projects.org/"
arch="noarch"
license="GPL"
depends="perl iptables"
makedepends="perl iptables perl-net-dns-resolver-mock"
source="
	http://ferm.foo-projects.org/download/${_pkgver}/ferm-$pkgver.tar.xz
	ferm.confd
	ferm.initd
	"
subpackages="$pkgname-doc $pkgname-openrc"
builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	install -m755 -D src/ferm "$pkgdir/usr/sbin/$pkgname"
	install -m755 -D src/import-ferm "$pkgdir/usr/sbin/import-$pkgname"

	install -m644 -D doc/ferm.1 "$pkgdir/usr/share/man/man1/ferm.1"
	install -m644 -D doc/import-ferm.1 \
		"$pkgdir/usr/share/man/man1/import-ferm.1"
	install -m644 -D doc/ferm.txt "$pkgdir/usr/share/doc/ferm.txt"
	install -m644 -D doc/ferm.html "$pkgdir/usr/share/html/ferm.html"

	install -m644 -D "$srcdir/ferm.confd" "$pkgdir/etc/conf.d/$pkgname"
	install -m755 -D "$srcdir/ferm.initd" "$pkgdir/etc/init.d/$pkgname"
}

openrc() {
	mkdir -p "$subpkgdir"
	mv "$pkgdir/etc" "$subpkgdir/"
	install_if="openrc ferm=$pkgver-r$pkgrel"
}
sha512sums="f456141c939aaac390b27893d88eb5d532139cbe7bc33dd794f6b09b31ff218990c6ba76f2817c531cefeb948d6ee51e4b7ee092492cd9e5e711f794e4005399  ferm-2.5.tar.xz
26e4673f7c8d0f77eb1d8fdc2051f1a3729e482b075346c65e39305e29014391c390c682cd597cf3dc67fa0f9fe69818e928c41cb362814a69fc67e8bbdf7ad5  ferm.confd
c36a275d7abeac7dcb17240311b47007aafa8e07e4fd50ce45af3d79e713627624d26eea1bffe7854824f2c174a18524669cedab510ca9cea1565dda4606d394  ferm.initd"