wok-undigest view linmodem-slmodem/receipt @ rev 1091
Add most MATE desktop pkgs (was in a local wok for too long time...)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu Jan 02 18:04:57 2014 +0100 (2014-01-02) |
parents | 83b4ca62624e |
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 LICENSE="BSD"
8 SHORT_DESC="Drivers for the Smartlink winmodems"
9 WEB_SITE="http://linmodems.technion.ac.il/packages/smartlink/"
10 SOURCE="slmodem"
11 TARBALL="$SOURCE-$VERSION.tar.gz"
12 WGET_URL="$WEB_SITE/$TARBALL"
14 BUILD_DEPENDS="linux-module-headers xz"
16 # Rules to configure and make the package.
18 compile_rules() {
19 ungrab=ungrab-winmodem-20090716
20 [ -f $SOURCES_REPOSITORY/$ungrab.tar.gz ] ||
21 wget $WEB_SITE/$ungrab.tar.gz -P $SOURCES_REPOSITORY
22 [ -d $ungrab ] || tar -xzf $SOURCES_REPOSITORY/$ungrab.tar.gz
23 cd $ungrab
24 make KERNEL_DIR=/usr/src/linux
25 cd $src
26 for i in utsrelease.h ; do
27 grep -rl linux/$i * | xargs sed -i "s|linux/$i|generated/$i|"
28 done
29 sed -i 's|^obj-m := slamr.o slusb.o|obj-m := slamr.o|' drivers/Makefile
30 sed -i 's/\.ioctl/.unlocked_ioctl/' drivers/amrmo_init.c
31 sed -i -e 's/DECLARE_MUTEX/DEFINE_SEMAPHORE/' \
32 -e 's/init_MUTEX\([^)]*\)/sema_init\1, 1/' drivers/st7554.c
33 make KERNEL_DIR=/usr/src/linux SUPPORT_ALSA=1 DESTDIR=$DESTDIR drivers
34 }
36 # Rules to gen a SliTaz package suitable for Tazpkg.
37 genpkg_rules()
38 {
39 EXTRAVERSION=_${kvers%.*}
40 mkdir -p $fs/lib/modules/$kvers-slitaz/kernel/drivers/net
42 # Compress and install module
43 cp $src/drivers/slamr.ko \
44 $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/
45 xz $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/slamr.ko
46 cp ungrab-winmodem-20090716/ungrab-winmodem.ko \
47 $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/
48 xz $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/ungrab-winmodem.ko
49 chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/*.ko.xz
50 chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/*.ko.xz
51 }
53 post_install()
54 {
55 echo "Processing post-install commands..."
56 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
57 }
59 post_remove()
60 {
61 echo "Processing post-remove commands..."
62 depmod -a
63 }