wok rev 10668

linmodem-*: clean-up, tab ident and user $kvers set by pkg builders
author Christophe Lincoln <pankso@slitaz.org>
date Fri May 27 10:23:00 2011 +0200 (2011-05-27)
parents 1518333a0bc2
children d9d5114598b0
files linmodem-agrsm/receipt linmodem-hsfmodem/receipt linmodem-intel-536ep/receipt linmodem-intel-537/receipt linmodem-slmodem/receipt
line diff
     1.1 --- a/linmodem-agrsm/receipt	Fri May 27 09:55:17 2011 +0200
     1.2 +++ b/linmodem-agrsm/receipt	Fri May 27 10:23:00 2011 +0200
     1.3 @@ -15,28 +15,24 @@
     1.4  # Rules to configure and make the package.
     1.5  compile_rules()
     1.6  {
     1.7 -	KVERS=$(grep ^VERSION= $INSTALLED/linux/receipt | cut -d '"' -f 2)
     1.8  	sed -i \
     1.9  		-e 's/\([^_]\)usb_buffer_free/\1usb_free_coherent/' \
    1.10  		-e 's/\([^_]\)usb_buffer_alloc/\1usb_alloc_coherent/' \
    1.11  		agrsoftmodem.c
    1.12 -	make KERNEL_DIR=/usr/src/linux-$KVERS-slitaz KRELEASE=$KVERS
    1.13 +	make KERNEL_DIR=/usr/src/linux-$kvers-slitaz KRELEASE=$kvers
    1.14  }
    1.15  	
    1.16  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.17  genpkg_rules()
    1.18 -{	
    1.19 -	KVERS=$(grep ^VERSION= $INSTALLED/linux/receipt | cut -d '"' -f 2)
    1.20 -	EXTRAVERSION=_$KVERS
    1.21 -	echo "EXTRAVERSION: $EXTRAVERSION"
    1.22 -	
    1.23 -	mkdir -p $fs/lib/modules/$KVERS-slitaz/kernel/drivers/net
    1.24 +{
    1.25 +	EXTRAVERSION=_${kvers}
    1.26 +	mkdir -p $fs/lib/modules/$kvers-slitaz/kernel/drivers/net
    1.27  	
    1.28  	# Compress and install module
    1.29 -	lzma e $src/agrmodem.ko $fs/lib/modules/$KVERS-slitaz/kernel/drivers/net/agrmodem.ko.gz
    1.30 -	lzma e $src/agrserial.ko $fs/lib/modules/$KVERS-slitaz/kernel/drivers/net/agrserial.ko.gz		
    1.31 -	chown root $fs/lib/modules/$KVERS-slitaz/kernel/drivers/net/*.ko.gz
    1.32 -	chmod 0644 $fs/lib/modules/$KVERS-slitaz/kernel/drivers/net/*.ko.gz			
    1.33 +	lzma e $src/agrmodem.ko $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/agrmodem.ko.gz
    1.34 +	lzma e $src/agrserial.ko $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/agrserial.ko.gz		
    1.35 +	chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/*.ko.gz
    1.36 +	chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/*.ko.gz			
    1.37  }
    1.38  
    1.39  post_install()
     2.1 --- a/linmodem-hsfmodem/receipt	Fri May 27 09:55:17 2011 +0200
     2.2 +++ b/linmodem-hsfmodem/receipt	Fri May 27 10:23:00 2011 +0200
     2.3 @@ -6,39 +6,38 @@
     2.4  CATEGORY="non-free"
     2.5  SHORT_DESC="Driver for the Conexant (formerly Rockwell) HSF Softmodem family."
     2.6  MAINTAINER="orphaned@sliatz.org"
     2.7 -DEPENDS="module-init-tools perl usbutils"
     2.8 -BUILD_DEPENDS="cpio linux lzma linux-module-headers util-linux-ng-getopt"
     2.9  TARBALL="$SOURCE-$VERSION.tar.gz"
    2.10  WEB_SITE="http://www.linuxant.com/drivers"
    2.11  WGET_URL="http://www.linuxant.com/drivers/hsf/full/archive/$SOURCE-$VERSION/$TARBALL"
    2.12  
    2.13 +DEPENDS="module-init-tools perl usbutils"
    2.14 +BUILD_DEPENDS="cpio linux lzma linux-module-headers util-linux-ng-getopt \
    2.15 +usbutils-dev"
    2.16 +
    2.17  # Rules to configure and make the package.
    2.18  compile_rules()
    2.19  {
    2.20 -	KERNEL_VERSION=`grep  ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    2.21  	cd $src
    2.22  	echo "Apply $file..."
    2.23  	patch -p1 < $(ls $stuff/$SOURCE-*.diff) || return 1
    2.24 -	grep -rl 'uname -r' . | xargs sed -i "s/uname -r/echo $KERNEL_VERSION/g"
    2.25 +	grep -rl 'uname -r' . | xargs sed -i "s/uname -r/echo $kvers/g"
    2.26  	# build driver
    2.27  	echo "Build driver"
    2.28 -	make ROOT=$PWD/_pkg install
    2.29 +	make ROOT=$DESTDIR install
    2.30  	# build kernel modules
    2.31 -	echo "Running $PWD/_pkg/usr/sbin/hsfconfig -ka"
    2.32 -	$PWD/_pkg/usr/sbin/hsfconfig -ka
    2.33 -	echo "done."
    2.34 -	[ -d /lib/modules/$KERNEL_VERSION/extra ]
    2.35 +	echo "Running $DESTDIR/usr/sbin/hsfconfig -ka..."
    2.36 +	$DESTDIR/usr/sbin/hsfconfig -ka
    2.37 +	echo " OK"
    2.38  }
    2.39  
    2.40  # Rules to gen a SliTaz package suitable for Tazpkg.
    2.41  genpkg_rules()
    2.42  {
    2.43 -	KERNEL_VERSION=`grep  ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    2.44  	# kernel modules
    2.45 -	mkdir -p $fs/lib/modules/$KERNEL_VERSION
    2.46 -	cp -a /lib/modules/$KERNEL_VERSION/extra $fs/lib/modules/$KERNEL_VERSION
    2.47 +	mkdir -p $fs/lib/modules/$kvers
    2.48 +	cp -a /lib/modules/$kvers/extra $fs/lib/modules/$kvers
    2.49  	# cleaning up
    2.50 -	rm -r /lib/modules/$KERNEL_VERSION/extra
    2.51 +	rm -r /lib/modules/$kvers/extra
    2.52  	# command files
    2.53  	mkdir -p $fs/usr
    2.54  	cp -a $_pkg/usr/sbin $fs/usr
     3.1 --- a/linmodem-intel-536ep/receipt	Fri May 27 09:55:17 2011 +0200
     3.2 +++ b/linmodem-intel-536ep/receipt	Fri May 27 10:23:00 2011 +0200
     3.3 @@ -5,49 +5,46 @@
     3.4  CATEGORY="network"
     3.5  MAINTAINER="jozee@slitaz.org"
     3.6  SHORT_DESC="Intel Modem Drivers for 536EP chipset"
     3.7 -DEPENDS="linux"
     3.8 -BUILD_DEPENDS="linux-module-headers lzma"
     3.9  WEB_SITE="http://linmodems.technion.ac.il/packages/Intel/"
    3.10  TARBALL="intel-536EP-537EP_2009_07_04.tar.bz2"
    3.11  WGET_URL="$WEB_SITE/Philippe.Vouters/$TARBALL"
    3.12 -TAGS=""
    3.13 +
    3.14 +DEPENDS="linux"
    3.15 +BUILD_DEPENDS="linux-module-headers lzma"
    3.16  
    3.17  # Rules to configure and make the package.
    3.18 -
    3.19 -compile_rules() {
    3.20 -    
    3.21 -  KERNEL_VERSION=`grep  ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    3.22 -  cd $src
    3.23 -
    3.24 -  while read file; do
    3.25 -    	[ -f done.$file ] && continue
    3.26 -    	echo "Apply $file..."
    3.27 -    	patch -p1 < $stuff/$PACKAGE-$file || return 1
    3.28 +compile_rules()
    3.29 +{
    3.30 +	cd $src	
    3.31 +	while read file; do
    3.32 +		[ -f done.$file ] && continue
    3.33 +		echo "Apply $file..."
    3.34 +		patch -p1 < $stuff/$PACKAGE-$file || return 1
    3.35  	touch done.$file
    3.36 -    done <<EOT
    3.37 +	done <<EOT
    3.38  kernel-2.6.30.patch
    3.39  kernel-2.6.33.patch
    3.40  kernel-2.6.37.patch
    3.41  EOT
    3.42 -  grep -rl 'uname -r' * | xargs sed -i "s/uname -r/echo $KERNEL_VERSION/"
    3.43 -   # Bypass linux source package check
    3.44 -  sed -i 's/@bash config_check/#@bash config_check/' makefile
    3.45 -  grep -rl 'linux/autoconf.h' * | xargs sed -i 's|linux/autoconf.h|generated/autoconf.h|'
    3.46 -  make KERNEL_SOURCE_PATH=/usr/src/linux KDIR=/usr/src/linux MODEM_TYPE=536 536
    3.47 +	grep -rl 'uname -r' * | xargs sed -i "s/uname -r/echo $kvers/"
    3.48 +	# Bypass linux source package check
    3.49 +	sed -i 's/@bash config_check/#@bash config_check/' makefile
    3.50 +	grep -rl 'linux/autoconf.h' * | xargs sed -i \
    3.51 +		's|linux/autoconf.h|generated/autoconf.h|'
    3.52 +	make KERNEL_SOURCE_PATH=/usr/src/linux KDIR=/usr/src/linux MODEM_TYPE=536 536
    3.53  }
    3.54  	
    3.55  # Rules to gen a SliTaz package suitable for Tazpkg.
    3.56  genpkg_rules()
    3.57  {	
    3.58 -	KERNEL_VERSION=`grep  ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    3.59 -	EXTRAVERSION=_$KERNEL_VERSION
    3.60 -	
    3.61 -	mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net
    3.62 +	EXTRAVERSION=_${kvers}
    3.63 +	mkdir -p $fs/lib/modules/$kvers-slitaz/kernel/drivers/net
    3.64  	
    3.65  	# Compress and install module
    3.66 -	lzma e $src/Intel536.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/intel536.ko.gz
    3.67 -	chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/intel536.ko.gz
    3.68 -	chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/intel536.ko.gz		
    3.69 +	lzma e $src/Intel536.ko \
    3.70 +		$fs/lib/modules/$kvers-slitaz/kernel/drivers/net/intel536.ko.gz
    3.71 +	chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/intel536.ko.gz
    3.72 +	chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/intel536.ko.gz		
    3.73  }
    3.74  
    3.75  post_install()
     4.1 --- a/linmodem-intel-537/receipt	Fri May 27 09:55:17 2011 +0200
     4.2 +++ b/linmodem-intel-537/receipt	Fri May 27 10:23:00 2011 +0200
     4.3 @@ -13,42 +13,38 @@
     4.4  TAGS=""
     4.5  
     4.6  # Rules to configure and make the package.
     4.7 -
     4.8 -compile_rules() {
     4.9 -	 
    4.10 - KERNEL_VERSION=`grep  ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    4.11 - cd $src
    4.12 -
    4.13 -  while read file; do
    4.14 -    	[ -f done.$file ] && continue
    4.15 -    	echo "Apply $file..."
    4.16 -    	patch -p1 < $stuff/$PACKAGE-$file || return 1
    4.17 -	touch done.$file
    4.18 -    done <<EOT
    4.19 +compile_rules()
    4.20 +{
    4.21 +	cd $src
    4.22 +	while read file; do
    4.23 +		[ -f done.$file ] && continue
    4.24 +		echo "Apply $file..."
    4.25 +		patch -p1 < $stuff/$PACKAGE-$file || return 1
    4.26 +		touch done.$file
    4.27 +	done <<EOT
    4.28  kernel-2.6.30.patch
    4.29  kernel-2.6.33.patch
    4.30  kernel-2.6.37.patch
    4.31  EOT
    4.32 -  grep -rl 'uname -r' * | xargs sed -i "s/uname -r/echo $KERNEL_VERSION/"
    4.33 -   # Bypass linux source package check
    4.34 -  sed -i 's/@bash config_check/#@bash config_check/' makefile
    4.35 -  grep -rl 'linux/autoconf.h' * | xargs sed -i 's|linux/autoconf.h|generated/autoconf.h|'
    4.36 -  make KERNEL_SOURCE_PATH=/usr/src/linux KDIR=/usr/src/linux MODEM_TYPE=537 537
    4.37 -  
    4.38 +	grep -rl 'uname -r' * | xargs sed -i "s/uname -r/echo $kvers/"
    4.39 +	# Bypass linux source package check
    4.40 +	sed -i 's/@bash config_check/#@bash config_check/' makefile
    4.41 +	grep -rl 'linux/autoconf.h' * | xargs sed -i \
    4.42 +		's|linux/autoconf.h|generated/autoconf.h|'
    4.43 +	make KERNEL_SOURCE_PATH=/usr/src/linux KDIR=/usr/src/linux MODEM_TYPE=537 537
    4.44  }
    4.45  	
    4.46  # Rules to gen a SliTaz package suitable for Tazpkg.
    4.47  genpkg_rules()
    4.48  {	
    4.49 -	KERNEL_VERSION=`grep  ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    4.50 -	EXTRAVERSION=_$KERNEL_VERSION
    4.51 -	
    4.52 -	mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net
    4.53 +	EXTRAVERSION=_${kvers}
    4.54 +	mkdir -p $fs/lib/modules/$kvers-slitaz/kernel/drivers/net
    4.55  	
    4.56  	# Compress and install module
    4.57 -	lzma e $src/Intel537.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/intel537.ko.gz
    4.58 -	chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/intel537.ko.gz
    4.59 -	chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/intel537.ko.gz			
    4.60 +	lzma e $src/Intel537.ko \
    4.61 +		$fs/lib/modules/$kvers-slitaz/kernel/drivers/net/intel537.ko.gz
    4.62 +	chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/intel537.ko.gz
    4.63 +	chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/intel537.ko.gz			
    4.64  }
    4.65  
    4.66  post_install()
     5.1 --- a/linmodem-slmodem/receipt	Fri May 27 09:55:17 2011 +0200
     5.2 +++ b/linmodem-slmodem/receipt	Fri May 27 10:23:00 2011 +0200
     5.3 @@ -5,51 +5,44 @@
     5.4  CATEGORY="network"
     5.5  MAINTAINER="jozee@slitaz.org"
     5.6  SHORT_DESC="Drivers for the Smartlink winmodems"
     5.7 -BUILD_DEPENDS="linux lzma"
     5.8  WEB_SITE="http://linmodems.technion.ac.il/packages/smartlink/"
     5.9  SOURCE="slmodem"
    5.10  TARBALL="$SOURCE-$VERSION.tar.gz"
    5.11  WGET_URL="$WEB_SITE/$TARBALL"
    5.12 -TAGS=""
    5.13 +
    5.14 +BUILD_DEPENDS="linux-module-headers lzma"
    5.15  
    5.16  # Rules to configure and make the package.
    5.17  
    5.18  compile_rules() {
    5.19 -    
    5.20 - KERNEL_VERSION=`grep  ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    5.21 - [ -d $WOK/linux/taz ] || tazwok cook linux
    5.22 - 
    5.23 - ungrab=ungrab-winmodem-20090716
    5.24 - [ -f $SOURCES_REPOSITORY/$ungrab.tar.gz ] ||
    5.25 -	wget $WEB_SITE/$ungrab.tar.gz -P $SOURCES_REPOSITORY
    5.26 - [ -d $ungrab ] || tar -xzf $SOURCES_REPOSITORY/$ungrab.tar.gz
    5.27 - cd $ungrab
    5.28 - make KERNEL_DIR=$WOK/linux/linux-$KERNEL_VERSION
    5.29 - cd $src
    5.30 -  for i in utsrelease.h ; do
    5.31 -    grep -rl linux/$i * | xargs sed -i "s|linux/$i|generated/$i|"
    5.32 -  done
    5.33 -  sed -i 's|^obj-m := slamr.o slusb.o|obj-m := slamr.o|' drivers/Makefile
    5.34 -  sed -i 's/\.ioctl/.unlocked_ioctl/' drivers/amrmo_init.c
    5.35 -  make KERNEL_DIR=$WOK/linux/linux-$KERNEL_VERSION SUPPORT_ALSA=1 DESTDIR=$PWD/_pkg drivers
    5.36 +	ungrab=ungrab-winmodem-20090716
    5.37 +	[ -f $SOURCES_REPOSITORY/$ungrab.tar.gz ] ||
    5.38 +		wget $WEB_SITE/$ungrab.tar.gz -P $SOURCES_REPOSITORY
    5.39 +	[ -d $ungrab ] || tar -xzf $SOURCES_REPOSITORY/$ungrab.tar.gz
    5.40 +	cd $ungrab
    5.41 +	make KERNEL_DIR=/usr/src/linux
    5.42 +	cd $src
    5.43 +	for i in utsrelease.h ; do
    5.44 +		grep -rl linux/$i * | xargs sed -i "s|linux/$i|generated/$i|"
    5.45 +	done
    5.46 +	sed -i 's|^obj-m := slamr.o slusb.o|obj-m := slamr.o|' drivers/Makefile
    5.47 +	sed -i 's/\.ioctl/.unlocked_ioctl/' drivers/amrmo_init.c
    5.48 +	make KERNEL_DIR=/usr/src/linux SUPPORT_ALSA=1 DESTDIR=$DESTDIR drivers
    5.49  }
    5.50  	
    5.51  # Rules to gen a SliTaz package suitable for Tazpkg.
    5.52  genpkg_rules()
    5.53  {	
    5.54 -	KERNEL_VERSION=`grep  ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    5.55 -	EXTRAVERSION=_$KERNEL_VERSION
    5.56 -	
    5.57 -	mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net
    5.58 +	EXTRAVERSION=_${kvers}
    5.59 +	mkdir -p $fs/lib/modules/$kvers-slitaz/kernel/drivers/net
    5.60  	
    5.61  	# Compress and install module
    5.62 -	lzma e $src/drivers/slamr.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/slamr.ko.gz
    5.63 -	lzma e ungrab-winmodem-20090716/ungrab-winmodem.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/ungrab-winmodem.ko.gz
    5.64 -	chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/slamr.ko.gz
    5.65 -	chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/ungrab-winmodem.ko.gz
    5.66 -	chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/slamr.ko.gz	
    5.67 -	chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/ungrab-winmodem.ko.gz
    5.68 -		
    5.69 +	lzma e $src/drivers/slamr.ko \
    5.70 +		$fs/lib/modules/$kvers-slitaz/kernel/drivers/net/slamr.ko.gz
    5.71 +	lzma e ungrab-winmodem-20090716/ungrab-winmodem.ko \
    5.72 +		$fs/lib/modules/$kvers-slitaz/kernel/drivers/net/ungrab-winmodem.ko.gz
    5.73 +	chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/*.ko.gz
    5.74 +	chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/*.ko.gz	
    5.75  }
    5.76  
    5.77  post_install()