# Contributor: Ben Allen # Maintainer: Ben Allen _flavor=${FLAVOR:-grsec} _kpkg=linux-$_flavor _realname=sch-cake _name=$_realname-$_flavor _kver=4.4.12 _kpkgrel=0 _gitver=df40fa23fbbed9f652e201058fc730f37ae7513c _mypkgrel=0 # source the kernel version if [ -f ../linux-$_flavor/APKBUILD ]; then . ../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}-${_kpkgrel}-${_flavor} pkgname=$_name pkgver=$_kver pkgrel=$(($_kpkgrel + $_mypkgrel)) pkgrel=0 pkgdesc="Out of tree build for the new cake qdisc" url="https://github.com/dtaht/sch_cake" arch="all" license="Dual BSD/GPL" depends="linux-${_flavor}=${_kernelver}" makedepends="linux-${_flavor}-dev=${_kernelver} linux-headers" install= install_if="linux-$_flavor=$_kernelver $_realname" subpackages= source="$_realname-$_gitver.tar.gz::https://github.com/dtaht/sch_cake/archive/$_gitver.tar.gz" _builddir="$srcdir"/sch_cake-$_gitver prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" make KERNEL_VERSION=$_abi_release || return 1 } package() { cd "$_builddir" install -v -m 0755 -d $pkgdir/lib/modules/$_abi_release/kernel/net/sched install -v -m 0644 $_builddir/sch_cake.ko $pkgdir/lib/modules/$_abi_release/kernel/net/sched/ } md5sums="1007bc57f2327a2db7fccb7c82e4254c sch-cake-df40fa23fbbed9f652e201058fc730f37ae7513c.tar.gz" sha256sums="a2ed94772531263cc8faf24d55be8fd9d3981d93f60580dc5bd4f3537a64a771 sch-cake-df40fa23fbbed9f652e201058fc730f37ae7513c.tar.gz" sha512sums="e7a3cbc7c2b618f28b7ac4c55987eeb5c7820a0141ada718253607bcdf0814b865d9120ef95215706a5e46dababbcbffafcd33b29501b753ad0916c3e2efa0eb sch-cake-df40fa23fbbed9f652e201058fc730f37ae7513c.tar.gz"