wok-4.x view v4l-dvb/receipt @ rev 7664

Up: git to 1.7.3.4.
author Christopher Rogers <slaxemulator@gmail.com>
date Thu Dec 16 09:03:22 2010 +0000 (2010-12-16)
parents c155fb472602
children 756ed4b1daac
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"
10 WEB_SITE="http://linuxtv.org/hg/v4l-dvb/"
11 TAGS="webcam"
13 # Rules to configure and make the package.
14 compile_rules() {
15 TARBALL=$SOURCES_REPOSITORY/$PACKAGE-hg-$VERSION.tar.gz
16 if [ -d $PACKAGE-$VERSION ]; then
17 true
18 elif [ -f $TARBALL ]; then
19 tar xzf $TARBALL
20 else
21 hg clone $WEB_SITE $PACKAGE-$VERSION &&
22 tar czf $TARBALL $PACKAGE-$VERSION
23 fi
24 cd $src
25 sed -i 's/0 | xargs -0n 255 ln -sf --target-directory=\./ | while read file; do ln -sf $file . ; done/' v4l/Makefile
26 grep -rl /sbin/depmod * | xargs sed -i 's|/sbin/depmod|/bin/echo|'
27 grep -rl i2c_new_probed_device * | xargs sed -i 's/i2c_new_probed_device([^)]*/&, NULL/'
28 sed -i 's/\.ioctl/.unlocked_ioctl/' linux/drivers/media/dvb/dvb-core/dmxdev.c \
29 linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c \
30 linux/drivers/media/dvb/dvb-core/dvb_frontend.c \
31 linux/drivers/media/dvb/dvb-core/dvb_net.c \
32 linux/drivers/media/dvb/ttpci/av7110*.c \
33 linux/drivers/media/dvb/firewire/firedtv-ci.c \
34 linux/drivers/media/video/v4l2-dev.c \
35 linux/drivers/media/IR/lirc_dev.c \
36 linux/drivers/media/IR/ir-lirc-codec.c
37 sed -i 's/>ioctl)/>unlocked_ioctl)/' linux/drivers/media/IR/lirc_dev.c
38 sed -i -e 's|/sbin/lsmod|/bin/lsmod|' -e 's/print | while.*/exec ln -s {} . \\;/' v4l/Makefile
39 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
40 IFS="." ; set -- $KERNEL_VERSION ; unset IFS
41 cat > v4l/.version << EOF
42 VERSION=$1
43 PATCHLEVEL:=$2
44 SUBLEVEL:=$3
45 KERNELRELEASE:=$KERNEL_VERSION-slitaz
46 EOF
47 make SRCDIR="$WOK/linux/linux-$KERNEL_VERSION" CONFIG_MEDIA_TUNER_CUSTOMISE=n CONFIG_RADIO_ADAPTERS=n CONFIG_RADIO_MIROPCM20=n CONFIG_MANTIS_CORE=n &&
48 make DESTDIR="$PWD/_pkg" install
49 }
51 # Rules to gen a SliTaz package suitable for Tazpkg.
52 genpkg_rules()
53 {
54 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
55 EXTRAVERSION=_$KERNEL_VERSION
57 mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/
59 find $_pkg/lib/modules/$KERNEL_VERSION-slitaz -name "*.ko" -exec lzma e '{}' '{}'.gz \; 2> /dev/null
60 find $_pkg/lib/modules/$KERNEL_VERSION-slitaz -name "*.ko" -exec rm '{}' \;
61 cp -a $_pkg/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/
62 }
64 post_install()
65 {
66 echo "Processing post-install commands..."
67 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
68 }
70 post_remove()
71 {
72 echo "Processing post-remove commands..."
73 depmod -a
74 }