2011-10-18 01:04:14 +00:00
|
|
|
# Contributor: Johannes Dewender arch at JonnyJD dot net
|
2011-10-18 02:28:59 +00:00
|
|
|
# Contributor: Kevin Mihelich <kevin@plugapps.com>
|
2011-10-18 01:04:14 +00:00
|
|
|
|
|
|
|
plugrel=1
|
|
|
|
|
|
|
|
pkgname=lio-utils
|
|
|
|
pkgver=4.1
|
|
|
|
pkgrel=3
|
2011-10-18 02:28:59 +00:00
|
|
|
pkgdesc="A simple low-level configuration tool set for LIO 3 (Target 3 and iSCSI 3)"
|
2011-10-18 01:04:14 +00:00
|
|
|
arch=('any')
|
|
|
|
url="http://linux-iscsi.org/wiki/Lio-utils"
|
|
|
|
license=('AGPL3')
|
|
|
|
depends=('python2')
|
2011-10-18 02:28:59 +00:00
|
|
|
makedepends=('net-snmp')
|
|
|
|
optdepends=('net-snmp')
|
|
|
|
source=("$pkgname-$pkgver.tgz::http://www.risingtidesystems.com/git/?p=$pkgname.git;a=snapshot;h=e6d881a98210c99468b82daa5f8926bb079e4790;sf=tgz")
|
|
|
|
md5sums=('25bca4a70abe7041b3eef80f8fbdcad4')
|
2011-10-18 01:04:14 +00:00
|
|
|
|
|
|
|
build() {
|
2011-10-18 02:28:59 +00:00
|
|
|
cd "$srcdir/$pkgname"
|
|
|
|
find -type f -a -name '*.py' -exec sed -i -e 's|#![ ]*/usr/bin/python$|#!/usr/bin/python2|' {} \;
|
|
|
|
sed -i 's|python setup.py|python2 setup.py|' Makefile
|
2011-10-18 01:04:14 +00:00
|
|
|
make SNMP_FEATURE=1
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2011-10-18 02:28:59 +00:00
|
|
|
cd "$srcdir/$pkgname"
|
2011-10-18 01:04:14 +00:00
|
|
|
|
|
|
|
#make DESTDIR="$pkgdir/" initd_install)
|
|
|
|
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
|
|
|
|
for part in {node,dump,loop,fabric}; do
|
|
|
|
chmod a+x "$pkgdir$SITE_PACKAGES/tcm_$part.py"
|
|
|
|
sed -i '1s/python/python2/' "$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
|
|
|
|
for part in {dump,node}; do
|
|
|
|
chmod a+x "$pkgdir$SITE_PACKAGES/lio_$part.py"
|
|
|
|
sed -i '1s/python/python2/' "$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
|
|
|
|
if [ -d "$srcdir/$pkgname/mib-modules" ]; then
|
|
|
|
cd "$srcdir/$pkgname/mib-modules"
|
|
|
|
make DESTDIR="$pkgdir/" install
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
# vim:set ts=2 sw=2 et:
|