# Maintainer: Integral <integral@member.fsf.org>
# Contributor: J. Nathanael Philipp (jnphilipp) <nathanael@philipp.land>

_pkgname=usb_monitor
pkgname="python-${_pkgname}"
pkgver=1.23
pkgrel=2
pkgdesc="An easy-to-use cross-platform Python library for USB device monitoring"
arch=('any')
url="https://github.com/Eric-Canas/USBMonitor"
license=('MIT')
depends=('python-pyudev')
makedepends=('python-wheel' 'python-build' 'python-installer' 'python-setuptools')
source=("https://files.pythonhosted.org/packages/source/u/${_pkgname/_/-}/${_pkgname}-${pkgver}.tar.gz")
sha256sums=('ef1677d092cf76e634cb6487588edfbd91c1dbb15b34500c7331cc5e769797cf')

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}/"
}
