wok rev 1507

Add usbip-module
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Oct 05 17:27:44 2008 +0000 (2008-10-05)
parents 1c41c181bb35
children f1bd6109d377
files usbip-module/receipt usbip/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/usbip-module/receipt	Sun Oct 05 17:27:44 2008 +0000
     1.3 @@ -0,0 +1,29 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="usbip-module"
     1.7 +VERSION="0.1.6"
     1.8 +CATEGORY="base-system"
     1.9 +SHORT_DESC="general USB device sharing system over IP network, kernel modules."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +WEB_SITE="http://usbip.sourceforge.net/"
    1.12 +WANTED="usbip"
    1.13 +
    1.14 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.15 +genpkg_rules()
    1.16 +{
    1.17 +	kver=$(grep "kernel version" ../linux/linux-*/.config)
    1.18 +	kver=${kver##* }
    1.19 +	EXTRAVERSION=_$kver
    1.20 +	cp -a $_pkg/lib $fs
    1.21 +}
    1.22 +
    1.23 +# Post install/remove commands for Tazpkg.
    1.24 +post_install()
    1.25 +{
    1.26 +	depmod -a -b "$1/"
    1.27 +}
    1.28 +
    1.29 +post_remove()
    1.30 +{
    1.31 +	depmod -a
    1.32 +}
     2.1 --- a/usbip/receipt	Sun Oct 05 16:24:24 2008 +0000
     2.2 +++ b/usbip/receipt	Sun Oct 05 17:27:44 2008 +0000
     2.3 @@ -7,13 +7,35 @@
     2.4  MAINTAINER="pascal.bellard@slitaz.org"
     2.5  TARBALL="$PACKAGE-$VERSION.tar.gz"
     2.6  DEPENDS="sysfsutils"
     2.7 -BUILD_DEPENDS="sysfsutils-dev"
     2.8 +BUILD_DEPENDS="sysfsutils-dev lzma"
     2.9  WEB_SITE="http://usbip.sourceforge.net/"
    2.10  WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
    2.11  
    2.12  # Rules to configure and make the package.
    2.13  compile_rules()
    2.14  {
    2.15 +	cd $src/drivers
    2.16 +	# get kernel version
    2.17 +	if [ ! -d $WOK/linux/taz ]; then
    2.18 +		tazwok cook linux
    2.19 +	fi
    2.20 +	kver=$(grep "kernel version" $WOK/linux/linux-*/.config)
    2.21 +	kver=${kver##* }
    2.22 +
    2.23 +	# Select patch according to kernel version
    2.24 +	patch_dir=${kver%.*}
    2.25 +	i=${patch_dir##*.}
    2.26 +	while [ ! -e ${patch_dir%.*}.$i ]; do
    2.27 +		[ "$i" = "0" ] && break
    2.28 +		i=$(($i - 1))
    2.29 +	done
    2.30 +	patch_dir=${patch_dir%.*}.$i
    2.31 +	cd $patch_dir
    2.32 +	make KSOURCE=$(ls -d $WOK/linux/linux-$kver) || return 1
    2.33 +	mkdir -p ../../_pkg/lib/modules/$kver-slitaz/misc
    2.34 +	for i in *.ko; do
    2.35 +		lzma e $i ../../_pkg/lib/modules/$kver-slitaz/misc/$i.gz
    2.36 +	done
    2.37  	cd $src/src
    2.38  	./autogen.sh
    2.39  	./configure --prefix=/usr --infodir=/usr/share/info \
    2.40 @@ -29,5 +51,10 @@
    2.41  	cp -a $_pkg/usr/bin $fs/usr
    2.42  	cp -a $_pkg/usr/share $fs/usr
    2.43  	cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
    2.44 +	# Package all usbip pkgs
    2.45 +	for i in $(cd $WOK; ls -d usbip-*)
    2.46 +	do
    2.47 +		tazwok genpkg $i
    2.48 +	done
    2.49  }
    2.50