wok view usbip/receipt @ rev 8160
imported patch commit_inprogress/cyrus-sasl.patch
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Thu Jan 27 00:20:49 2011 +0100 (2011-01-27) |
parents | 53e1828da719 |
children | 09c53e5c1062 |
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 linux-module-headers 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 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
26 mkdir -p ../_pkg/lib/modules/$KERNEL_VERSION-slitaz/misc
27 if [ -d $LINUX/_pkg/lib/modules/*/kernel/drivers/staging/usbip ]; then
28 echo "Using linux-staging usbip modules."
29 cp $LINUX/_pkg/lib/modules/*/kernel/drivers/staging/usbip/* \
30 ../_pkg/lib/modules/$KERNEL_VERSION-slitaz/misc
31 else
32 # Select patch according to kernel version
33 patch_dir=${KERNEL_VERSION%.*}
34 [ "$(echo $ker | sed 's/[0-9]//g')" = ".." ] && patch_dir=$KERNEL_VERSION
35 i=${patch_dir##*.}
36 while [ ! -e ${patch_dir%.*}.$i ]; do
37 [ "$i" = "0" ] && break
38 i=$(($i - 1))
39 done
40 patch_dir=${patch_dir%.*}.$i
41 cd $patch_dir
42 make KSOURCE=/usr/src/linux || return 1
43 for i in *.ko; do
44 lzma e $i ../../_pkg/lib/modules/${KERNEL_VERSION}-slitaz/misc/$i.gz
45 done
46 fi
48 cd $src/src
49 ./autogen.sh
50 ./configure --prefix=/usr --infodir=/usr/share/info \
51 --mandir=/usr/share/man $CONFIGURE_ARGS &&
52 make &&
53 make DESTDIR=$PWD/../_pkg install
54 }
56 # Rules to gen a SliTaz package suitable for Tazpkg.
57 genpkg_rules()
58 {
59 mkdir -p $fs/usr/lib
60 cp -a $_pkg/usr/bin $fs/usr
61 cp -a $_pkg/usr/share $fs/usr
62 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
63 }