File PKGBUILD of Package python-rtslib-fb
pkgname=python-rtslib-fb
_pkgname=rtslib-fb
pkgver=2.2.0
pkgrel=92
pkgdesc="free branch version of the LIO target API"
arch=('any')
url="https://github.com/open-iscsi/$_pkgname"
license=('Apache')
depends=('python' 'python-pyudev')
conflicts=('python2-rtslib' 'targetcli-fb<=2.1.fb31')
makedepends=(python-build python-hatch-vcs python-hatchling python-installer)
source=("https://github.com/open-iscsi/$_pkgname/archive/v${pkgver}.tar.gz")
sha512sums=('8a321be004fabdd4abb479a1900bc27103000ea15712cbcc855fdaa762dca1658e1f3528e1e1976a56a99e57a60c0d69e3bdede5323a2f1a3a6bf419a5ddc6d4')
build() {
cd "$srcdir/$_pkgname-$pkgver"
SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver python -m build --wheel --no-isolation
}
package() {
cd "$srcdir/$_pkgname-$pkgver"
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 doc/targetctl.8 "$pkgdir/usr/share/man/man8/targetctl.8"
install -Dm644 doc/saveconfig.json.5 "$pkgdir/usr/share/man/man5/saveconfig.json.5"
install -dm755 "$pkgdir/etc/target/backup"
install -Dm644 "$srcdir/$_pkgname-$pkgver/systemd/target.service" "$pkgdir/usr/lib/systemd/system/target.service"
install -Dm755 "$srcdir/$_pkgname-$pkgver/scripts/targetctl" "$pkgdir/usr/bin/targetctl"
}