wok annotate linux64-dlm/receipt @ rev 15149

php: fix post_install
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Aug 15 13:25:02 2013 +0000 (2013-08-15)
parents 416fab3c90c0
children 051931e905b0
rev   line source
pascal@12304 1 # SliTaz package receipt.
pascal@12304 2
pascal@12304 3 PACKAGE="linux64-dlm"
pascal@14175 4 VERSION="3.2.40"
pascal@12304 5 BASEVER="${VERSION:0:3}"
pascal@12304 6 CATEGORY="base-system"
pascal@12304 7 SHORT_DESC="The Linux kernel dlmfs module."
pascal@12304 8 MAINTAINER="devel@slitaz.org"
pascal@14657 9 LICENSE="GPL2"
pascal@12304 10 DEPENDS="linux64"
pascal@12304 11 WANTED="linux"
pascal@12304 12 PROVIDE="linux-dlm"
pascal@12304 13 WEB_SITE="http://www.kernel.org/"
pascal@12304 14 CONFIG_FILES="/etc/filesystems"
pascal@12304 15
pascal@12304 16 # Modules paths and list
pascal@12304 17 MOD_PATH="lib/modules/$BASEVER-slitaz/kernel"
pascal@12638 18 MODULES="fs/dlm/dlm.ko.xz"
pascal@12304 19
pascal@12304 20 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@12304 21 genpkg_rules()
pascal@12304 22 {
pascal@12304 23 _pkg=$_pkg/linux64
pascal@12304 24 mkdir -p ${fs}/${MOD_PATH} $fs/etc
pascal@12304 25 for module in $MODULES
pascal@12304 26 do
pascal@12304 27 dir=$MOD_PATH/$(dirname $module)
pascal@12304 28 [ -d $fs/$dir ] || mkdir -p $fs/$dir
pascal@12304 29 cp -a $_pkg/$MOD_PATH/$module $fs/$dir
pascal@12304 30 done
pascal@12304 31 touch $fs/etc/filesystems
pascal@12304 32 }
pascal@12304 33
pascal@12304 34 # Post install/remove commands for Tazpkg.
pascal@12304 35 post_install()
pascal@12304 36 {
pascal@12304 37 grep -qs ^${PACKAGE#*-}$ $1/etc/filesystems || \
pascal@12304 38 echo "${PACKAGE#*-}" >> $1/etc/filesystems
pascal@12304 39 chroot "$1/" depmod -a $BASEVER-slitaz
pascal@12304 40 }
pascal@12304 41
pascal@12304 42 post_remove()
pascal@12304 43 {
pascal@12304 44 sed -i "/^${PACKAGE#*-}\$/d" $1/etc/filesystems
pascal@12304 45 chroot "$1/" depmod -a $BASEVER-slitaz
pascal@12304 46 }
pascal@12304 47