# Contributor: Ben Allen # Maintainer: Ben Allen _flavor=${FLAVOR:-hardened} _kpkg=linux-$_flavor _realname=sch-cake _name=$_realname-$_flavor _kver=4.9.44 _kpkgrel=0 _gitver=9789742cfc596d48583ba4cdbc8f38d026121fa6 _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="x86 x86_64 armhf" license="Dual BSD/GPL" depends="linux-${_flavor}=${_kernelver}" makedepends="linux-${_flavor}-dev=${_kernelver} linux-headers" install= install_if="linux-$_flavor=$_kernelver $_realname" subpackages= provides="${_realname}-grsec=${pkgver}-r${pkgrel}" source="$_realname-$_gitver.tar.gz::https://github.com/dtaht/sch_cake/archive/$_gitver.tar.gz 10-Makefile.patch" _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 CFLAGS_MODULE="$CFLAGS_MODULE" || 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/ } sha512sums="1a4ae8632a3aa7349290434edfc2ca75315ea3b1698e97fbee7c102bf4e4897a09582de295c9d6cc3ec7fe6a8681df24e831c88a78df9ce766a5eec6b909cfca sch-cake-9789742cfc596d48583ba4cdbc8f38d026121fa6.tar.gz 9555709d6db1cb6a2599fe059a33962fa74826b6717f0dbb27217b3f678e22498156be548f6883abb6c493aa345de15fe2ceaa76a52bb4eed60ef6ee64c50bd8 10-Makefile.patch"