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