wok-current annotate linux-romfs/receipt @ rev 25685
Add checkspace / fetchall feature for tazpkg
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Thu Mar 14 20:28:39 2024 +0000 (8 months ago) |
parents | a5920dcf0199 |
children | db14014acdba |
rev | line source |
---|---|
pascal@17267 | 1 # SliTaz package receipt. |
pascal@17267 | 2 |
pascal@17267 | 3 PACKAGE="linux-romfs" |
shann@25667 | 4 VERSION="5.10.210" |
pascal@17267 | 5 CATEGORY="base-system" |
pascal@17267 | 6 SHORT_DESC="The Linux kernel romfs module." |
pascal@17267 | 7 MAINTAINER="devel@slitaz.org" |
pascal@17267 | 8 LICENSE="GPL2" |
pascal@17267 | 9 DEPENDS="linux" |
pascal@17267 | 10 WANTED="linux" |
pascal@20421 | 11 WEB_SITE="https://www.kernel.org/" |
pascal@17267 | 12 CONFIG_FILES="/etc/filesystems" |
pascal@17267 | 13 |
pascal@17267 | 14 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@17267 | 15 genpkg_rules() |
pascal@17267 | 16 { |
pascal@17267 | 17 local path |
pascal@17267 | 18 path=lib/modules/$VERSION-slitaz/kernel |
pascal@17267 | 19 mkdir -p $fs/$path $fs/etc |
pascal@17267 | 20 export src install |
pascal@17267 | 21 $wanted_stuff/list_modules.sh fs/${PACKAGE#*-} | while read module; do |
pascal@17267 | 22 dir=$path/$(dirname $module) |
pascal@17267 | 23 [ -d $fs/$dir ] || mkdir -p $fs/$dir |
pascal@17267 | 24 cp -a $install/$path/$module $fs/$dir |
pascal@17267 | 25 done |
pascal@17267 | 26 touch $fs/etc/filesystems |
pascal@17267 | 27 } |
pascal@17267 | 28 |
pascal@17267 | 29 # Post install/remove commands for Tazpkg. |
pascal@17267 | 30 post_install() |
pascal@17267 | 31 { |
pascal@18730 | 32 grep -qs ^${PACKAGE#*-}$ "$1/etc/filesystems" || \ |
pascal@18730 | 33 echo "${PACKAGE#*-}" >> "$1/etc/filesystems" |
pascal@18730 | 34 chroot "$1/" depmod -a $VERSION-slitaz |
pascal@17267 | 35 } |
pascal@17267 | 36 |
pascal@17267 | 37 post_remove() |
pascal@17267 | 38 { |
pascal@18730 | 39 sed -i "/^${PACKAGE#*-}\$/d" "$1/etc/filesystems" |
pascal@18730 | 40 chroot "$1/" depmod -a $VERSION-slitaz |
pascal@17267 | 41 } |