2011-10-18 01:04:14 +00:00
|
|
|
# Contributor: Johannes Dewender arch at JonnyJD dot net
|
|
|
|
pkgname=lio-utils
|
|
|
|
pkgver=4.1
|
2013-10-11 17:15:47 +00:00
|
|
|
pkgrel=10
|
2012-04-15 16:48:33 +00:00
|
|
|
epoch=
|
2013-10-11 17:15:47 +00:00
|
|
|
pkgdesc="deprecated low-level configuration tool set for LIO (Target and iSCSI)"
|
2012-04-15 16:48:33 +00:00
|
|
|
arch=('i686' 'x86_64')
|
2011-10-18 01:04:14 +00:00
|
|
|
url="http://linux-iscsi.org/wiki/Lio-utils"
|
2012-04-15 16:48:33 +00:00
|
|
|
license=('GPL2')
|
2011-10-18 01:04:14 +00:00
|
|
|
depends=('python2')
|
2012-04-15 16:48:33 +00:00
|
|
|
# for binary packages including lio-snmp in this package might be fine
|
|
|
|
#makedepends=('net-snmp')
|
|
|
|
#optdepends=("net-snmp: monitor lio with snmp")
|
|
|
|
provides=()
|
|
|
|
conflicts=('targetcli-fb')
|
|
|
|
replaces=()
|
|
|
|
backup=('etc/target/tcm_start.sh' 'etc/target/lio_start.sh')
|
|
|
|
options=()
|
|
|
|
install=
|
2012-05-30 20:47:53 +00:00
|
|
|
source=(rc-arch.patch logfile.patch)
|
|
|
|
md5sums=('1afad3e324d0bdde01d0383b482fac5f'
|
|
|
|
'43ab5e1a31f6d331dceef5bfa41a91a6')
|
2011-10-18 01:04:14 +00:00
|
|
|
|
|
|
|
build() {
|
2012-04-15 16:48:33 +00:00
|
|
|
if [ ! -e "$pkgname-$pkgver.tgz" ]; then
|
2013-03-17 21:07:51 +00:00
|
|
|
curl -fLC - "http://www.risingtidesystems.com/git/?p=$pkgname.git;a=snapshot;h=595cd43e38ebd19813b91a3db35f3a707d2ba475;sf=tgz" -o "$pkgname-$pkgver.tgz"
|
2012-04-15 16:48:33 +00:00
|
|
|
fi
|
|
|
|
bsdtar -xf "$srcdir/$pkgname-$pkgver.tgz"
|
|
|
|
|
|
|
|
cd "$srcdir/$pkgname/"
|
2012-05-30 20:47:53 +00:00
|
|
|
patch -p1 < "$srcdir/logfile.patch"
|
2012-04-15 16:48:33 +00:00
|
|
|
patch -p1 < "$srcdir/rc-arch.patch"
|
|
|
|
|
|
|
|
cd "$srcdir/$pkgname/"
|
|
|
|
cd tcm-py ; python2 setup.py build
|
|
|
|
cd "$srcdir/$pkgname/"
|
|
|
|
cd lio-py ; python2 setup.py build
|
|
|
|
cd "$srcdir/$pkgname/tools"; make
|
2011-10-18 01:04:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2012-04-15 16:48:33 +00:00
|
|
|
cd "$srcdir/$pkgname/"
|
2011-10-18 01:04:14 +00:00
|
|
|
|
|
|
|
install -d $pkgdir/etc/rc.d
|
|
|
|
install -m 0755 scripts/rc.target $pkgdir/etc/rc.d/target
|
|
|
|
|
|
|
|
make DESTDIR="$pkgdir/" conf_install
|
|
|
|
|
|
|
|
SITE_PACKAGES=`python2 ./get-py-modules-path.py`
|
|
|
|
install -d "$pkgdir/usr/sbin"
|
|
|
|
|
|
|
|
cd "$srcdir/$pkgname/tcm-py"
|
|
|
|
python2 setup.py install --skip-build --root="$pkgdir/" --optimize=1
|
2012-04-15 16:48:33 +00:00
|
|
|
for file in "$pkgdir$SITE_PACKAGES"/tcm_*.py; do
|
|
|
|
sed -i '1s/python/python2/' "$file"
|
|
|
|
done
|
2011-10-18 01:04:14 +00:00
|
|
|
for part in {node,dump,loop,fabric}; do
|
|
|
|
chmod a+x "$pkgdir$SITE_PACKAGES/tcm_$part.py"
|
|
|
|
if [ ! -f "$pkgdir/usr/sbin/tcm_$part" ]; then
|
|
|
|
ln -s "$SITE_PACKAGES/tcm_$part.py" "$pkgdir/usr/sbin/tcm_$part"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
cd "$srcdir/$pkgname/lio-py"
|
|
|
|
python2 setup.py install --skip-build --root="$pkgdir/" --optimize=1
|
2012-04-15 16:48:33 +00:00
|
|
|
for file in "$pkgdir$SITE_PACKAGES"/lio_*.py; do
|
|
|
|
sed -i '1s/python/python2/' "$file"
|
|
|
|
done
|
2011-10-18 01:04:14 +00:00
|
|
|
for part in {dump,node}; do
|
|
|
|
chmod a+x "$pkgdir$SITE_PACKAGES/lio_$part.py"
|
|
|
|
if [ ! -f "$pkgdir/usr/sbin/lio_$part" ]; then
|
|
|
|
ln -s "$SITE_PACKAGES/lio_$part.py" "$pkgdir/usr/sbin/lio_$part"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
if [ -d "$srcdir/$pkgname/tools" ]; then
|
|
|
|
cd "$srcdir/$pkgname/tools"
|
|
|
|
make DESTDIR="$pkgdir/" install
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
# vim:set ts=2 sw=2 et:
|