wok view v4l-dvb/receipt @ rev 5567

v4l-dvb: busybox/ln compatible
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri May 14 15:51:59 2010 +0200 (2010-05-14)
parents a11358feced4
children 3f8e04bc567f
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 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
27 IFS="." ; set -- $KERNEL_VERSION ; unset IFS
28 cat > v4l/.version << EOF
29 VERSION=$1
30 PATCHLEVEL:=$2
31 SUBLEVEL:=$3
32 KERNELRELEASE:=$KERNEL_VERSION-slitaz
33 EOF
34 make SRCDIR="$WOK/linux/linux-$KERNEL_VERSION" CONFIG_MEDIA_TUNER_CUSTOMISE=n CONFIG_RADIO_ADAPTERS=n CONFIG_RADIO_MIROPCM20=n CONFIG_MANTIS_CORE=n
35 make DESTDIR="$PWD/_pkg" install
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
42 EXTRAVERSION=_$KERNEL_VERSION
44 mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/
46 find $_pkg/lib/modules/$KERNEL_VERSION-slitaz -name "*.ko" -exec lzma e '{}' '{}'.gz \; 2> /dev/null
47 find $_pkg/lib/modules/$KERNEL_VERSION-slitaz -name "*.ko" -exec rm '{}' \;
48 cp -a $_pkg/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/
49 }
51 post_install()
52 {
53 echo "Processing post-install commands..."
54 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
55 }
57 post_remove()
58 {
59 echo "Processing post-remove commands..."
60 depmod -a
61 }