Initial commit
Some checks failed
Build package / build-package (push) Failing after 22s

This commit is contained in:
2025-02-11 16:19:33 +08:00
commit edd124e9a2
6 changed files with 152 additions and 0 deletions

47
PKGBUILD Normal file
View File

@@ -0,0 +1,47 @@
# Maintainer: Rigo Reddig <rigo.reddig at gmail dot com>
pkgname='python-rtslib-fb'
_pkgname=rtslib-fb
pkgver=2.2.0
pkgrel=1
pkgdesc="Free branch version of the LIO target API"
arch=('any')
url="https://github.com/open-iscsi/$_pkgname"
license=('Apache')
depends=('python' 'python-six' 'python-pyudev')
conflicts=('python2-rtslib' 'targetcli-fb<=2.1.fb31')
makedepends=('python-setuptools' 'python-pyudev')
source=(
"https://github.com/open-iscsi/$_pkgname/archive/v${pkgver}.tar.gz"
target.service
fix_open_context.patch
)
sha512sums=('8a321be004fabdd4abb479a1900bc27103000ea15712cbcc855fdaa762dca1658e1f3528e1e1976a56a99e57a60c0d69e3bdede5323a2f1a3a6bf419a5ddc6d4'
'3c634f1c466d0a8c3dd2b57a230438aaeeb0e66324863a2ded57dd69a2ca5946f83c4ab511766f510f3e63b43aedcf7e368bcf5bc325ee69c016bb0bb2612de5'
'312e380deb60f082238389bcd455309283935d039e2d1404be25f12546ebaaf46d8e2d0dcaa05ecab4f97014c40dfb351ba082e07c6e8a2ee20004dd149d6431')
prepare() {
cd "$srcdir/$_pkgname-$pkgver"
patch -Np1 -i "$srcdir/fix_open_context.patch"
}
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/target.service" "$pkgdir/usr/lib/systemd/system/target.service"
# Install targetctl script to /usr/bin
install -Dm755 scripts/targetctl "$pkgdir/usr/bin/targetctl"
# Create symlink for rtslib_fb to rtslib
#install -dm755 "$pkgdir/usr/lib/python3.13/site-packages/rtslib"
ln -s ./rtslib "$pkgdir/usr/lib/python3.13/site-packages/rtslib_fb"
}