wok-next view dahdi-linux/receipt @ rev 20146
Up qemu-light (2.0.2)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Nov 01 11:50:08 2017 +0100 (2017-11-01) |
parents | 06f5cd437bd1 |
children | d247e85339a4 |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="dahdi-linux"
4 VERSION="2.11.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 dahdi-fw-oct6114-032-1.05.01.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-fw-te133-7a001e.tar.gz dahdi-fw-te134-780017.tar.gz \
17 dahdi-fw-te435-13001e.tar.gz dahdi-fw-te436-10017.tar.gz \
18 dahdi-fw-a8b-1f001e.tar.gz dahdi-fw-a8a-1d0017.tar.gz \
19 dahdi-fw-a4b-d001e.tar.gz dahdi-fw-a4a-a0017.tar.gz \
20 dahdi-fwload-vpmadt032-1.25.0.tar.gz"
22 BUILD_DEPENDS="linux-module-headers xz perl"
23 SPLIT="dahdi-linux dahdi-linux-dev"
25 # Rules to gen a SliTaz package suitable for Tazpkg.
26 compile_rules()
27 {
28 FIRMWARE_URL=http://downloads.digium.com/pub/telephony/firmware/releases
29 for i in $EXTRA_SOURCE_FILES ; do
30 [ -s $SOURCES_REPOSITORY/$i ] ||
31 wget -P $SOURCES_REPOSITORY $FIRMWARE_URL/$i
32 cp $SOURCES_REPOSITORY/$i drivers/dahdi/firmware/
33 tar xzf $SOURCES_REPOSITORY/$i -C drivers/dahdi/firmware/
34 done
35 make KVERS="/usr/src/linux" install 2>&1 | grep -v 'slitaz/modules' &&
36 find $DESTDIR/lib/modules -name '*.ko' -exec xz {} \;
37 for i in $EXTRA_SOURCE_FILES ; do
38 [ -s $SOURCES_REPOSITORY/$i ] ||
39 cp drivers/dahdi/firmware/$i $SOURCES_REPOSITORY/
40 done
41 }
43 # Rules to gen a SliTaz package suitable for Tazpkg.
44 genpkg_rules()
45 {
46 case $PACKAGE in
47 dahdi-linux)
48 DEPENDS="linux udev"
49 EXTRAVERSION=_${kvers}
50 cp -a $install/* $fs
51 rm -rf $fs/usr/include
52 ;;
53 dahdi-linux-dev)
54 CAT="development|Digium Asterisk Hardware Device Interface: kernel modules dev files."
55 EXTRAVERSION=_${kvers}
56 mkdir -p $fs/usr
57 cp -a $install/usr/include $fs/usr
58 ;;
59 esac
60 }
62 # Post install/remove commands for Tazpkg.
63 post_install_dahdi_linux()
64 {
65 chroot "$root/" depmod -a ${EXTRAVERSION#_}-slitaz
66 }
68 post_remove_dahdi_linux()
69 {
70 chroot "$root/" depmod -a ${EXTRAVERSION#_}-slitaz
71 }