aboutsummaryrefslogtreecommitdiffstats
path: root/testing/sch-cake-grsec/APKBUILD
blob: 693a9f1f1ab6c1db8f3ba3dc95b40195a062b801 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Contributor: Ben Allen <bensallen@me.com>
# Maintainer: Ben Allen <bensallen@me.com>
_flavor=${FLAVOR:-grsec}
_kpkg=linux-$_flavor
_realname=sch-cake
_name=$_realname-$_flavor

_kver=4.4.11
_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"