# Maintainer: Leonardo Arena pkgname=open-iscsi pkgver=2.0.871 _realver=2.0-871 pkgrel=2 pkgdesc="High performance, transport independent, multi-platform iSCSI initiator" url="http://www.open-iscsi.org" license="GPL-2" depends= makedepends= install="" subpackages="$pkgname-doc" source="http://www.open-iscsi.org/bits/$pkgname-$_realver.tar.gz CVE-2009-1297.patch open-iscsi-2.0.871-makefile-cleanup.patch iscsid.initd" _builddir="$srcdir"/$pkgname-$_realver prepare() { cd "$_builddir" patch -p0 < ../../CVE-2009-1297.patch || return 1 patch -p1 < ../../open-iscsi-2.0.871-makefile-cleanup.patch || return 1 } build() { cd "$_builddir" make user || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install_user mkdir -p $pkgdir/usr/bin mkdir -p $pkgdir/usr/sbin mv $pkgdir/sbin/iscsi-iname $pkgdir/usr/bin mv $pkgdir/sbin/iscsi_discovery $pkgdir/usr/bin mv $pkgdir/sbin/iscsiadm $pkgdir/usr/bin mv $pkgdir/sbin/iscsid $pkgdir/usr/sbin install -Dm755 ../../iscsid.initd "$pkgdir"/etc/init.d/iscsid } md5sums="0c403e8c9ad41607571ba0e6e8ff196e open-iscsi-2.0-871.tar.gz d1584790b4e12f087e60089880b53d2b CVE-2009-1297.patch 734300d7b7590dc9ae9b2fb7f5b51bf0 open-iscsi-2.0.871-makefile-cleanup.patch 3e89cb86395756dafebc4f1490f0de10 iscsid.initd"