wok-6.x view dahdi-linux/receipt @ rev 17741

perl-class-accessor, perl-file-rsync, perl-libjson, perl-texi2html: add bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Mar 06 20:20:59 2015 +0100 (2015-03-06)
parents 3dd7afb348a9
children 29d39c79090b
line source
1 # SliTaz package receipt.
3 PACKAGE="dahdi-linux"
4 VERSION="2.6.1"
5 CATEGORY="network"
6 SHORT_DESC="Digium Asterisk Hardware Device Interface: kernel modules."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://www.asterisk.org/"
11 WGET_URL="http://downloads.asterisk.org/pub/telephony/$PACKAGE/releases/$TARBALL"
12 EXTRA_SOURCE_FILES="dahdi-fw-hx8-2.06.tar.gz \
13 dahdi-fw-oct6114-064-1.05.01.tar.gz dahdi-fw-oct6114-128-1.05.01.tar.gz \
14 dahdi-fw-oct6114-256-1.05.01.tar.gz dahdi-fw-tc400m-MR6.12.tar.gz \
15 dahdi-fw-te820-1.76.tar.gz dahdi-fw-vpmoct032-1.12.0.tar.gz \
16 dahdi-fwload-vpmadt032-1.25.0.tar.gz"
18 DEPENDS="linux udev"
19 BUILD_DEPENDS="linux-module-headers xz"
21 # Rules to gen a SliTaz package suitable for Tazpkg.
22 compile_rules()
23 {
24 sed -i 's|/sbin/depmod|echo &|' Makefile
25 sed -i 's/tar -xof/tar -xf/' drivers/dahdi/firmware/Makefile
26 for i in $EXTRA_SOURCE_FILES ; do
27 [ -s $SOURCES_REPOSITORY/$i ] || continue
28 cp $SOURCES_REPOSITORY/$i drivers/dahdi/firmware/
29 tar xzf $SOURCES_REPOSITORY/$i -C drivers/dahdi/firmware/
30 done
31 find -type f | xargs sed -i -e 's/DECLARE_MUTEX/DEFINE_SEMAPHORE/g' \
32 -e 's/init_MUTEX\([^)]*\)/sema_init\1, 1/g'
33 make KVERS="/usr/src/linux" install 2>&1 | grep -v 'slitaz/modules' &&
34 find $DESTDIR/lib/modules -name '*.ko' -exec xz {} \;
35 for i in $EXTRA_SOURCE_FILES ; do
36 [ -s $SOURCES_REPOSITORY/$i ] ||
37 cp drivers/dahdi/firmware/$i $SOURCES_REPOSITORY/
38 done
39 }
41 # Rules to gen a SliTaz package suitable for Tazpkg.
42 genpkg_rules()
43 {
44 EXTRAVERSION=_${kvers}
45 cp -a $install/* $fs
46 rm -rf $fs/usr/include
47 }
49 # Post install/remove commands for Tazpkg.
50 post_install()
51 {
52 chroot "$root/" depmod -a ${EXTRAVERSION#_}-slitaz
53 }
55 post_remove()
56 {
57 chroot "$root/" depmod -a ${EXTRAVERSION#_}-slitaz
58 }