blob: 09a88b4b4f231a98381c619897c7487d607ac9f7 (
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=iscsitarget
pkgver=0.4.17
pkgrel=0
pkgdesc="Open Source iSCSI target with professional features"
url="http://iscsitarget.sourceforge.net/"
license="GPL-2"
depends="uclibc openssl"
makedepends="openssl-dev"
subpackages="$pkgname-doc $pkgname-grsec-mod:mod"
_kernels="grsec"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
$pkgname-0.4.15-isns-set-scn-flag.patch
$pkgname-0.4.17-build.patch
$pkgname-0.4.17+linux-2.6.28.patch
ietd.initd
ietd.confd
"
for _i in $_kernels; do
makedepends="$makedepends linux-${_i}-sources linux-${_i}-dev"
done
build() {
cd "$srcdir"/$pkgname-$pkgver
for i in ../*.patch; do
msg "Applying $i"
patch -p1 < $i || return 1
done
unset ARCH
local k
for k in $_kernels; do
msg "Building kernel modules for $k"
local kout="$srcdir"/$k
mkdir -p "$kout"
local ver=$(awk -F': ' '$1 ~ /Linux kernel version/ {print $2}' /boot/config-$k)
cd "$kout"
cp /boot/config-$k .config
cp /boot/Module.symvers-$k Module.symvers
make -C /usr/src/linux-$ver-$k O=$PWD silentoldconfig \
|| return 1
make modules_prepare
cd "$srcdir"/$pkgname-$pkgver
make KSRC="$kout" kernel || return 1
make KSRC="$kout" DISTDIR="$pkgdir" install-kernel || return 1
done
msg "Building userspace"
make KSRC="$kout" usr || return 1
make KSRC="$kout" DISTDIR="$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="e79b437695fc50e7d054631855a16b1b iscsitarget-0.4.17.tar.gz
22512c5cf4cb62127730ce53d74ff28f iscsitarget-0.4.15-isns-set-scn-flag.patch
c9a9b839b3afcdecd1601511ee48a171 iscsitarget-0.4.17-build.patch
f58dde50f72b04b7737b33e517e56208 iscsitarget-0.4.17+linux-2.6.28.patch
641513492f58a6cb13247d0028a50906 ietd.initd
06ba479d3533d557b8582abe6f182410 ietd.confd"
|