summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6f33e139cfd5a1b28c97f4ec30a47cd20effb0b1 (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
58
59
60
# Maintainer: la Fleur <lafleur chez boum.org>
# Contributor: la Fleur <lafleur chez boum.org>

# This is the git PKGBUILD for servicewall

pkgname=servicewall-git
_pkgname=${pkgname%-git}
pkgdesc="The firewall that remembers the different networks you connect to."
pkgver=0.4.5.r3.cb42cef
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-arpreq"
    "python-systemd"
    "ulogd"
)
provides=("$_pkgname")
conflicts=("$_pkgname")
optdepends=("python-argcomplete" "networkd-dispatcher" "networkmanager")
makedepends=("python-distribute" "python-setuptools" "git")
install=servicewall.install
backup=(
    "etc/servicewall/realms.json"
)

# Sources for git repos :
source=("${_pkgname}::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, 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}"
  python setup.py build
}

package() {
  cd "${srcdir}/${_pkgname}"
  python setup.py install --root="${pkgdir}/" --optimize=1 --skip-build
}