summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: af7008b382b3b9f13d445b4e8f04bf02750bc869 (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
61
62
63
64
65
66
# 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.r51.ddc3b47
pkgrel=1
arch=("any")
url="https://github.com/lafleurdeboum/servicewall"
#url="https://pypi.python.org/pypi/servicewall"
license=("GPL3")
depends=(
        "python"
        "python-argparse"
        "python-arpreq"
        "python-iptables"
        "python-systemd"
        "ulogd"
        )
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}::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
}