Date: Tuesday, January 14, 2020 @ 21:24:38 Author: dvzrv Revision: 552535
Adding python-robot-detection as depends for hyperkitty. Added: python-robot-detection/ python-robot-detection/repos/ python-robot-detection/trunk/ python-robot-detection/trunk/PKGBUILD ----------+ PKGBUILD | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) Added: python-robot-detection/trunk/PKGBUILD =================================================================== --- python-robot-detection/trunk/PKGBUILD (rev 0) +++ python-robot-detection/trunk/PKGBUILD 2020-01-14 21:24:38 UTC (rev 552535) @@ -0,0 +1,41 @@ +# Maintainer: David Runge <[email protected]> + +_name=robot-detection +pkgname=python-robot-detection +pkgver=0.4.0 +pkgrel=2 +pkgdesc="Detect web crawlers using HTTP User Agent" +arch=('any') +url="https://github.com/rory/robot-detection" +license=('GPL3') +depends=('python-six') +makedepends=('python-setuptools') +checkdepends=('python-pytest') +# sdist doesn't contain tests: +# https://github.com/rory/robot-detection/issues/2 +source=("$pkgname-$pkgver.tar.gz::https://github.com/rory/${_name}/archive/v${pkgver}.tar.gz") +sha512sums=('10b1fbd2307c375e3cd067e43bee1bc0ff71f4b83ede9b92d2fb8d60edfd6d4a8d1a4d06d74e3c0653056f2e2b2cb81a7e997047093e925bd79bf4626d33d85f') + +prepare() { + mv -v "${_name}-${pkgver}" "$pkgname-$pkgver" +} + +build() { + cd "$pkgname-$pkgver" + python setup.py build +} + +check() { + cd "$pkgname-$pkgver" + export PYTHONPATH="${PWD}/build:${PYTHONPATH}" + python ./tests.py +} + +package() { + cd "$pkgname-$pkgver" + python setup.py install --skip-build \ + --optimize=1 \ + --prefix=/usr \ + --root="${pkgdir}" + install -vDm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}" +}
