wok-next view usbip/receipt @ rev 7266

Up: transmission to 2.12.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Nov 14 18:42:45 2010 +0000 (2010-11-14)
parents 74d9e193ac36
children 53e1828da719
line source
1 # SliTaz package receipt.
3 PACKAGE="usbip"
4 VERSION="0.1.7"
5 CATEGORY="system-tools"
6 SHORT_DESC="general USB device sharing system over IP network."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 DEPENDS="sysfsutils glib libwrap"
10 BUILD_DEPENDS="sysfsutils-dev lzma libtool glib libwrap libwrap-dev"
11 WEB_SITE="http://usbip.sourceforge.net/"
12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
13 TAGS="usb"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 cd $src/drivers
19 # get kernel version
20 if [ ! -d $WOK/linux/taz ]; then
21 tazwok cook linux
22 fi
23 LINUX=$WOK/linux/$(ls $WOK/linux/taz)
24 kver=$(grep "kernel version" $LINUX/.config)
25 kver=${kver##* }
27 mkdir -p ../_pkg/lib/modules/$kver-slitaz/misc
28 if [ -d $LINUX/_pkg/lib/modules/*/kernel/drivers/staging/usbip ]; then
29 echo "Using linux-staging usbip modules."
30 cp $LINUX/_pkg/lib/modules/*/kernel/drivers/staging/usbip/* \
31 ../_pkg/lib/modules/$kver-slitaz/misc
32 else
33 # Select patch according to kernel version
34 patch_dir=${kver%.*}
35 [ "$(echo $ker | sed 's/[0-9]//g')" = ".." ] && patch_dir=$kver
36 i=${patch_dir##*.}
37 while [ ! -e ${patch_dir%.*}.$i ]; do
38 [ "$i" = "0" ] && break
39 i=$(($i - 1))
40 done
41 patch_dir=${patch_dir%.*}.$i
42 cd $patch_dir
43 make KSOURCE=$(ls -d $WOK/linux/linux-$kver) || return 1
44 for i in *.ko; do
45 lzma e $i ../../_pkg/lib/modules/$kver-slitaz/misc/$i.gz
46 done
47 fi
49 cd $src/src
50 ./autogen.sh
51 ./configure --prefix=/usr --infodir=/usr/share/info \
52 --mandir=/usr/share/man $CONFIGURE_ARGS &&
53 make &&
54 make DESTDIR=$PWD/../_pkg install
55 }
57 # Rules to gen a SliTaz package suitable for Tazpkg.
58 genpkg_rules()
59 {
60 mkdir -p $fs/usr/lib
61 cp -a $_pkg/usr/bin $fs/usr
62 cp -a $_pkg/usr/share $fs/usr
63 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
64 # Package all usbip pkgs
65 for i in $(cd $WOK; ls -d usbip-*)
66 do
67 tazwok genpkg $i
68 done
69 }