blob: b7cda1ad71e1992c9b11012b184fbc721f0fb415 (
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# Contributor: Carlo Landmeter
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_flavor=${FLAVOR:-scst}
_realname=scst-svn
# source the kernel version
if [ -f ../../testing/linux-$_flavor/APKBUILD ]; then
. ../../testing/linux-$_flavor/APKBUILD
fi
_kver=$pkgver
_kernelver=$pkgver-r$pkgrel
_abi_release=$pkgver-${_flavor}
_kpkgrel=$pkgrel
# We need to build iscsi together with scst because it needs some files from its builddir
_iscsiname=iscsi-scst-svn
_iscsidir="$srcdir"/iscsi-scst
_realver=1713
pkgname=${_realname}-${_flavor}
pkgver=$_kver
_mypkgrel=0
pkgrel=$(($_kpkgrel + $_mypkgrel))
pkgdesc="$_flavor kernel modules for SCST $_realver"
url="http://scst.sourceforge.net/"
license="GPL-2"
depends="linux-${_flavor}=${_kernelver}"
install=
makedepends="linux-${_flavor}-dev=${_kernelver} sed bash"
subpackages="$pkgname-dev $_iscsiname-scst:iscsi"
source="http://alpine.nethq.org/clandmeter/src/$_realname-$_realver.tar.gz
http://alpine.nethq.org/clandmeter/src/$_iscsiname-$_realver.tar.gz"
_ksrc=/usr/src/linux-headers-${_abi_release}
_builddir="$srcdir"/scst
prepare() {
# we are disabling proc and enabling sysfs control and disabling debug.
cd "$_builddir"
make disable_proc
make debug2release
cd "$_iscsidir"
make disable_proc
make debug2release
sed -i -e 's/^\(mods: .*\)/\1 include\/iscsi_scst_itf_ver.h/' Makefile
}
build() {
unset ARCH
cd "$_builddir"
make KDIR="$_ksrc" || return 1
cd "$_iscsidir"
make mods KDIR="$_ksrc" || return 1
}
package() {
cd "$_builddir"
make KDIR="$_ksrc" \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_DIR_H="$pkgdir"/usr/include/scst \
install || return 1
}
# we sourced kernel apkbuild above so we need to override the dev() func
dev() {
default_dev
}
iscsi() {
pkgdesc="SCST iscsi kernel module"
cd "$_iscsidir"
install -D -m 644 kernel/iscsi-scst.ko \
"$subpkgdir"/lib/modules/$_abi_release/extra/iscsi-scst.ko
}
md5sums="38424f48c9fd65624e316195186fb6a7 scst-svn-1713.tar.gz
cf046db4f7cd9cf969b054dc055922d6 iscsi-scst-svn-1713.tar.gz"
|