wok-6.x view linmodem-slmodem/receipt @ rev 11060
pcmciautils: Fixed WGET_URL.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Mon Oct 17 00:27:48 2011 +0000 (2011-10-17) |
parents | |
children | b9368eac086f |
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 lzma"
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 lzma e $src/drivers/slamr.ko \
43 $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/slamr.ko.gz
44 lzma e ungrab-winmodem-20090716/ungrab-winmodem.ko \
45 $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/ungrab-winmodem.ko.gz
46 chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/*.ko.gz
47 chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/*.ko.gz
48 }
50 post_install()
51 {
52 echo "Processing post-install commands..."
53 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
54 }
56 post_remove()
57 {
58 echo "Processing post-remove commands..."
59 depmod -a
60 }