summaryrefslogtreecommitdiffstats
path: root/testing/dahdi-linux/APKBUILD
blob: dea3090f0009392a4ecd74eb55a7142bda375804 (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
# Contributor: Timo Teras <timo.teras@iki.fi>
# Maintainer: Timo Teras <timo.teras@iki.fi>
pkgname=dahdi-linux
_kernflavor=grsec
_kernver=2.6.28.9
pkgver=2.1.0.4
pkgrel=3
pkgdesc="Digium Asterisk Hardware Device Interface drivers"
url="http://www.asterisk.org"
license="GPL"
depends="linux-grsec"
# we need wget and tar because make install downloads firmware and uses fancy
# options for tar and wget.
makedepends="linux-grsec-dev linux-grsec-sources wget tar perl"
install=
subpackages="$pkgname-dev $pkgname-grsec:mod"
source="http://downloads.digium.com/pub/telephony/dahdi-linux/releases/$pkgname-$pkgver.tar.gz
	dahdi-depmod.patch
	dahdi-bri_dchan.patch
	dahdi-zaphfc.patch
	zaphfc-dahdi-flortz.diff
	"

build() {
	local kout="$srcdir"/grsec
	local ksrc="/usr/src/linux-$_kernver-$_kernflavor"
	mkdir -p "$kout"
	cd "$kout"
	cp /usr/share/linux-grsec/config .config
	make -C $ksrc O=$PWD silentoldconfig || return 1
	make modules_prepare

	cd "$srcdir/$pkgname-$pkgver"
	for i in ../*.patch; do
		msg "Applying $i"
		patch -p1 < $i || return 1;
	done

	make \
		KVERS="$_kernver-$_kernflavor" KSRC="$kout" \
		KCONFIG="$kout/.config" DYNFS="yes" MODULES_EXTRA="zaphfc" \
		|| return 1
	make DESTDIR="$pkgdir" \
		KVERS="$_kernver-$_kernflavor" KSRC="$kout" \
		KCONFIG="$kout/.config" DYNFS="yes" MODULES_EXTRA="zaphfc" \
		install
}

md5sums="ef2d34c394e8b600ad392560efc56920  dahdi-linux-2.1.0.4.tar.gz
c78fb8d80f9efdffd950297c88ff9273  dahdi-depmod.patch
1c9c44497fc883c6a5381abc93e5e6cf  dahdi-bri_dchan.patch
a822c092f0548cd13f5e8d8cba053af6  dahdi-zaphfc.patch
291c5c44c86ab02443a742415461ddca  zaphfc-dahdi-flortz.diff"