wok-4.x rev 3459

get-softmodem-driver: simplifying the build process
author Dominique Corbex <domcox@users.sourceforge.net>
date Mon Jun 15 21:45:58 2009 +0200 (2009-06-15)
parents df0a411febfa
children c7e7f915b4f1
files get-softmodem-driver/receipt get-softmodem-driver/stuff/get-softmodem-driver get-softmodem-driver/stuff/hsfmodem-7.80.02.04full.diff
line diff
     1.1 --- a/get-softmodem-driver/receipt	Mon Jun 15 15:16:14 2009 +0000
     1.2 +++ b/get-softmodem-driver/receipt	Mon Jun 15 21:45:58 2009 +0200
     1.3 @@ -1,7 +1,7 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="get-softmodem-driver"
     1.7 -VERSION="0.3"
     1.8 +VERSION="0.4"
     1.9  CATEGORY="non-free"
    1.10  SHORT_DESC="Get misc softmodem drivers."
    1.11  MAINTAINER="domcox@slitaz.org"
     2.1 --- a/get-softmodem-driver/stuff/get-softmodem-driver	Mon Jun 15 15:16:14 2009 +0000
     2.2 +++ b/get-softmodem-driver/stuff/get-softmodem-driver	Mon Jun 15 21:45:58 2009 +0200
     2.3 @@ -65,7 +65,6 @@
     2.4  
     2.5  # Set dirs
     2.6  src=/usr/src/$PACKAGE-$VERSION
     2.7 -_pkg=$src/_pkg
     2.8  taz=/tmp/sm$RANDOM$RANDOM$RANDOM.$$
     2.9  fs=$taz/$PACKAGE-$VERSION/fs
    2.10  mkdir -p $fs
    2.11 @@ -76,20 +75,15 @@
    2.12  	# Rules to configure and make the package.
    2.13  	cd $src
    2.14  	echo "Apply $file..."
    2.15 -	patch -p1 < /usr/share/softmodem/$PACKAGE-$VERSION.diff || return 1
    2.16 +	patch -p1 < /usr/share/softmodem/$PACKAGE-$VERSION.diff || exit 1
    2.17  	# Build
    2.18 -	make DESTDIR=$_pkg install
    2.19 -	cd $_pkg/usr/lib/hsfmodem/modules
    2.20 -	make
    2.21 -	# Rules to gen a SliTaz package suitable for Tazpkg.
    2.22 +	make all
    2.23 +	make ROOT=$fs install
    2.24 +	make clean
    2.25 +	# Data for automatic region setting
    2.26  	mkdir -p $fs/usr/share/softmodem
    2.27 -	cp -a $_pkg/usr/sbin $fs/usr
    2.28  	cp -a /usr/share/softmodem/zone.tab $fs/usr/share/softmodem/hsfzone.tab
    2.29 -	MODS_DIR=$fs/lib/modules/`uname -r`/extra
    2.30 -	mkdir -p $MODS_DIR
    2.31 -	cp -a $_pkg/usr/lib/hsfmodem/modules/*.ko $MODS_DIR
    2.32 -	cd $src
    2.33 -	make clean
    2.34 +	# src is needed
    2.35  	cd $taz
    2.36  	mkdir -p $fs/usr/src
    2.37  	mv $src $fs/usr/src
     3.1 --- a/get-softmodem-driver/stuff/hsfmodem-7.80.02.04full.diff	Mon Jun 15 15:16:14 2009 +0000
     3.2 +++ b/get-softmodem-driver/stuff/hsfmodem-7.80.02.04full.diff	Mon Jun 15 21:45:58 2009 +0200
     3.3 @@ -1,15 +1,6 @@
     3.4  diff -ru hsfmodem-7.80.02.04full/config.mak hsfmodem-7.80.02.04full-slitaz/config.mak
     3.5  --- hsfmodem-7.80.02.04full/config.mak	2009-02-20 22:30:12.000000000 +0100
     3.6  +++ hsfmodem-7.80.02.04full-slitaz/config.mak	2009-06-15 11:49:13.000000000 +0200
     3.7 -@@ -55,7 +55,7 @@
     3.8 - # maximum number of modem units
     3.9 - CNXTMAXMDM=8
    3.10 - 
    3.11 --ROOT=
    3.12 -+ROOT=$(DESTDIR)
    3.13 - PREFIX=$(ROOT)/usr
    3.14 - 
    3.15 - ETCDIR=$(ROOT)/etc
    3.16  @@ -131,4 +131,4 @@
    3.17   		-e "s!@SCR_SUPPORT@!`test ! \"$(IMPORTED_SCR_SUPPORT)\" = yes; echo $$?`!g" \
    3.18   		-e "s!@DMP_SUPPORT@!`test -z \"$(IMPORTED_DMP_SUPPORT)\"; echo $$?`!g" \
    3.19 @@ -40,10 +31,9 @@
    3.20   ifneq ($(subst powerpc,ppc,$(IMPORTED_ARCH)),$(MACHINE_ARCH))
    3.21   $(warning *** WARNING: Trying to compile kernel modules on a $(MACHINE_ARCH) system while the installed $(CNXTTARGET) driver package is for $(IMPORTED_ARCH), this is likely to fail... ***)
    3.22   endif
    3.23 -
    3.24  diff -ru hsfmodem-7.80.02.04full/scripts/cnxtconfig.in hsfmodem-7.80.02.04full-slitaz/scripts/cnxtconfig.in
    3.25  --- hsfmodem-7.80.02.04full/scripts/cnxtconfig.in	2009-04-23 17:32:18.000000000 +0200
    3.26 -+++ hsfmodem-7.80.02.04full-slitaz/scripts/cnxtconfig.in	2009-06-15 14:08:02.000000000 +0200
    3.27 ++++ hsfmodem-7.80.02.04full-slitaz/scripts/cnxtconfig.in	2009-06-15 21:29:49.000000000 +0200
    3.28  @@ -74,7 +74,7 @@
    3.29   				answer="${region}"
    3.30   				;;
    3.31 @@ -95,6 +85,15 @@
    3.32   	)
    3.33   }
    3.34   
    3.35 +@@ -271,7 +262,7 @@
    3.36 + # The md5sum is used for input verification.
    3.37 + disptokey()
    3.38 + {
    3.39 +-	k="`echo \"$1\" | tr '[a-z]' '[A-Z]' | sed 's/FREE/00000000/' | tr -d -c '[0-9A-F\012]'`"
    3.40 ++	k="`echo \"$1\" | tr '[a-z]' '[A-Z]' | sed 's/FREE/00000000/' | tr -d -c '[0-9][A-F][\012]'`"
    3.41 + 	case $k in
    3.42 + 	00000000)
    3.43 + 		echo "$k"
    3.44  @@ -1655,7 +1646,7 @@
    3.45   		update-modules
    3.46   	else
    3.47 @@ -113,68 +112,6 @@
    3.48   			if ! cp ${modprobeconf}.$$ ${modprobeconf}; then
    3.49   				rm -f ${modprobeconf}.$$ ${f}
    3.50   				exit 1
    3.51 -@@ -1729,7 +1720,7 @@
    3.52 - 	fi
    3.53 - 
    3.54 - 	if [ -h /dev/modem ] && /bin/ls -l /dev/modem 2>/dev/null | ${AWK} '{print $11}' | egrep -q '(ttyS|cua)@CNXTSERDEV@[0-9][0-9]*'; then
    3.55 --		rm -f /dev/modem
    3.56 -+		echo
    3.57 - 	fi
    3.58 - 
    3.59 - 	rm -f /etc/udev/rules.d/00-@CNXTTARGET@.rules
    3.60 -@@ -1753,7 +1744,7 @@
    3.61 - 	fi
    3.62 - 
    3.63 - 	echo "alias /dev/ttyS@CNXTSERDEV@[0-9]* /dev/ttyS@CNXTSERDEV@"
    3.64 --	echo "alias /dev/modem /dev/ttyS@CNXTSERDEV@"
    3.65 -+	echo "alias /dev/modem none"
    3.66 - 	echo "alias char-major-${cnxttty_major} /dev/ttyS@CNXTSERDEV@"
    3.67 - 	if [ "$1" = modulesconf ]; then
    3.68 - 		echo "alias /dev/cua@CNXTSERDEV@[0-9]* /dev/ttyS@CNXTSERDEV@"
    3.69 -@@ -1927,7 +1918,7 @@
    3.70 - REGISTER	^ttyS@CNXTSERDEV@0$ CFUNCTION GLOBAL symlink $devname modem
    3.71 - UNREGISTER	^ttyS@CNXTSERDEV@0$ CFUNCTION GLOBAL unlink modem' \
    3.72 - 			> /etc/devfs/conf.d/@CNXTTARGET@.conf
    3.73 --		rm -f /dev/modem
    3.74 -+		echo
    3.75 - 		which update-devfsd >/dev/null 2>&1 && update-devfsd
    3.76 - 		killall -HUP devfsd 2>/dev/null
    3.77 - 	else
    3.78 -@@ -1941,7 +1932,7 @@
    3.79 - 				cp /etc/devfsd.conf.$$ /etc/devfsd.conf
    3.80 - 			fi
    3.81 - 			rm -f /etc/devfsd.conf.$$
    3.82 --			rm -f /dev/modem
    3.83 -+			echo
    3.84 - 			killall -HUP devfsd 2>/dev/null
    3.85 - 		fi
    3.86 - 	fi
    3.87 -@@ -1990,13 +1981,13 @@
    3.88 - 		done
    3.89 - 
    3.90 - 		if [ -h /dev/modem ] && /bin/ls -l /dev/modem 2>/dev/null | ${AWK} '{print $11}' | egrep -q '(ttyS|cua)@CNXTSERDEV@[0-9][0-9]*'; then
    3.91 --			rm -f /dev/modem
    3.92 -+			echo
    3.93 - 		fi
    3.94 - 
    3.95 - 		if [ -e /dev/modem ]; then
    3.96 - 			if ! fuser /dev/modem >/dev/null 2>&1; then
    3.97 --				rm -f /dev/modem.old
    3.98 --				mv /dev/modem /dev/modem.old
    3.99 -+				echo
   3.100 -+				echo
   3.101 - 
   3.102 - 				echo "WARNING: renamed existing /dev/modem to /dev/modem.old:"
   3.103 - 				echo ""
   3.104 -@@ -2005,7 +1996,7 @@
   3.105 - 		fi
   3.106 - 
   3.107 - 		if [ ! -e /dev/modem ]; then
   3.108 --			ln -sf /dev/ttyS@CNXTSERDEV@0 /dev/modem
   3.109 -+			echo
   3.110 - 		fi
   3.111 - 	fi
   3.112 -   fi
   3.113  @@ -2214,6 +2205,10 @@
   3.114   	elif [ -d /var/lib/LST ]; then
   3.115   		OSDISTNAME=Caldera
   3.116 @@ -213,7 +150,7 @@
   3.117   			fi
   3.118   			shift 2
   3.119   			;;
   3.120 -@@ -2954,7 +2949,7 @@
   3.121 +@@ -2954,6 +2949,6 @@
   3.122   
   3.123   # Accept --region <name> as equivalent to --region=<name>
   3.124   if ${do_cfgregion} && [ $# -ge 1 -a -z "${setregion}" ]; then