wok-6.x view v4l-dvb/receipt @ rev 9387

v4l-dvb: add patches for kernel 2.6.37
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Mar 26 12:32:20 2011 +0100 (2011-03-26)
parents 756ed4b1daac
children d1768332cee0
line source
1 # SliTaz package receipt.
3 PACKAGE="v4l-dvb"
4 VERSION="development"
5 CATEGORY="multimedia"
6 MAINTAINER="jozee@slitaz.org"
7 SHORT_DESC="v4l-dvb development repository"
8 DEPENDS=""
9 BUILD_DEPENDS="python mercurial coreutils-operations module-init-tools"
10 WEB_SITE="http://linuxtv.org/hg/v4l-dvb/"
11 TAGS="webcam"
12 WGET_URL="mercurial|$WEB_SITE"
14 # Rules to configure and make the package.
15 compile_rules() {
16 cd $src
17 patch -p1 < ../stuff/414e0bbd99bf
18 patch -p1 < ../stuff/d64b014c5253
19 patch -p1 < ../stuff/d0a2ff731670
20 sed -i 's/0 | xargs -0n 255 ln -sf --target-directory=\./ | while read file; do ln -sf $file . ; done/' v4l/Makefile
21 grep -rl /sbin/depmod * | xargs sed -i 's|/sbin/depmod|/bin/echo|'
22 grep -rl i2c_new_probed_device * | xargs sed -i 's/i2c_new_probed_device([^)]*/&, NULL/'
23 sed -i 's/\.ioctl/.unlocked_ioctl/' linux/drivers/media/dvb/dvb-core/dmxdev.c \
24 linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c \
25 linux/drivers/media/dvb/dvb-core/dvb_frontend.c \
26 linux/drivers/media/dvb/dvb-core/dvb_net.c \
27 linux/drivers/media/dvb/ttpci/av7110*.c \
28 linux/drivers/media/dvb/firewire/firedtv-ci.c \
29 linux/drivers/media/video/v4l2-dev.c \
30 linux/drivers/media/IR/lirc_dev.c \
31 linux/drivers/media/IR/ir-lirc-codec.c
32 sed -i 's/>ioctl)/>unlocked_ioctl)/' linux/drivers/media/IR/lirc_dev.c
33 sed -i -e 's|/sbin/lsmod|/bin/lsmod|' -e 's/print | while.*/exec ln -s {} . \\;/' v4l/Makefile
34 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
35 IFS="." ; set -- $KERNEL_VERSION ; unset IFS
36 cat > v4l/.version << EOF
37 VERSION=$1
38 PATCHLEVEL:=$2
39 SUBLEVEL:=$3
40 KERNELRELEASE:=$KERNEL_VERSION-slitaz
41 EOF
42 make SRCDIR="$WOK/linux/linux-$KERNEL_VERSION" CONFIG_MEDIA_TUNER_CUSTOMISE=n CONFIG_RADIO_ADAPTERS=n CONFIG_RADIO_MIROPCM20=n CONFIG_MANTIS_CORE=n &&
43 make DESTDIR="$PWD/_pkg" install
44 }
46 # Rules to gen a SliTaz package suitable for Tazpkg.
47 genpkg_rules()
48 {
49 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
50 EXTRAVERSION=_$KERNEL_VERSION
52 mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/
54 find $_pkg/lib/modules/$KERNEL_VERSION-slitaz -name "*.ko" -exec lzma e '{}' '{}'.gz \; 2> /dev/null
55 find $_pkg/lib/modules/$KERNEL_VERSION-slitaz -name "*.ko" -exec rm '{}' \;
56 cp -a $_pkg/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/
57 }
59 post_install()
60 {
61 echo "Processing post-install commands..."
62 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
63 }
65 post_remove()
66 {
67 echo "Processing post-remove commands..."
68 depmod -a
69 }