void-packages/srcpkgs/python-pyzbar/template

36 lines
1.0 KiB
Bash
Raw Normal View History

2018-09-26 21:55:21 +02:00
# Template file for 'python-pyzbar'
pkgname=python-pyzbar
version=0.1.7
2018-10-03 14:46:57 +02:00
revision=3
2018-09-26 21:55:21 +02:00
noarch=yes
wrksrc="pyzbar-${version}"
build_style=python-module
pycompile_module="pyzbar"
hostmakedepends="python-setuptools python3-setuptools"
2018-10-03 14:46:57 +02:00
depends="libzbar python-enum34 python-pathlib"
2018-09-26 21:55:21 +02:00
short_desc="Read one-dimensional barcodes and QR codes"
maintainer="Rasmus Thomsen <rasmus.thomsen@protonmail.com>"
license="MIT"
homepage="https://github.com/NaturalHistoryMuseum/pyzbar/"
distfiles="https://github.com/NaturalHistoryMuseum/pyzbar/archive/v${version}.tar.gz"
checksum=4dbbece533650f2aeb6c8d1f41cf424614d2877d7331c48a9eed35ae9f949626
2018-10-03 14:46:57 +02:00
alternatives="pyzbar:read_zbar:/usr/bin/read_zbar.py2"
2018-09-26 21:55:21 +02:00
post_install() {
vlicense LICENSE.txt
# These only exec read_zbar.py{2,3}
rm "$DESTDIR"/usr/bin/read_zbar{2,3}
}
python3-pyzbar_package() {
noarch=yes
pycompile_module="pyzbar"
2018-10-03 14:46:57 +02:00
depends="libzbar python3"
alternatives="pyzbar:read_zbar:/usr/bin/read_zbar.py3"
2018-09-26 21:55:21 +02:00
pkg_install() {
2018-10-03 14:46:57 +02:00
vlicense LICENSE.txt
2018-09-26 21:55:21 +02:00
vmove usr/lib/python3*
vmove usr/bin/read_zbar.py3
}
}