aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ufw/APKBUILD
blob: dbf6ab2d4daaf9801028c48811ae9d6c21b74970 (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
# Contributor: Danilo Falcão <danilo@falcao.org>
# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Maintainer:
pkgname=ufw
pkgver=0.36
pkgrel=2
pkgdesc="Uncomplicated CLI tool managing a netfilter firewall"
url="https://launchpad.net/ufw"
arch="noarch"
license="GPL-3.0-or-later"
options="!check" # 3 tests fails
depends="iptables ip6tables python3"
subpackages="$pkgname-doc $pkgname-openrc $pkgname-bash-completion:bashcomp:noarch"
source="https://launchpad.net/$pkgname/$(echo $pkgver|cut -c1-4)/$pkgver/+download/$pkgname-$pkgver.tar.gz
	$pkgname.initd
	fix-lib_path.patch
	"

check() {
	sh run_tests.sh
}

package() {
	python3 setup.py install --root="$pkgdir"

	install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	chmod 644 "$pkgdir"/etc/ufw/*.rules
}

bashcomp() {
	depends=""
	pkgdesc="Bash completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

	mkdir -p "$subpkgdir"/usr/share/bash-completion/completions
	install -m 644 "$builddir"/shell-completion/bash \
	"$subpkgdir"/usr/share/bash-completion/completions/ufw
}

sha512sums="b32d7f79f43c203149c48b090ee0d063df78fcf654344ee11066a7363e799a62b046758ffe02b8bd15121545ac2a6b61df21fe56f8b810319fe4dd562cbdadb3  ufw-0.36.tar.gz
b0405525a22bfa70f656ec3685a0aa509645d52771465a3fc068e789cd4bbf86e8409cb4021200794729dcba3c10c99d5c2ba06ae91eca9e3b942a407525e6d5  ufw.initd
86b29ff76f6d858cacdf677be5e08daad0b203a27b65ea40da69e11a97d66d93bd60690ee2563b26d8e6b1e89e7fc72d76ebb15dff9e5a38080cb9a799e96f16  fix-lib_path.patch"