summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fb6f013e39917cf5d6e41a24427f9eb4c1448be1 (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
# Maintainer: Nocifer <apmichalopoulos at gmail dot com>
# Contributor: Luis Aranguren <pizzaman@hotmail.com>

_pkgname=pyzm
pkgname=python-pyzm-git
pkgver=0.3.56.r333.ff914ce
pkgrel=1
pkgdesc="Python API, Log, Event Server and Memory wrapper for ZoneMinder"
arch=('any')
url="https://github.com/ZoneMinder/pyzm"
license=('GPL2')
depends=('python-dateparser' 'python-dotenv' 'python-imutils' 'python-mysql-connector' 'python-numpy' 'python-pillow' 'python-portalocker'
         'python-progressbar' 'python-psutil' 'python-requests' 'python-shapely' 'python-sqlalchemy' 'python-websocket-client')
makedepends=('git' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel')
source=(git+https://github.com/ZoneMinder/pyzm.git)
sha256sums=('SKIP')

pkgver() {
    cd $_pkgname

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

prepare() {
    cd $_pkgname

    sed -i "s|/etc/zm|/etc/zoneminder|" $_pkgname/ZMLog.py
}

build() {
    cd $_pkgname

    python -m build --wheel --no-isolation
}

package() {
    cd $_pkgname

    python -m installer --destdir="${pkgdir}" dist/*.whl
}