wok annotate usbip/receipt @ rev 3816

Fix: alsaplayer cook with gcc 4.4 serie
author Christophe Lincoln <pankso@slitaz.org>
date Thu Aug 06 14:19:56 2009 +0200 (2009-08-06)
parents 0fcac9995347
children 3115c291f303
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"
pascal@1510 10 BUILD_DEPENDS="sysfsutils-dev lzma libtool glib libwrap libwrap-dev"
pascal@1489 11 WEB_SITE="http://usbip.sourceforge.net/"
pascal@1489 12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
pascal@1489 13
pascal@1489 14 # Rules to configure and make the package.
pascal@1489 15 compile_rules()
pascal@1489 16 {
pascal@1507 17 cd $src/drivers
pascal@1507 18 # get kernel version
pascal@1507 19 if [ ! -d $WOK/linux/taz ]; then
pascal@1507 20 tazwok cook linux
pascal@1507 21 fi
pascal@2065 22 LINUX=$WOK/linux/$(ls $WOK/linux/taz)
pascal@2065 23 kver=$(grep "kernel version" $LINUX/.config)
pascal@1507 24 kver=${kver##* }
pascal@1507 25
pascal@2065 26 mkdir -p ../_pkg/lib/modules/$kver-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/* \
pascal@2065 30 ../_pkg/lib/modules/$kver-slitaz/misc
pascal@2065 31 else
pascal@2065 32 # Select patch according to kernel version
pascal@2065 33 patch_dir=${kver%.*}
pascal@2065 34 [ "$(echo $ker | sed 's/[0-9]//g')" = ".." ] && patch_dir=$kver
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
pascal@2065 42 make KSOURCE=$(ls -d $WOK/linux/linux-$kver) || return 1
pascal@2065 43 for i in *.ko; do
pascal@2065 44 lzma e $i ../../_pkg/lib/modules/$kver-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@1507 63 # Package all usbip pkgs
pascal@1507 64 for i in $(cd $WOK; ls -d usbip-*)
pascal@1507 65 do
pascal@1507 66 tazwok genpkg $i
pascal@1507 67 done
pascal@1489 68 }
pascal@1489 69