summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d86f9d67ac3afedb6d44ff91328a08e1cc3d950b (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
 # Contributor: gamanakis

pkgname=sch_cake
pkgver=r200.6484187
pkgver() {
	cd "sch_cake"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
pkgrel=1
pkgdesc="The CAKE scheduler, bufferbloat.net"
arch=('i686' 'x86_64')
license=('GPL')
makedepends=('linux-headers')
depends=('linux')
provides=('sch_cake')
install=sch_cake.install
source=('git+https://github.com/dtaht/sch_cake.git')
md5sums=('SKIP')
url="bufferbloat.net"

_kernmajor="$(pacman -Q linux | awk '{print $2}' | cut -d - -f1 | cut -d . -f1,2)"
_extramodules="extramodules-${_kernmajor}-ARCH"
_kernver="$(cat /usr/lib/modules/${_extramodules}/version)"

build() {
  cd "${srcdir}/sch_cake"
  make -C /usr/lib/modules/${_kernver}/build M=`pwd`
  gzip -f sch_cake.ko
}

package() {
 cd "${srcdir}/sch_cake"
 install -Dm755 sch_cake.ko.gz $pkgdir/usr/lib/modules/${_extramodules}/sch_cake.ko.gz
}