# Maintainer: Butui Hu <hot123tea123@gmail.com>

_pkgname=scenedetect
pkgname=python-scenedetect
pkgver=0.7.1
pkgrel=1
pkgdesc='Python and OpenCV-based scene cut/transition detection program & library'
arch=('any')
url='http://scenedetect.com'
license=('BSD-3-Clause')
depends=(
  python-click
  python-numpy
  python-opencv
  python-platformdirs
  python-tqdm
)
makedepends=(
  python-build
  python-installer
  python-wheel
  python-setuptools
)
optdepends=(
  "ffmpeg: required to split video files"
  "mkvtoolnix-cli: required to split video files in stream copy mode"
)
source=("${_pkgname}-${pkgver}.tar.gz::https://files.pythonhosted.org/packages/source/${_pkgname::1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
sha512sums=('edec189c105c20a041edc5ea1407a862fb0cbf98d196968e613117c417a787bbd3d07323911aeb32bafd035a78f7307589cbb2ea25ed15f8389e420eaf2422d7')

build() {
  cd "${_pkgname}-${pkgver}"
  python -m build --wheel --no-isolation
}

package() {
  cd "${_pkgname}-${pkgver}"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
# vim:set ts=2 sw=2 et:
