aboutsummaryrefslogtreecommitdiffstats
path: root/testing/scst-svn-scst
diff options
context:
space:
mode:
Diffstat (limited to 'testing/scst-svn-scst')
-rw-r--r--testing/scst-svn-scst/APKBUILD82
1 files changed, 82 insertions, 0 deletions
diff --git a/testing/scst-svn-scst/APKBUILD b/testing/scst-svn-scst/APKBUILD
new file mode 100644
index 0000000000..b7cda1ad71
--- /dev/null
+++ b/testing/scst-svn-scst/APKBUILD
@@ -0,0 +1,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"