wok view linmodem-intel-537/receipt @ rev 10274

ncurses*: build fail if native build system is used so use the compiler machine type
author Christophe Lincoln <pankso@slitaz.org>
date Sat May 21 21:22:47 2011 +0200 (2011-05-21)
parents 9f4d002c2b7f
children 51dc38f6efca
line source
1 # SliTaz package receipt.
3 PACKAGE="linmodem-intel-537"
4 VERSION="2.60.80.0"
5 CATEGORY="network"
6 MAINTAINER="jozee@slitaz.org"
7 SHORT_DESC="Intel Modem Drivers for 537 chipsets"
8 DEPENDS="linux"
9 BUILD_DEPENDS="linux-module-headers lzma"
10 WEB_SITE="http://linmodems.technion.ac.il/packages/Intel/"
11 TARBALL="intel-536EP-537EP_2009_07_04.tar.bz2"
12 WGET_URL="$WEB_SITE/Philippe.Vouters/$TARBALL"
13 TAGS=""
15 # Rules to configure and make the package.
17 compile_rules() {
19 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
20 cd $src
22 while read file; do
23 [ -f done.$file ] && continue
24 echo "Apply $file..."
25 patch -p1 < $stuff/$PACKAGE-$file || return 1
26 touch done.$file
27 done <<EOT
28 kernel-2.6.30.patch
29 kernel-2.6.33.patch
30 kernel-2.6.37.patch
31 EOT
32 grep -rl 'uname -r' * | xargs sed -i "s/uname -r/echo $KERNEL_VERSION/"
33 # Bypass linux source package check
34 sed -i 's/@bash config_check/#@bash config_check/' makefile
35 grep -rl 'linux/autoconf.h' * | xargs sed -i 's|linux/autoconf.h|generated/autoconf.h|'
36 make KERNEL_SOURCE_PATH=/usr/src/linux KDIR=/usr/src/linux MODEM_TYPE=537 537
38 }
40 # Rules to gen a SliTaz package suitable for Tazpkg.
41 genpkg_rules()
42 {
43 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
44 EXTRAVERSION=_$KERNEL_VERSION
46 mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net
48 # Compress and install module
49 lzma e $src/Intel537.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/intel537.ko.gz
50 chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/intel537.ko.gz
51 chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/intel537.ko.gz
52 }
54 post_install()
55 {
56 echo "Processing post-install commands..."
57 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
58 }
60 post_remove()
61 {
62 echo "Processing post-remove commands..."
63 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
64 }