wok-6.x annotate usbip/receipt @ rev 5643
Up lguest 2.6.24
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri May 28 22:15:48 2010 +0200 (2010-05-28) |
parents | 74d9e193ac36 |
children | 53e1828da719 |
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" |
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) |
pascal@2065 | 24 kver=$(grep "kernel version" $LINUX/.config) |
pascal@1507 | 25 kver=${kver##* } |
pascal@1507 | 26 |
pascal@2065 | 27 mkdir -p ../_pkg/lib/modules/$kver-slitaz/misc |
pascal@2065 | 28 if [ -d $LINUX/_pkg/lib/modules/*/kernel/drivers/staging/usbip ]; then |
pascal@2065 | 29 echo "Using linux-staging usbip modules." |
pascal@2065 | 30 cp $LINUX/_pkg/lib/modules/*/kernel/drivers/staging/usbip/* \ |
pascal@2065 | 31 ../_pkg/lib/modules/$kver-slitaz/misc |
pascal@2065 | 32 else |
pascal@2065 | 33 # Select patch according to kernel version |
pascal@2065 | 34 patch_dir=${kver%.*} |
pascal@2065 | 35 [ "$(echo $ker | sed 's/[0-9]//g')" = ".." ] && patch_dir=$kver |
pascal@2065 | 36 i=${patch_dir##*.} |
pascal@2065 | 37 while [ ! -e ${patch_dir%.*}.$i ]; do |
pascal@2065 | 38 [ "$i" = "0" ] && break |
pascal@2065 | 39 i=$(($i - 1)) |
pascal@2065 | 40 done |
pascal@2065 | 41 patch_dir=${patch_dir%.*}.$i |
pascal@2065 | 42 cd $patch_dir |
pascal@2065 | 43 make KSOURCE=$(ls -d $WOK/linux/linux-$kver) || return 1 |
pascal@2065 | 44 for i in *.ko; do |
pascal@2065 | 45 lzma e $i ../../_pkg/lib/modules/$kver-slitaz/misc/$i.gz |
pascal@2065 | 46 done |
pascal@2065 | 47 fi |
pascal@2065 | 48 |
pascal@1489 | 49 cd $src/src |
pascal@1489 | 50 ./autogen.sh |
pascal@1489 | 51 ./configure --prefix=/usr --infodir=/usr/share/info \ |
pascal@1490 | 52 --mandir=/usr/share/man $CONFIGURE_ARGS && |
pascal@1490 | 53 make && |
pascal@1489 | 54 make DESTDIR=$PWD/../_pkg install |
pascal@1489 | 55 } |
pascal@1489 | 56 |
pascal@1489 | 57 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1489 | 58 genpkg_rules() |
pascal@1489 | 59 { |
pascal@1489 | 60 mkdir -p $fs/usr/lib |
pascal@1489 | 61 cp -a $_pkg/usr/bin $fs/usr |
pascal@1489 | 62 cp -a $_pkg/usr/share $fs/usr |
pascal@1489 | 63 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib |
pascal@1507 | 64 # Package all usbip pkgs |
pascal@1507 | 65 for i in $(cd $WOK; ls -d usbip-*) |
pascal@1507 | 66 do |
pascal@1507 | 67 tazwok genpkg $i |
pascal@1507 | 68 done |
pascal@1489 | 69 } |
pascal@1489 | 70 |