wok rev 582

Add: partimage, ndiswrapper
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Tue Apr 15 14:37:39 2008 +0200 (2008-04-15)
parents 019783a4c997
children 939fff6b5e25
files ndiswrapper/receipt ndiswrapper/stuff/gztazmod.sh partimage/receipt partimage/stuff/etc/init.d/partimaged partimage/stuff/etc/partimaged/partimaged.cert partimage/stuff/etc/partimaged/partimaged.key
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/ndiswrapper/receipt	Tue Apr 15 14:37:39 2008 +0200
     1.3 @@ -0,0 +1,55 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="ndiswrapper"
     1.7 +VERSION="1.52"
     1.8 +CATEGORY="system-tools"
     1.9 +SHORT_DESC="Add Windows network drivers support to Linux kernel."
    1.10 +MAINTAINER="Erjo <erjo@slitaz.org>"
    1.11 +DEPENDS=""
    1.12 +#WANTED="linux"
    1.13 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.14 +WEB_SITE="http://ndiswrapper.sourceforge.net/joomla/"
    1.15 +WGET_URL="http://dfn.dl.sourceforge.net/sourceforge/ndiswrapper/$TARBALL
    1.16 + http://puzzle.dl.sourceforge.net/sourceforge/ndiswrapper/$TARBALL"
    1.17 +
    1.18 +# Rules to configure and make the package.
    1.19 +compile_rules()
    1.20 +{
    1.21 +	
    1.22 +	KERNEL_VERSION=`grep  ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g`
    1.23 +	if [ ! -d $WOK/linux/linux-$KERNEL_VERSION ]; then
    1.24 +		tazwok cook linux
    1.25 +	fi
    1.26 +	cd $src
    1.27 +	make  KBUILD=$WOK/linux/linux-$KERNEL_VERSION KVER=$KERNEL_VERSION 
    1.28 +}
    1.29 +
    1.30 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.31 +genpkg_rules()
    1.32 +{
    1.33 +	KERNEL_VERSION=`grep  ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g`
    1.34 +	
    1.35 +	mkdir -p $fs/usr/sbin $fs/sbin $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/misc
    1.36 +	
    1.37 +	# Install utilities	
    1.38 +	install -o root -m 755 $src/utils/loadndisdriver $fs/sbin/
    1.39 +	install -o root -m 755 $src/utils/ndiswrapper $fs/usr/sbin/
    1.40 +	install -o root -m 755 $src/utils/ndiswrapper-buginfo $fs/usr/sbin/
    1.41 +	strip -s $fs/sbin/load*
    1.42 +
    1.43 +	# Compress and install module
    1.44 +	#./stuff/gztazmod.sh $fs/lib/modules/$VERSION-slitaz
    1.45 +	install -o root -m O644 $src/driver/ndiswrapper.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/misc
    1.46 +}
    1.47 +
    1.48 +post_install()
    1.49 +{
    1.50 +	echo "Processing post-install commands..."
    1.51 +	depmod -a
    1.52 +}
    1.53 +
    1.54 +post_remove()
    1.55 +{
    1.56 +	echo "Processing post-remove commands..."
    1.57 +	depmod -a
    1.58 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/ndiswrapper/stuff/gztazmod.sh	Tue Apr 15 14:37:39 2008 +0200
     2.3 @@ -0,0 +1,64 @@
     2.4 +#!/bin/sh
     2.5 +# gztazmod.sh: Compress Linux kernel modules for SliTaz GNU/Linux.
     2.6 +# 2007/10/04 <pankso@slitaz.org> - GNU General Public License.
     2.7 +#
     2.8 +
     2.9 +# We do our work in the kernel version modules directory.
    2.10 +if [ -z "$1" ] ; then
    2.11 +  echo ""
    2.12 +  echo -e "\033[1musage:\033[0m `basename $0` path/to/kernel-version"
    2.13 +  echo ""
    2.14 +  exit 1
    2.15 +fi
    2.16 +
    2.17 +if [ ! -r "$1" ] ; then
    2.18 +  echo ""
    2.19 +  echo -e "Error : $1 does not exist."
    2.20 +  echo ""
    2.21 +  exit 1
    2.22 +fi
    2.23 +
    2.24 +cd $1
    2.25 +
    2.26 +# Status functions.
    2.27 +status()
    2.28 +{
    2.29 +	local CHECK=$?
    2.30 +	echo -en "\\033[70G[ "
    2.31 +	if [ $CHECK = 0 ]; then
    2.32 +		echo -en "\\033[1;33mOK"
    2.33 +	else
    2.34 +		echo -en "\\033[1;31mFailed"
    2.35 +	fi
    2.36 +	echo -e "\\033[0;39m ]"
    2.37 +}
    2.38 +
    2.39 +# Script start.
    2.40 +echo ""
    2.41 +echo "Starting gztazmod.sh to build compressed kernel modules... "
    2.42 +echo ""
    2.43 +
    2.44 +# Find all modules.
    2.45 +echo -n "Searching all modules to gzip them... "
    2.46 +find . -name "*.ko" -exec gzip '{}' \;
    2.47 +status
    2.48 +
    2.49 +# Build a new temporary modules.dep.
    2.50 +echo -n "Building tmp.dep... "
    2.51 +sed 's/\.ko/.ko.gz/g' modules.dep > tmp.dep
    2.52 +status
    2.53 +
    2.54 +# Destroy original modules.dep
    2.55 +echo -n "Destroying modules.dep... "
    2.56 +rm modules.dep
    2.57 +status
    2.58 +
    2.59 +# Remove tmp.dep to modules.dep.
    2.60 +echo -n "Removing tmp.dep to modules.dep... "
    2.61 +mv tmp.dep modules.dep
    2.62 +status
    2.63 +
    2.64 +# Script end.
    2.65 +echo ""
    2.66 +echo "Kernel modules `basename $1` are ready."
    2.67 +echo ""
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/partimage/receipt	Tue Apr 15 14:37:39 2008 +0200
     3.3 @@ -0,0 +1,66 @@
     3.4 +# SliTaz package receipt.
     3.5 +
     3.6 +PACKAGE="partimage"
     3.7 +VERSION="0.6.7"
     3.8 +CATEGORY="system-tools"
     3.9 +SHORT_DESC="Saves partitions in an image file."
    3.10 +MAINTAINER="Erjo <erjo@slitaz.org>"
    3.11 +DEPENDS="newt bzip2 openssl"
    3.12 +BUILD_DEPENDS="newt-dev slang-dev bzip2-dev openssl-dev"
    3.13 +TARBALL="$PACKAGE-$VERSION.tar.bz2"
    3.14 +WEB_SITE="http://www.partimage.org/Index.fr.html"
    3.15 +WGET_URL="http://heanet.dl.sourceforge.net/sourceforge/partimage/$TARBALL"
    3.16 +
    3.17 +# Rules to configure and make the package.
    3.18 +compile_rules()
    3.19 +{
    3.20 +	cd $src
    3.21 +	./configure --prefix=/usr \
    3.22 +	 --sysconfdir=/etc \
    3.23 +	 --infodir=/usr/share/info \
    3.24 +	 --mandir=/usr/share/man $CONFIGURE_ARGS
    3.25 +	make
    3.26 +	make DESTDIR=$PWD/_pkg install
    3.27 +}
    3.28 +
    3.29 +# Rules to gen a SliTaz package suitable for Tazpkg.
    3.30 +genpkg_rules()
    3.31 +{
    3.32 +	mkdir -p $fs/usr $fs/etc/init.d
    3.33 +	cp -a $_pkg/usr/sbin $fs/usr
    3.34 +	cp -a $_pkg/etc $fs/
    3.35 +	install -g root -o root -m 0600 stuff/etc/partimaged/partimaged.* $fs/etc/partimaged
    3.36 +	install -g root -o root -m 0755 stuff/etc/init.d/partimaged $fs/etc/init.d
    3.37 +	strip -s $fs/usr/sbin/*
    3.38 +}
    3.39 +
    3.40 +post_install()
    3.41 +{
    3.42 +	echo "Processing post install commands..."
    3.43 +	echo "Adding user/group partimag..."
    3.44 +	adduser -S -H -D partimag
    3.45 +
    3.46 +	echo "Setting permissions for config files"
    3.47 +	chmod 0600 /etc/partimaged/*
    3.48 +	chown partimag.partimag /etc/partimaged/*	
    3.49 +	
    3.50 +	echo " Creating image files directory"
    3.51 +	install -g partimag -o partimag -m 0755 -d /var/lib/partimaged
    3.52 +	
    3.53 +	echo ""
    3.54 +	echo -e "\nTo starts $PACKAGE server you can run :\n"
    3.55 +   	echo "/etc/init.d/partimaged start"
    3.56 +   	echo -e "Or add partimaged to RUN_DAEMONS in /etc/rcS.conf\n"
    3.57 +}
    3.58 +
    3.59 +post_remove()
    3.60 +{
    3.61 +	deluser partimag
    3.62 +	delgroup partimag
    3.63 +	
    3.64 +	if [ -f /etc/paritimaged ]; then
    3.65 +		rm -rf /etc/partimaged
    3.66 +	fi
    3.67 +}
    3.68 +	
    3.69 +	
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/partimage/stuff/etc/init.d/partimaged	Tue Apr 15 14:37:39 2008 +0200
     4.3 @@ -0,0 +1,61 @@
     4.4 +#!/bin/sh
     4.5 +# /etc/init.d/unfsd : Start, stop and restart Partimage Server on SliTaz, at
     4.6 +# boot time or with the command line.
     4.7 +#
     4.8 +# To start  Partimage  Server at boot time, just put Partimage in the $RUN_DAEMONS
     4.9 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf
    4.10 +#
    4.11 +. /etc/init.d/rc.functions
    4.12 +. /etc/daemons.conf
    4.13 +
    4.14 +NAME=partimaged
    4.15 +DESC="Partimage Server"
    4.16 +DAEMON=/usr/sbin/partimaged
    4.17 +IMAGES_DIR=/var/lib/partimaged
    4.18 +OPTIONS="-D -d ${IMAGES_DIR}"
    4.19 +PIDFILE=/var/run/$NAME.pid
    4.20 +
    4.21 +
    4.22 +test -f $DAEMON || exit 0
    4.23 +	
    4.24 +	
    4.25 +	
    4.26 +case "$1" in
    4.27 +    start)
    4.28 +   	if [ -f $PIDFILE ] ; then
    4.29 +      		echo "$NAME already running."
    4.30 +      		exit 1
    4.31 +    	fi
    4.32 +		
    4.33 +		check_conf
    4.34 +    	echo -n "Starting $DESC: $NAME... "
    4.35 +    	$DAEMON $OPTIONS
    4.36 +    	status
    4.37 +    	
    4.38 +    	# registering PID
    4.39 +    	if [ $? -eq 0 ]; then
    4.40 +   		pidof -s $NAME > $PIDFILE
    4.41 +    	fi
    4.42 +	;;
    4.43 +    stop)
    4.44 +        if [ ! -f $PIDFILE ] ; then
    4.45 +           echo "$NAME is not running."
    4.46 +           exit 1
    4.47 +        fi
    4.48 +        echo -n "Stopping $DESC: $NAME... "
    4.49 +        kill `cat $PIDFILE`
    4.50 +        rm -f $PIDFILE
    4.51 +        status
    4.52 +	;;
    4.53 +    restart)
    4.54 +        $0 stop
    4.55 +        $0 start
    4.56 +	;;
    4.57 +    *)
    4.58 +		echo "Usage: $DAEMON {start|stop|reload|restart}"
    4.59 +		exit 1
    4.60 +	;;
    4.61 +esac
    4.62 +
    4.63 +exit 0
    4.64 +
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/partimage/stuff/etc/partimaged/partimaged.cert	Tue Apr 15 14:37:39 2008 +0200
     5.3 @@ -0,0 +1,17 @@
     5.4 +-----BEGIN CERTIFICATE-----
     5.5 +MIICtjCCAh+gAwIBAgIJAKLh0jK2g3IjMA0GCSqGSIb3DQEBBQUAMEcxCzAJBgNV
     5.6 +BAYTAkZSMRMwEQYDVQQIEwpTb21lLVN0YXRlMQ8wDQYDVQQKEwZTbGlUYXoxEjAQ
     5.7 +BgNVBAMTCWxvY2FsaG9zdDAeFw0wODA0MDYyMDI0MTFaFw0wODA1MDYyMDI0MTFa
     5.8 +MEcxCzAJBgNVBAYTAkZSMRMwEQYDVQQIEwpTb21lLVN0YXRlMQ8wDQYDVQQKEwZT
     5.9 +bGlUYXoxEjAQBgNVBAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAw
    5.10 +gYkCgYEA0Ehw1Ii169vfHkhkh+58u+GGHdYloLoda35JULZkMITpG1lw4iPOFBOK
    5.11 +RglGJB52XLcnIdnbHkFYO+kb/ub65EqmYu8TfHdB77HvMp1VISNy9/dmC3hLUTnV
    5.12 +zQwhMgAAd/FR3fj2BICAuElri2iET0taBt/93JQFWbrbADd5PYcCAwEAAaOBqTCB
    5.13 +pjAdBgNVHQ4EFgQU7HANGnRcYX3C8/CGWrqAB3Z/RBIwdwYDVR0jBHAwboAU7HAN
    5.14 +GnRcYX3C8/CGWrqAB3Z/RBKhS6RJMEcxCzAJBgNVBAYTAkZSMRMwEQYDVQQIEwpT
    5.15 +b21lLVN0YXRlMQ8wDQYDVQQKEwZTbGlUYXoxEjAQBgNVBAMTCWxvY2FsaG9zdIIJ
    5.16 +AKLh0jK2g3IjMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAzCCfnoQ5
    5.17 +wjhkFQC5lhGwPyECcJbDg6K+F9jZhnkppuAWVmR+272qZe7fQKRBvVZhe7lU5sdl
    5.18 +RxandyuyurxpX4RYtjCYPMszmosK4dqqxJCdEE16hcUoJt4b6SrphCDOF2a6mE2a
    5.19 +jqnuqgOKA7zVJqMAX/6nzbj1zvwSobpdHhg=
    5.20 +-----END CERTIFICATE-----
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/partimage/stuff/etc/partimaged/partimaged.key	Tue Apr 15 14:37:39 2008 +0200
     6.3 @@ -0,0 +1,15 @@
     6.4 +-----BEGIN RSA PRIVATE KEY-----
     6.5 +MIICXQIBAAKBgQDQSHDUiLXr298eSGSH7ny74YYd1iWguh1rfklQtmQwhOkbWXDi
     6.6 +I84UE4pGCUYkHnZctych2dseQVg76Rv+5vrkSqZi7xN8d0Hvse8ynVUhI3L392YL
     6.7 +eEtROdXNDCEyAAB38VHd+PYEgIC4SWuLaIRPS1oG3/3clAVZutsAN3k9hwIDAQAB
     6.8 +AoGAJV8KF6hb8/DkjLtyhk1NRizF8q6M29TpGHN1Vi0TtvzyEn0u2vSPslx7L+vU
     6.9 +EQECPcqDE/jR7xDMcxt1cXwiQecX6ysDXiGS2p0k9OoHtiYj1f73Y92uaBY3lQny
    6.10 +SQ6Vz2grtCZsi3xzJ+7v72OgRqkgPlXVrFTjR84QAcuJxdkCQQDuEAvm63CtF7NR
    6.11 +TtWjCAyzUOpwB22/nfyoABXHtCplKk2cWoyIjKDszb2KL6QmBu8qQj4JKkT3UqFc
    6.12 +pJNsbst7AkEA3/n6Zk1sRzGRhargiZpiGMo0p6AKT7ccQeaJ+Re7ipOtoWwAV0uL
    6.13 +Ilj+ULrA2CBHQi+tthruRLtThPJO2MQCZQJBALPMKMESBrqkUMlS6iVEmhsAPN+5
    6.14 +rJjxIHZeAhUfLHnVlmJFPSiQVaYjyUhJrQcPa6iV+TaA1y+YF8jZf4KAt2sCQAEF
    6.15 +l/Hdio/slvhgJjQagzYPvhvBrCpe8H8QeTKsvAtOzyz8XCgJzTGz7D0cDQMvaoPP
    6.16 +yeAZ0Vp47FGf9WIhys0CQQCkVoWJycg4VFHMrgQtNIW2NS8Mwpwl+OSoLN4Y4RlQ
    6.17 +F8nLcffeOUjteFbXWtuqfqARHNDo6sOL1dPIAw8QaZII
    6.18 +-----END RSA PRIVATE KEY-----