summaryrefslogtreecommitdiffstats
path: root/testing/open-iscsi/APKBUILD
blob: 4c9852b03cdcb40b30ac800e51c2d3aec137f0ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Maintainer: Leonardo Arena <rnalrd@gmail.com>
pkgname=open-iscsi
pkgver=2.0.871
_realver=2.0-871
pkgrel=0
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"

_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
	mv $pkgdir/sbin/iscsi-iname $pkgdir/usr/bin
	mv $pkgdir/sbin/iscsi_discovery $pkgdir/usr/bin
	mv $pkgdir/sbin/iscsiadm $pkgdir/usr/bin
	install -Dm755 ../../iscsid-2.0.871-r1.init.d "$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"