wok-undigest view ovzkernel-bridge/receipt @ rev 763

airstrike: fix data path (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jul 12 13:23:57 2012 +0200 (2012-07-12)
parents 7b0463e0a650
children 2a507a5f33cc
line source
1 # SliTaz package receipt.
3 PACKAGE="ovzkernel-bridge"
4 VERSION="2.6.32"
5 CATEGORY="base-system"
6 SHORT_DESC="The Linux kernel bridge modules."
7 MAINTAINER="devel@slitaz.org"
8 DEPENDS="ovzkernel"
9 WANTED="ovzkernel"
10 WEB_SITE="http://www.kernel.org/"
11 EXTRAVERSION="-i686"
12 SOURCE="linux"
13 PROVIDE="linux-bridge"
15 # Rules to gen a SliTaz package suitable for Tazpkg.
16 genpkg_rules()
17 {
18 local path
19 src=$WOK/$WANTED/$SOURCE-$VERSION
20 _pkg=$WOK/$WANTED/$SOURCE-$VERSION/_pkg
21 KERNELRELEASE=$( cat $src/include/config/kernel.release 2> /dev/null)
22 path=lib/modules/${KERNELRELEASE}/kernel
23 mkdir -p $fs/$path
24 export src
25 export _pkg
26 $src/OpenVZ/list_modules.sh ${KERNELRELEASE} net/bridge | while read module; do
27 dir=$path/$(dirname $module)
28 [ -d $fs/$dir ] || mkdir -p $fs/$dir
29 cp -a $_pkg/$path/$module $fs/$dir
30 done
32 for i in $(cat $WOK/$WANTED/stuff/modules-$VERSION.list); do
33 if [ $fs/lib/modules/${KERNELRELEASE}/kernel/$i ]; then
34 rm -f $fs/lib/modules/${KERNELRELEASE}/kernel/$i
35 fi
36 done
37 }
39 # Post install/remove commands for Tazpkg.
40 post_install()
41 {
42 KERNELRELEASE=$(cat $1/etc/ovzkernel/kernel.release)
43 chroot "$1/" depmod -a ${KERNELRELEASE}
44 }
46 post_remove()
47 {
48 KERNELRELEASE=$(cat $1/etc/ovzkernel/kernel.release)
49 depmod -a ${KERNELRELEASE}
50 }