wok annotate usbip/receipt @ rev 8102

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