# Maintainer: Natanael Copa _flavor=${FLAVOR:-grsec} _realname=wanpipe _name=$_realname-$_flavor _kver=3.2.9 _kpkgrel=0 # source the kernel version if [ -f ../../main/linux-$_flavor/APKBUILD ]; then . ../../main/linux-$_flavor/APKBUILD [ "$_kver" != "$pkgver" ] && die "$_name: Please update _kver to $pkgver" [ "$_kpkgrel" != "$pkgrel" ] && die "$_name: Please update _kpkgrel to $pkgrel" fi _kernelver=$_kver-r$_kpkgrel _abi_release=$_kver-${_flavor} pkgname=$_name pkgver=$_kver _realver=3.5.25 _mypkgrel=0 pkgrel=$(($_kpkgrel + $_mypkgrel)) pkgdesc="Sangoma Wanpipe drivers for $_flavor kernel" url="http://wiki.sangoma.com/wanpipe-linux-drivers" arch="all" license="GPL" depends="linux-${_flavor}=${_kernelver}" makedepends="linux-${_flavor}-dev=${_kernelver} bison libtool flex bash dahdi-linux-dev autoconf" install= install_if="linux-$_flavor=$_kernelver $_realname" subpackages= source="ftp://ftp.sangoma.com/linux/current_wanpipe/wanpipe-$_realver.tgz constify.patch" # override kernel's prepare() prepare() { cd "$srcdir/$_realname-$_realver" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$srcdir/$_realname-$_realver" export GCC_SPECS=/usr/share/gcc/hardenednopie.specs make CC="${CC:-gcc}" \ KVER=$_abi_release \ DAHDI_DIR=/usr/src/dahdi-headers-$_abi_release \ all_kmod_dahdi || return 1 } package() { cd "$srcdir/$_realname-$_realver" make CC="${CC:-gcc}" \ KVER=$_abi_release \ DAHDI_DIR=/usr/src/dahdi-headers-$_abi_release \ DESTDIR="$pkgdir" \ install_kmod || return 1 } md5sums="96700bece0d358bb12af9491d2730304 wanpipe-3.5.25.tgz c05de38644472046f63985e03228205d constify.patch"