# Contributor: Timo Teras # Maintainer: Timo Teras _flavor=grsec # source the kernel version if [ -f ../linux-${_flavor}/APKBUILD ]; then . ../linux-${_flavor}/APKBUILD fi _kernelver="$pkgver-r$pkgrel" _abi_release=${pkgver}-${_flavor} _kpkgrel=$pkgrel _realname=dahdi-linux pkgname=${_realname}-${_flavor} pkgver=$pkgver # when chaning _dahdiver we *must* bump _mypkgrel _dahdiver=2.3.0.1 _mypkgrel=3 pkgrel=$(( $_kpkgrel + $_mypkgrel )) pkgdesc="Digium Asterisk Hardware Device Interface drivers $_dahdiver" url="http://www.asterisk.org" license="GPL" depends="dahdi-linux linux-${_flavor}=${_kernelver}" # we need wget and tar because make install downloads firmware and uses fancy # options for tar and wget. makedepends="linux-${_flavor}-dev=${_kernelver} wget tar perl" install= subpackages="$pkgname-dev" source="http://downloads.digium.com/pub/telephony/dahdi-linux/releases/${_realname}-$_dahdiver.tar.gz dahdi-depmod.patch dahdi-bri_dchan.patch dahdi-zaphfc.patch zaphfc-dahdi-flortz.diff " prepare() { cd "$srcdir/$_realname-$_dahdiver" for i in ../*.patch ../*.diff; do msg "Applying $i" patch -p1 < $i || return 1; done } build() { cd "$srcdir/$_realname-$_dahdiver" make KVERS="${_abi_release}" DYNFS="yes" MODULES_EXTRA="zaphfc" \ || return 1 } package() { cd "$srcdir/$_realname-$_dahdiver" make KVERS="${_abi_release}" DYNFS="yes" MODULES_EXTRA="zaphfc" \ DESTDIR="$pkgdir" install-modules || return 1 rm -rf "$pkgdir"/lib/firmware "$pkgdir"/usr/lib/hotplug/firmware \ "$pkgdir"/usr/include } # since we sourced the APKBUILD above we got the dev() function there to # so we override it again. depends_dev="dahdi-linux-dev" dev() { default_dev local dir="$subpkgdir"/usr/src/dahdi-headers-${_abi_release} install -D "$srcdir"/$_realname-$_dahdiver/drivers/dahdi/Module.symvers \ "$dir"/drivers/dahdi/Module.symvers ln -s /usr/include "$dir"/include } md5sums="ac454f91d7e1267655ecd698832da414 dahdi-linux-2.3.0.1.tar.gz c78fb8d80f9efdffd950297c88ff9273 dahdi-depmod.patch 4b41a82ff390ac64c08092c5a3eab6a8 dahdi-bri_dchan.patch a822c092f0548cd13f5e8d8cba053af6 dahdi-zaphfc.patch 291c5c44c86ab02443a742415461ddca zaphfc-dahdi-flortz.diff"