Date: Friday, September 23, 2022 @ 09:06:09 Author: grawlinson Revision: 1309144
addpkg: python-puremagic 1.14-2 Added: python-puremagic/ python-puremagic/repos/ python-puremagic/trunk/ python-puremagic/trunk/PKGBUILD ----------+ PKGBUILD | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) Added: python-puremagic/trunk/PKGBUILD =================================================================== --- python-puremagic/trunk/PKGBUILD (rev 0) +++ python-puremagic/trunk/PKGBUILD 2022-09-23 09:06:09 UTC (rev 1309144) @@ -0,0 +1,42 @@ +# Maintainer: George Rawlinson <[email protected]> + +pkgname=python-puremagic +pkgver=1.14 +pkgrel=2 +pkgdesc="A Python module that will identify a file based off it's magic numbers" +arch=('any') +url='https://github.com/cdgriffith/puremagic' +license=('MIT') +depends=('python') +makedepends=('git' 'python-setuptools') +checkdepends=('python-pytest') +_commit='15a93b28feca89a008bdde09ee9323095ef4ddf8' +source=("$pkgname::git+$url#commit=$_commit") +b2sums=('SKIP') + +pkgver() { + cd "$pkgname" + + git describe --tags | sed 's/^v//' +} + +build() { + cd "$pkgname" + + python setup.py build +} + +check() { + cd "$pkgname" + + PYTHONPATH="$PWD:$PYTHONPATH" pytest +} + +package() { + cd "$pkgname" + + python setup.py install --root="$pkgdir" --optimize=1 + + # license + install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE +}
