diff options
author | Luis Martinez | 2022-08-20 13:46:07 -0500 |
---|---|---|
committer | Luis Martinez | 2022-08-20 13:46:07 -0500 |
commit | 08c43fd640a0ea55e000fd97796b3cf5ee719c59 (patch) | |
tree | 2fe3eac9f0efac58e10823dbbf1eb4167da27d33 | |
parent | 91ee29ff7dc609527637b1e0c7e255944c20b08d (diff) | |
download | aur-python-av-git.tar.gz |
packaging cleanup
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 38 |
2 files changed, 30 insertions, 23 deletions
@@ -1,18 +1,21 @@ pkgbase = python-av-git pkgdesc = Pythonic bindings for FFmpeg - pkgver = r1324.15be68f + pkgver = 9.2.0.r10.g1d892a7 pkgrel = 1 url = https://github.com/mikeboers/PyAV - arch = any - license = custom:BSD-3-clause + arch = x86_64 + license = BSD + makedepends = cython makedepends = git + makedepends = python-build + makedepends = python-installer makedepends = python-setuptools - makedepends = cython + makedepends = python-wheel depends = ffmpeg depends = python provides = python-av conflicts = python-av - source = python-av::git+https://github.com/mikeboers/PyAV.git#branch=main - sha512sums = SKIP + source = python-av::git+https://github.com/mikeboers/PyAV + sha256sums = SKIP pkgname = python-av-git @@ -1,31 +1,35 @@ +# Maintainer: Luis Martinez <luis dot martinez at disroot dot org> # Contributor: Jerry Lin <jerry73204 at gmail dot com> + pkgname=python-av-git -pkgver=r1324.15be68f +_pkg="${pkgname%-git}" +_py="${_pkg#python-}" +pkgver=9.2.0.r10.g1d892a7 pkgrel=1 pkgdesc='Pythonic bindings for FFmpeg' -arch=(any) +arch=('x86_64') url="https://github.com/mikeboers/PyAV" -license=('custom:BSD-3-clause') -provides=(python-av) -conflicts=(python-av) -depends=(ffmpeg python) -makedepends=(git python-setuptools cython) -source=("python-av::git+${url}.git#branch=main") -sha512sums=('SKIP') +license=('BSD') +provides=("$_pkg") +conflicts=("$_pkg") +depends=('ffmpeg' 'python') +makedepends=('cython' 'git' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel') +source=("$_pkg::git+$url") +sha256sums=('SKIP') pkgver() { - cd python-av - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + git -C "$_pkg" describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./' } build() { - cd python-av - export PYTHONHASHSEED=0 - python setup.py build + cd "$_pkg" + python -m build --wheel --no-isolation } package() { - cd python-av - PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build - install -Dm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}" + cd "$_pkg" + PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir" dist/*.whl + local _site="$(python -c 'import site; print(site.getsitepackages()[0])')" + install -d "$pkgdir/usr/share/licenses/$pkgname/" + ln -s "$_site/$_py-${pkgver%.r*}.dist-info/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } |