added aur/python-rtslib-fb

This commit is contained in:
Kevin Mihelich 2014-05-03 15:53:48 +00:00
parent f6b86bf8e0
commit ba8e47fd5b
2 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,44 @@
# Contributor: Johannes Dewender arch at JonnyJD dot net
pkgname=python-rtslib-fb
_pkgname=rtslib-fb
pkgver=2.1.fb47
pkgrel=1
epoch=
pkgdesc="free branch version of the LIO target API"
arch=('any')
url="https://github.com/agrover/rtslib-fb"
license=('Apache')
depends=()
makedepends=('python-setuptools')
# this is incompatible to python2-rtslib
provides=()
conflicts=('python2-rtslib' 'targetcli-fb<=2.1.fb31')
backup=()
options=()
install=
source=(https://fedorahosted.org/releases/t/a/targetcli-fb/$_pkgname-$pkgver.tar.gz target.service)
md5sums=('1c2a9befa2275ad79d84e9c417c2b807'
'0bd602821a24cd598488807d130b55d7')
build() {
cd "$srcdir/$_pkgname-$pkgver"
python setup.py build
}
package() {
cd "$srcdir/$_pkgname-$pkgver"
python setup.py install --skip-build --root="$pkgdir/" --optimize=1
install -Dm 644 doc/targetctl.8 "$pkgdir/usr/share/man/man8/targetctl.8"
install -Dm 644 doc/saveconfig.json.5 "$pkgdir/usr/share/man/man5/saveconfig.json.5"
# arch specific
cd "$srcdir"
install -d "$pkgdir/etc/target"
install -d "$pkgdir/etc/target/backup"
# systemd
mkdir -p "$pkgdir/usr/lib/systemd/system"
cp target.service "$pkgdir/usr/lib/systemd/system/"
}
# vim:set ts=2 sw=2 et:

View file

@ -0,0 +1,14 @@
[Unit]
Description=Restore LIO kernel target configuration
Requires=sys-kernel-config.mount
After=sys-kernel-config.mount network.target local-fs.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/targetctl restore
ExecStop=/usr/bin/targetctl clear
SyslogIdentifier=target
[Install]
WantedBy=multi-user.target