wok view v4l-dvb/receipt @ rev 5570

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