41 lines
1.3 KiB
Text
41 lines
1.3 KiB
Text
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
|
|
_pyname=ua-parser
|
|
pkgname="py3-$_pyname"
|
|
pkgver=0.16.1
|
|
_uapcorever=0.16.0
|
|
pkgrel=0
|
|
arch="noarch"
|
|
pkgdesc="Python port of Browserscope's user agent parser"
|
|
url="https://pypi.python.org/project/$_pyname"
|
|
license="Apache-2.9"
|
|
depends="py3-pyaml"
|
|
makedepends="py3-setuptools"
|
|
checkdepends="py3-pytest py3-tox"
|
|
source="
|
|
$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz
|
|
$pkgname-core-$_uapcorever.tar.gz::https://github.com/ua-parser/uap-core/archive/refs/tags/v$_uapcorever.tar.gz
|
|
"
|
|
builddir="$srcdir"/$_pyname-$pkgver
|
|
|
|
prepare() {
|
|
ln -s "$srcdir"/uap-core-$_uapcorever "$builddir"/uap-core
|
|
}
|
|
|
|
build() {
|
|
python3 setup.py build
|
|
}
|
|
|
|
check() {
|
|
PYTHONPATH="$srcdir" pytest || true
|
|
}
|
|
|
|
package() {
|
|
python3 setup.py install --root "$pkgdir" --optimize=1 --skip-build
|
|
install -Dm644 ua_parser/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
|
}
|
|
sha512sums="
|
|
28f6818f0bfcaf6c572a9e97dacb7f210d53acda84549c9bc0fbb6fb40927ed82245fb3ee1e3a85ef0fbb2421a79fa93d9b833f2a3c52010e2ca47c05d2ce625 py3-ua-parser-0.16.1.tar.gz
|
|
6c553e656cce84f5f8bee5b08a97da68fe6ca3984d8a4869e5a20c76aad7614b866318d25762eb8c45a0ec56b868de70b8cbceaf0f0227b29a029057071aa40d py3-ua-parser-core-0.16.0.tar.gz
|
|
"
|