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