aboutsummaryrefslogtreecommitdiffstats
path: root/main/iscsitarget/APKBUILD
blob: 9e5764245a17bdd35831c6e49d2d58b87f2c1567 (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
43
44
45
46
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>

pkgname=iscsitarget
pkgver=1.4.20.2
pkgrel=0
pkgdesc="Open Source iSCSI target with professional features - userspace utils"
url="http://iscsitarget.sourceforge.net/"
arch="x86 x86_64"
license="GPL-2"
depends=
makedepends="openssl-dev"
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
	ietd.initd
	ietd.confd
	"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	for i in ../*.patch; do
		[ -r "$i" ] || continue
		msg "Applying $i"
		patch -p1 < $i || return 1
	done
}

build() {
	cd "$_builddir"
	make usr || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install-usr install-doc

	for i in etc/ietd.conf etc/initiators.*; do
		install -Dm640 $i "$pkgdir"/$i || return 1
	done
	install -Dm755 ../ietd.initd "$pkgdir"/etc/init.d/ietd
	install -Dm755 ../ietd.confd "$pkgdir"/etc/conf.d/ietd
}

md5sums="2f23c0bfe124d79f5c20e34ef2aaff82  iscsitarget-1.4.20.2.tar.gz
9b0ca79dc47b12024c2b67d828d6d361  ietd.initd
06ba479d3533d557b8582abe6f182410  ietd.confd"