summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 304ce738afef1c25a193e104b64e39a24a3ef23d (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
# Maintainer: Łaurent ʘ❢Ŧ Ŧough <laurent dot fough at gmail dot com>
pkgname='alluvium-git'
_pkgname='alluvium'
pkgver=20200614.r4_bc9fed7
pkgrel=1
pkgdesc='Generate visual overlays from your i3 bindings'
url='https://github.com/cqql/alluvium'
depends=('python')
makedepends=('python-setuptools' 'git')
checkdepends=('python-pytest')
license=('GPL3')
arch=('x86_64')
provides=("alluvium")
conflicts=("alluvium")
sha256sums=('SKIP')

BUILDENV+=('!check')

source=(
	"$_pkgname::git+https://github.com/cqql/alluvium/#branch=${BRANCH:-master}"
)

pkgver() {
	cd "${srcdir}/${_pkgname}"
		local DATE=$(git log -1 --format="%cd" --date=short | sed s/-//g)
		local COUNT=$(git rev-list --count HEAD)
		local COMMIT=$(git rev-parse --short HEAD)
		printf "%s.r%s_%s" "$DATE" "${COUNT}" "${COMMIT}"
}

check() {
    cd "${srcdir}/${_pkgname}"
    pytest
}

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

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