wok-6.x annotate linmodem-agrsm/receipt @ rev 10658
linmodem-agrsm: use linux-module-headers to build
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Fri May 27 07:05:15 2011 +0200 (2011-05-27) |
parents | 817ef09fb63f |
children | 51dc38f6efca |
rev | line source |
---|---|
jozee@4587 | 1 # SliTaz package receipt. |
jozee@4587 | 2 |
jozee@4587 | 3 PACKAGE="linmodem-agrsm" |
pascal@5468 | 4 SOURCE="agrsm-11c11040" |
jozee@5342 | 5 VERSION="2.1.80~20091225" |
jozee@4587 | 6 CATEGORY="network" |
jozee@4587 | 7 MAINTAINER="jozee@slitaz.org" |
jozee@4587 | 8 SHORT_DESC="Agere Modem Drivers for 11c11040 chipsets" |
jozee@4587 | 9 WEB_SITE="http://linmodems.technion.ac.il/packages/ltmodem/11c11040" |
pascal@5468 | 10 TARBALL="$SOURCE-$VERSION.tar.bz2" |
jozee@4587 | 11 WGET_URL="$WEB_SITE/$TARBALL" |
pankso@10658 | 12 |
pankso@10658 | 13 BUILD_DEPENDS="linux linux-module-headers lzma" |
jozee@4587 | 14 |
jozee@4587 | 15 # Rules to configure and make the package. |
pankso@10658 | 16 compile_rules() |
pankso@10658 | 17 { |
pankso@10658 | 18 KVERS=$(grep ^VERSION= $INSTALLED/linux/receipt | cut -d '"' -f 2) |
pankso@10658 | 19 sed -i \ |
pankso@10658 | 20 -e 's/\([^_]\)usb_buffer_free/\1usb_free_coherent/' \ |
pankso@10658 | 21 -e 's/\([^_]\)usb_buffer_alloc/\1usb_alloc_coherent/' \ |
pankso@10658 | 22 agrsoftmodem.c |
pankso@10658 | 23 make KERNEL_DIR=/usr/src/linux-$KVERS-slitaz KRELEASE=$KVERS |
jozee@4587 | 24 } |
jozee@4587 | 25 |
jozee@4587 | 26 # Rules to gen a SliTaz package suitable for Tazpkg. |
jozee@4587 | 27 genpkg_rules() |
jozee@4587 | 28 { |
pankso@10658 | 29 KVERS=$(grep ^VERSION= $INSTALLED/linux/receipt | cut -d '"' -f 2) |
pankso@10658 | 30 EXTRAVERSION=_$KVERS |
pankso@10658 | 31 echo "EXTRAVERSION: $EXTRAVERSION" |
jozee@4587 | 32 |
pankso@10658 | 33 mkdir -p $fs/lib/modules/$KVERS-slitaz/kernel/drivers/net |
jozee@4587 | 34 |
jozee@4587 | 35 # Compress and install module |
pankso@10658 | 36 lzma e $src/agrmodem.ko $fs/lib/modules/$KVERS-slitaz/kernel/drivers/net/agrmodem.ko.gz |
pankso@10658 | 37 lzma e $src/agrserial.ko $fs/lib/modules/$KVERS-slitaz/kernel/drivers/net/agrserial.ko.gz |
pankso@10658 | 38 chown root $fs/lib/modules/$KVERS-slitaz/kernel/drivers/net/*.ko.gz |
pankso@10658 | 39 chmod 0644 $fs/lib/modules/$KVERS-slitaz/kernel/drivers/net/*.ko.gz |
jozee@4587 | 40 } |
jozee@4587 | 41 |
jozee@4587 | 42 post_install() |
jozee@4587 | 43 { |
jozee@4587 | 44 echo "Processing post-install commands..." |
jozee@4587 | 45 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz |
jozee@4587 | 46 } |
jozee@4587 | 47 |
jozee@4587 | 48 post_remove() |
jozee@4587 | 49 { |
jozee@4587 | 50 echo "Processing post-remove commands..." |
jozee@4587 | 51 depmod -a |
jozee@4587 | 52 } |
jozee@4587 | 53 |