wok-undigest annotate ovzkernel-kvm/receipt @ rev 433
tslib: fix genpkg_rules
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Sep 06 15:36:12 2011 +0200 (2011-09-06) |
parents | |
children | 2a507a5f33cc |
rev | line source |
---|---|
erjo@218 | 1 # SliTaz package receipt. |
erjo@218 | 2 |
erjo@218 | 3 PACKAGE="ovzkernel-kvm" |
erjo@218 | 4 VERSION="2.6.32" |
erjo@218 | 5 CATEGORY="base-system" |
erjo@218 | 6 SHORT_DESC="The Linux kernel kvm and virtio modules." |
erjo@218 | 7 MAINTAINER="devel@slitaz.org" |
erjo@218 | 8 DEPENDS="ovzkernel" |
erjo@218 | 9 WANTED="ovzkernel" |
erjo@218 | 10 WEB_SITE="http://www.kernel.org/" |
erjo@218 | 11 EXTRAVERSION="-i686" |
erjo@218 | 12 SOURCE="linux" |
erjo@218 | 13 PROVIDE="linux-kvm" |
erjo@218 | 14 |
erjo@218 | 15 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@218 | 16 genpkg_rules() |
erjo@218 | 17 { |
erjo@218 | 18 local path |
erjo@218 | 19 src=$WOK/$WANTED/$SOURCE-$VERSION |
erjo@218 | 20 _pkg=$WOK/$WANTED/$SOURCE-$VERSION/_pkg |
erjo@218 | 21 KERNELRELEASE=$( cat $src/include/config/kernel.release 2> /dev/null) |
erjo@218 | 22 path=lib/modules/${KERNELRELEASE}/kernel |
erjo@218 | 23 mkdir -p $fs/$path |
erjo@218 | 24 export src |
erjo@218 | 25 export _pkg |
erjo@218 | 26 $src/OpenVZ/list_modules.sh ${KERNELRELEASE} arch/x86/kvm drivers/virtio drivers/lguest \ |
erjo@218 | 27 drivers/char/hw_random/virtio-rng.ko.gz drivers/char/virtio_console.ko.gz \ |
erjo@218 | 28 drivers/net/virtio_net.ko.gz drivers/block/virtio_blk.ko.gz | \ |
erjo@218 | 29 while read module; do |
erjo@218 | 30 dir=$path/$(dirname $module) |
erjo@218 | 31 [ -d $fs/$dir ] || mkdir -p $fs/$dir |
erjo@218 | 32 cp -a $_pkg/$path/$module $fs/$dir |
erjo@218 | 33 done |
erjo@218 | 34 } |
erjo@218 | 35 |
erjo@218 | 36 # Post install/remove commands for Tazpkg. |
erjo@218 | 37 post_install() |
erjo@218 | 38 { |
erjo@218 | 39 KERNELRELEASE=$(cat $1/etc/ovzkernel/kernel.release) |
erjo@218 | 40 chroot "$1/" depmod -a ${KERNELRELEASE} |
erjo@218 | 41 } |
erjo@218 | 42 |
erjo@218 | 43 post_remove() |
erjo@218 | 44 { |
erjo@218 | 45 KERNELRELEASE=$(cat $1/etc/ovzkernel/kernel.release) |
erjo@218 | 46 depmod -a ${KERNELRELEASE} |
erjo@218 | 47 } |
erjo@218 | 48 |