# Maintainer: Natanael Copa _flavor=${FLAVOR:-grsec} _realname=iscsitarget # source the kernel version if [ -f ../linux-$_flavor/APKBUILD ]; then . ../linux-$_flavor/APKBUILD fi _kver=$pkgver _kernelver=$pkgver-r$pkgrel _abi_release=$pkgver-${_flavor} _kpkgrel=$pkgrel _iscsiver=1.4.20.2 pkgname=${_realname}-${_flavor} pkgver=$_kver _mypkgrel=2 pkgrel=$(($_kpkgrel + $_mypkgrel)) pkgdesc="$_flavor kernel modules for iscsitarget $_iscsiver" url="http://iscsitarget.sourceforge.net/" arch="all" license="GPL-2" depends="linux-${_flavor}=${_kernelver}" install= makedepends="linux-${_flavor}-dev=${_kernelver}" subpackages= source="http://downloads.sourceforge.net/$_realname/$_realname-$_iscsiver.tar.gz " _ksrc=/usr/src/linux-headers-${_abi_release} prepare() { cd "$srcdir"/$_realname-$_iscsiver for i in ../*.patch; do [ -r "$i" ] || continue msg "Applying $i" patch -p1 < $i || return 1 done } build() { cd "$srcdir"/$_realname-$_iscsiver unset ARCH make KSRC="$_ksrc" kernel || return 1 } package() { cd "$srcdir"/$_realname-$_iscsiver make KSRC="$_ksrc" DESTDIR="$pkgdir" install-kernel || return 1 } md5sums="2f23c0bfe124d79f5c20e34ef2aaff82 iscsitarget-1.4.20.2.tar.gz"