wok-next view linmodem-slmodem/receipt @ rev 13820
thunderbird: limit long (was create > 100G !)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Jan 06 21:18:32 2013 +0100 (2013-01-06) |
parents | b9368eac086f |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="linmodem-slmodem"
4 VERSION="2.9.11-20100303"
5 CATEGORY="network"
6 MAINTAINER="jozee@slitaz.org"
7 SHORT_DESC="Drivers for the Smartlink winmodems"
8 WEB_SITE="http://linmodems.technion.ac.il/packages/smartlink/"
9 SOURCE="slmodem"
10 TARBALL="$SOURCE-$VERSION.tar.gz"
11 WGET_URL="$WEB_SITE/$TARBALL"
13 BUILD_DEPENDS="linux-module-headers xz"
15 # Rules to configure and make the package.
17 compile_rules() {
18 ungrab=ungrab-winmodem-20090716
19 [ -f $SOURCES_REPOSITORY/$ungrab.tar.gz ] ||
20 wget $WEB_SITE/$ungrab.tar.gz -P $SOURCES_REPOSITORY
21 [ -d $ungrab ] || tar -xzf $SOURCES_REPOSITORY/$ungrab.tar.gz
22 cd $ungrab
23 make KERNEL_DIR=/usr/src/linux
24 cd $src
25 for i in utsrelease.h ; do
26 grep -rl linux/$i * | xargs sed -i "s|linux/$i|generated/$i|"
27 done
28 sed -i 's|^obj-m := slamr.o slusb.o|obj-m := slamr.o|' drivers/Makefile
29 sed -i 's/\.ioctl/.unlocked_ioctl/' drivers/amrmo_init.c
30 sed -i -e 's/DECLARE_MUTEX/DEFINE_SEMAPHORE/' \
31 -e 's/init_MUTEX\([^)]*\)/sema_init\1, 1/' drivers/st7554.c
32 make KERNEL_DIR=/usr/src/linux SUPPORT_ALSA=1 DESTDIR=$DESTDIR drivers
33 }
35 # Rules to gen a SliTaz package suitable for Tazpkg.
36 genpkg_rules()
37 {
38 EXTRAVERSION=_${kvers%.*}
39 mkdir -p $fs/lib/modules/$kvers-slitaz/kernel/drivers/net
41 # Compress and install module
42 cp $src/drivers/slamr.ko \
43 $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/
44 xz $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/slamr.ko
45 cp ungrab-winmodem-20090716/ungrab-winmodem.ko \
46 $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/
47 xz $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/ungrab-winmodem.ko
48 chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/*.ko.xz
49 chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/*.ko.xz
50 }
52 post_install()
53 {
54 echo "Processing post-install commands..."
55 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
56 }
58 post_remove()
59 {
60 echo "Processing post-remove commands..."
61 depmod -a
62 }