summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9d5b0ccfd847c69ec1749c4f32794f7032f6ad06 (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
# Maintainer: Luis Aranguren <pizzaman@hotmail.com>

pkgname=python-pyzm-git
_name=pyzm
pkgver=0.2.9.r161.161ebae
pkgrel=1
pkgdesc="ZoneMinder Python API and Logger"
arch=('any')
depends=()
makedepends=('python-setuptools' 'python-nose' 'git')
url="https://github.com/pliablepixels/pyzm"
license=('GPL2')
options=('!emptydirs')
source=(git://github.com/pliablepixels/pyzm.git)
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/$_name"
  printf "%s.r%s.%s" "$(awk -F\" 'NR==1{print $2}' pyzm/__init__.py)" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd "$srcdir/$_name"
  sed -i "s|/etc/zm|/etc/zoneminder|" pyzm/ZMLog.py
}

build() {
  cd "$srcdir/$_name"
  python setup.py build
}

check(){
    cd "$srcdir/$_name"

    # For nosetests
    nosetests
}

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