diff options
author | lafleurdeboum | 2019-04-07 22:16:50 +0200 |
---|---|---|
committer | lafleur | 2019-04-07 22:22:42 +0200 |
commit | e00440a3b90a04a66fd1101c0b3c9d9af53729a0 (patch) | |
tree | 81999c204d977cf2d246c735e4d1233a7507defb | |
download | aur-e00440a3b90a04a66fd1101c0b3c9d9af53729a0.tar.gz |
initial PKGBUILD for servicewall firewall
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | PKGBUILD | 48 | ||||
-rw-r--r-- | servicewall.install | 21 |
3 files changed, 96 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..1d624d05421c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,27 @@ +pkgbase = servicewall-git + pkgdesc = The firewall that remembers the different networks you connect to. + pkgver = 0.4.2.r4.a60e19f + pkgrel = 1 + url = https://github.com/lafleurdeboum/servicewall + install = servicewall.install + arch = any + license = GPL3 + makedepends = python-distribute + makedepends = python-setuptools + makedepends = git + depends = python + depends = python-iptables + depends = python-argparse + depends = python-netifaces + depends = python-systemd + depends = ulogd + optdepends = python-argcomplete + optdepends = networkd-dispatcher + optdepends = networkmanager + backup = etc/servicewall/realms.json + backup = etc/servicewall/config.json + source = servicewall::git://localhost/ + md5sums = SKIP + +pkgname = servicewall-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..021e8955e54d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: la Fleur <lafleur chez boum.org> +# Contributor: la Fleur <lafleur chez boum.org> + +# This is the git PKGBUILD for servicewall + +_pkgname=servicewall +pkgname=servicewall-git +pkgdesc="The firewall that remembers the different networks you connect to." +pkgver=0.4.2.r4.a60e19f +pkgrel=1 +arch=("any") +url="https://github.com/lafleurdeboum/servicewall" +#url="https://pypi.python.org/pypi/servicewall" +license=("GPL3") +depends=("python" "python-iptables" "python-argparse" "python-netifaces" "python-systemd" "ulogd") +optdepends=("python-argcomplete" "networkd-dispatcher" "networkmanager") +makedepends=("python-distribute" "python-setuptools" "git") +install=servicewall.install +backup=("etc/servicewall/realms.json" "etc/servicewall/config.json") + +# Sources for git repos : +source=("${pkgname%-git}::git+https://github.com/lafleurdeboum/${_pkgname}.git") + +# Sources for non-git repos : +#options=(!emptydirs) +#source=("https://pypi.python.org/packages/source/p/${_pkgname}/${_pkgname}-${pkgver}.tar.bz2") + +md5sums=("SKIP") + + +pkgver() { + #cd "${srcdir}/${_pkgname}-${pkgver}" + cd "${srcdir}/${pkgname%-git}" + # git, no tags available + #printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + # Git, tags available + printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')" +} + +build() { + cd "${srcdir}/${pkgname%-git}" + python setup.py build +} + +package() { + cd "${srcdir}/${pkgname%-git}" + python setup.py install --root="${pkgdir}/" --optimize=1 --skip-build +} diff --git a/servicewall.install b/servicewall.install new file mode 100644 index 000000000000..ae43ecf33206 --- /dev/null +++ b/servicewall.install @@ -0,0 +1,21 @@ +## arg 1: the new package version +post_install() { + braise status | grep -q "enabled" || ( + echo "To enable ServiceWall, issue a\n\t# braise enable" + ) +} + +## arg 1: the new package version +## arg 2: the old package version +post_upgrade() { + braise status | grep -q "enabled" && ( + echo "reloading ServiceWall"; + braise reload + ) +} + +## arg 1: the old package version +pre_remove() { + echo "disabling ServiceWall"; + braise disable +} |