summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0f5f5c1a96706482e2b4bd8eb9f089c85a6cbcf4 (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
# Maintainer: Bart Libert <aur@bart.libert.email>
pkgname=python-barcode-git
_pkgname=python_barcode
pkgver=v0.13.1.r90.g51a7a9f
pkgrel=1
pkgdesc="Create standard barcodes with Python. No external modules needed. (git version)"
arch=('any')
license=('MIT')
conflicts=('python-barcode')
provides=('python-barcode')
url="https://github.com/WhyNotHugo/python-barcode"
depends=('python')
optdepends=('python-pillow: generate images')
makedepends=('python-setuptools' 'python-pip' 'git')
source=(
        "$pkgname::git+https://github.com/WhyNotHugo/python-barcode.git"
    )
sha256sums=('SKIP')

pkgver() {
    cd $pkgname
    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd $pkgname
    python setup.py build
}

package() {
    cd $pkgname
    python setup.py install --root="$pkgdir" --optimize=1
    install -Dm644 LICENCE -t "$pkgdir/usr/share/licenses/$pkgname"
}