# Contributor: Timo Teras # Maintainer: Timo Teras _flavor=${FLAVOR:-vserver} _realname=dahdi-linux _name=$_realname-$_flavor _kpkg=linux-$_flavor _kver=3.6.4 _kpkgrel=0 _myvsver=vs2.3.4.3-noxfs-nocow # verify the kernel version before entering chroot if [ -f ../linux-${_flavor}/APKBUILD ]; then . ../linux-${_flavor}/APKBUILD pkgname=${_realname}-${_flavor} [ "$_kver" != "$pkgver" ] \ && die "please update _kver to $pkgver" [ "$_kpkgrel" != "$pkgrel" ] \ && die "please update _kpkgrel to $pkgrel" [ "$_myvsver" != "$_vsver" ] \ && die "please update _myvsver to $_vsver" fi _kpkgver="$_kver-r$_kpkgrel" _abi_release=${_kver}-$_myvsver pkgname=${_realname}-${_flavor} pkgver=$pkgver # when bumping _dahdiver we *must* bump _mypkgrel _dahdiver=2.6.1 _mypkgrel=0 pkgrel=$(( $_kpkgrel + $_mypkgrel )) pkgdesc="Digium Asterisk Hardware Device Interface drivers $_dahdiver" url="http://www.asterisk.org" arch="all" license="GPL" depends="dahdi-linux linux-${_flavor}=${_kpkgver}" # we need wget and tar because make install downloads firmware and uses fancy # options for tar and wget. makedepends="linux-${_flavor}-dev=${_kpkgver} 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 zaphfc-dahdi-2.4.0.patch zaphfc-dahdi-2.5.0.patch zaphfc-dahdi-2.6.0.patch " prepare() { cd "$srcdir/$_realname-$_dahdiver" for i in $source; do case $i in *.patch|*.diff) msg "Applying $i" patch -p1 -i "$srcdir"/$i || return 1 ;; esac done } build() { cd "$srcdir/$_realname-$_dahdiver" export GCC_SPECS=/usr/share/gcc/hardenednopie.specs 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 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="75932fe3d4a6e656165aaaa7a1377305 dahdi-linux-2.6.1.tar.gz c78fb8d80f9efdffd950297c88ff9273 dahdi-depmod.patch 3bb419ac598534cd4ad5248f23656001 dahdi-bri_dchan.patch c6308ea8aaafba0a9d7f9825d7c9dcf8 dahdi-zaphfc.patch 035a6d91b2fb56a9b76a60a2e494fe9e zaphfc-dahdi-flortz.diff 0fdcd8c8c93bc1fe33c0af12b6cc6b05 zaphfc-dahdi-2.4.0.patch fc49cf22258d63487a83560385c3f6fa zaphfc-dahdi-2.5.0.patch 6273db53267e1f322d91bf1c8b97ba19 zaphfc-dahdi-2.6.0.patch"