python-inputs/PKGBUILD

48 lines
1.3 KiB
Bash

# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
# Contributor: Major <majorx234@googlemail.com>
pkgname=python-inputs
_name=${pkgname#python-}
pkgver=0.5
epoch=1
pkgrel=1
pkgdesc="Cross-platform Python support for keyboards, mice and gamepads"
arch=('any')
url="https://github.com/zeth/inputs"
license=(
BSD-3-Clause
)
depends=(
python
)
makedepends=(
python-build
python-installer
python-setuptools
python-wheel
)
source=(
"${_name}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz"
'3203c9e25f1e14c4316d85d59c536b4e407f569f.patch'
)
b2sums=('64e36aee9ce576924c77cc5b0bd89b3bc657fbd9a89ac0407db143c05066828c5a09b6c0e6c3bfb457b5fc4f9cefd81d4b0bf949ac06b69314997b444050d5ab'
'337cf613a41876e4d1ce38ec14befdfe739db171238a318de8a0a42cba96baeaee888e405754a2432792f82f6f341a0a315be3a0f375cbe4c4a735e48e9f5534')
prepare() {
cd "${_name}-${pkgver}"
# https://github.com/zeth/inputs/issues/72
# https://github.com/zeth/inputs/pull/90
patch -Np1 -i ../3203c9e25f1e14c4316d85d59c536b4e407f569f.patch
}
build() {
cd "${_name}-${pkgver}"
python -m build --wheel --no-isolation
}
package() {
cd "${_name}-${pkgver}"
python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}