diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 45 |
1 files changed, 26 insertions, 19 deletions
@@ -1,33 +1,40 @@ -# Maintainer: Nathaniel Chin <thegamingorangutans+aur at gmail.com> +# Maintainer: Luis Martinez <luis dot martinez at disroot dot org> +# Contributor: Nathaniel Chin <thegamingorangutans+aur at gmail.com> # Original: bitwave > https://aur.archlinux.org/packages/python-scenedetect/ -pkgname=('python-scenedetect-git') -pkgver=v0.6.release.r45.gb54aff9 +pkgname=python-scenedetect-git +_pkgname="${pkgname%-git}" +_pkg="${_pkgname#python-}" +pkgver=0.6.1.release.r0.gcd1d1b6 pkgrel=1 -pkgdesc="A cross-platform, OpenCV-based video scene detection program and Python library." +pkgdesc="Cross-platform, OpenCV-based video scene detection program and Python library." +license=('BSD') +arch=('any') url="https://github.com/Breakthrough/PySceneDetect" -depends=('python' 'python-click' 'python-opencv' 'python-numpy' 'python-tqdm') -makedepends=('python-setuptools' 'git') +depends=('python-appdirs' 'python-click' 'python-opencv' 'python-numpy' 'python-tqdm') +makedepends=('git' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel') checkdepends=("python-pytest") optdepends=('mkvtoolnix-cli: Splitting in copy mode.' 'ffmpeg: Splitting in precise mode.' 'python-av') -license=('BSD') -arch=('any') -provides=('python-scenedetect') -conflicts=('python-scenedetect') -source=("git+https://github.com/Breakthrough/PySceneDetect.git" - 'LICENSE') -sha256sums=('SKIP' - 'c6c20f040d5c41680f2584dc01c723494f08234259852c279e3e9018fac8dc71') +provides=("$_pkgname") +conflicts=("$_pkgname") +source=("$_pkgname::git+$url") +sha256sums=('SKIP') pkgver() { - cd "PySceneDetect" - git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' + git -C "$_pkgname" describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "$_pkgname" + python -m build --wheel --no-isolation } package() { - cd "$srcdir/PySceneDetect" - install -D -m644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}" - python setup.py install --root="${pkgdir}/" --optimize=1 + cd "$_pkgname" + python -m installer --destdir="$pkgdir" dist/*.whl + local _site="$(python -c 'import site; print(site.getsitepackages()[0])')" + install -dv "$pkgdir/usr/share/licenses/$pkgname/" + ln -sv "$_site/$_pkg-${pkgver/.r*/}.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/" } |