# HG changeset patch # User Christophe Lincoln # Date 1306602393 -7200 # Node ID 5d755b4f872b51207e608a7d3e80ac7265017550 # Parent 0d1e21d67974b41b4606baab1aefcc4217c239f5 v4l-dvb: fix kernel source path and clean receipt diff -r 0d1e21d67974 -r 5d755b4f872b v4l-dvb/receipt --- a/v4l-dvb/receipt Sat May 28 18:08:08 2011 +0200 +++ b/v4l-dvb/receipt Sat May 28 19:06:33 2011 +0200 @@ -5,55 +5,63 @@ CATEGORY="multimedia" MAINTAINER="jozee@slitaz.org" SHORT_DESC="v4l-dvb development repository" -DEPENDS="" -BUILD_DEPENDS="python mercurial coreutils-operations module-init-tools" WEB_SITE="http://linuxtv.org/hg/v4l-dvb/" TAGS="webcam" -WGET_URL="mercurial|$WEB_SITE" +WGET_URL="hg|$WEB_SITE" + +DEPENDS="linux" +BUILD_DEPENDS="python mercurial coreutils-operations module-init-tools" # Rules to configure and make the package. compile_rules() { - cd $src - patch -p1 < $stuff/414e0bbd99bf - patch -p1 < $stuff/d64b014c5253 - patch -p1 < $stuff/d0a2ff731670 - sed -i 's/0 | xargs -0n 255 ln -sf --target-directory=\./ | while read file; do ln -sf $file . ; done/' v4l/Makefile - grep -rl /sbin/depmod * | xargs sed -i 's|/sbin/depmod|/bin/echo|' - grep -rl i2c_new_probed_device * | xargs sed -i 's/i2c_new_probed_device([^)]*/&, NULL/' - sed -i 's/\.ioctl/.unlocked_ioctl/' linux/drivers/media/dvb/dvb-core/dmxdev.c \ - linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c \ - linux/drivers/media/dvb/dvb-core/dvb_frontend.c \ - linux/drivers/media/dvb/dvb-core/dvb_net.c \ - linux/drivers/media/dvb/ttpci/av7110*.c \ - linux/drivers/media/dvb/firewire/firedtv-ci.c \ - linux/drivers/media/video/v4l2-dev.c \ - linux/drivers/media/IR/lirc_dev.c \ - linux/drivers/media/IR/ir-lirc-codec.c - sed -i 's/>ioctl)/>unlocked_ioctl)/' linux/drivers/media/IR/lirc_dev.c - sed -i -e 's|/sbin/lsmod|/bin/lsmod|' -e 's/print | while.*/exec ln -s {} . \\;/' v4l/Makefile - KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'` - IFS="." ; set -- $KERNEL_VERSION ; unset IFS - cat > v4l/.version << EOF + cd $src + patch -p1 < $stuff/414e0bbd99bf + patch -p1 < $stuff/d64b014c5253 + patch -p1 < $stuff/d0a2ff731670 + sed -i 's/0 | xargs -0n 255 ln -sf --target-directory=\./ | while read file; do ln -sf $file . ; done/' v4l/Makefile + grep -rl /sbin/depmod * | xargs sed -i 's|/sbin/depmod|/bin/echo|' + grep -rl i2c_new_probed_device * | xargs sed -i 's/i2c_new_probed_device([^)]*/&, NULL/' + + sed -i 's/\.ioctl/.unlocked_ioctl/' linux/drivers/media/dvb/dvb-core/dmxdev.c \ + linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c \ + linux/drivers/media/dvb/dvb-core/dvb_frontend.c \ + linux/drivers/media/dvb/dvb-core/dvb_net.c \ + linux/drivers/media/dvb/ttpci/av7110*.c \ + linux/drivers/media/dvb/firewire/firedtv-ci.c \ + linux/drivers/media/video/v4l2-dev.c \ + linux/drivers/media/IR/lirc_dev.c \ + linux/drivers/media/IR/ir-lirc-codec.c + + sed -i 's/>ioctl)/>unlocked_ioctl)/' linux/drivers/media/IR/lirc_dev.c + sed -i -e 's|/sbin/lsmod|/bin/lsmod|' \ + -e 's/print | while.*/exec ln -s {} . \\;/' v4l/Makefile + + IFS="." ; set -- $kvers ; unset IFS + cat > v4l/.version << EOF VERSION=$1 PATCHLEVEL:=$2 SUBLEVEL:=$3 -KERNELRELEASE:=$KERNEL_VERSION-slitaz +KERNELRELEASE:=$kvers-slitaz EOF - make SRCDIR="$WOK/linux/linux-$KERNEL_VERSION" CONFIG_MEDIA_TUNER_CUSTOMISE=n CONFIG_RADIO_ADAPTERS=n CONFIG_RADIO_MIROPCM20=n CONFIG_MANTIS_CORE=n && - make DESTDIR="$PWD/_pkg" install + [ -x /usr/bin/cook ] && SRCDIR="$WOK/linux/source/linux-$kvers" + [ -x /usr/bin/tazwok ] && SRCDIR="$WOK/linux/linux-$kvers" + make SRCDIR=$SRCDIR CONFIG_MEDIA_TUNER_CUSTOMISE=n CONFIG_RADIO_ADAPTERS=n \ + CONFIG_RADIO_MIROPCM20=n CONFIG_MANTIS_CORE=n && + make DESTDIR=$DESTDIR install } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'` - EXTRAVERSION=_$KERNEL_VERSION + EXTRAVERSION=_${kvers} - mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/ + mkdir -p $fs/lib/modules/$kvers-slitaz/kernel/ - find $_pkg/lib/modules/$KERNEL_VERSION-slitaz -name "*.ko" -exec lzma e '{}' '{}'.gz \; 2> /dev/null - find $_pkg/lib/modules/$KERNEL_VERSION-slitaz -name "*.ko" -exec rm '{}' \; - cp -a $_pkg/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/ + find $_pkg/lib/modules/$kvers-slitaz -name "*.ko" \ + -exec lzma e '{}' '{}'.gz \; 2> /dev/null + find $_pkg/lib/modules/$kvers-slitaz -name "*.ko" -exec rm '{}' \; + cp -a $_pkg/lib/modules/$kvers-slitaz/kernel/drivers \ + $fs/lib/modules/$kvers-slitaz/kernel/ } post_install()