wok annotate coreutils-file-attributes/receipt @ rev 18730

Quote root dir in post_install
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Dec 20 15:13:45 2015 +0100 (2015-12-20)
parents 2b9f96603415
children 6fab3264ba87
rev   line source
rcx@3662 1 # SliTaz package receipt.
rcx@3662 2
rcx@3662 3 PACKAGE="coreutils-file-attributes"
slaxemulator@10149 4 VERSION="8.12"
rcx@3662 5 CATEGORY="system-tools"
rcx@3662 6 SHORT_DESC="GNU utilities that change file attributes."
rcx@3662 7 MAINTAINER="rcx@zoominternet.net"
pascal@14999 8 LICENSE="GPL3"
rcx@3662 9 WEB_SITE="http://www.gnu.org/software/coreutils/"
pascal@14999 10 WANTED="coreutils"
pascal@14999 11
rcx@3662 12 DEPENDS="glibc-base"
rcx@3662 13
rcx@3662 14 # Rules to gen a SliTaz package suitable for Tazpkg.
rcx@3662 15 #
rcx@3662 16 # This is a special package for installed system or developer. We only take
rcx@3662 17 # a few things, as Busybox provides all the basic utilities, but not for compiling.
rcx@3662 18 # But DO NOT erase a Busybox applet, remove it before with pre_install rules.
rcx@3662 19 #
rcx@3662 20 genpkg_rules()
rcx@3662 21 {
rcx@3662 22 mkdir -p $fs/bin
pascal@14999 23 cp -a $install/usr/bin/chown $fs/bin
pascal@14999 24 cp -a $install/usr/bin/chgrp $fs/bin
pascal@14999 25 cp -a $install/usr/bin/chmod $fs/bin
pascal@14999 26 cp -a $install/usr/bin/touch $fs/bin
rcx@3662 27 }
rcx@3662 28
rcx@3662 29 # Pre and post install commands for Tazpkg.
rcx@3662 30 # We must remove all Busybox symlink before installing.
rcx@3662 31 #
rcx@3662 32 pre_install()
rcx@3662 33 {
rcx@3662 34 echo "Processing pre-install commands..."
rcx@3662 35 echo -n "Removing all Busybox replaced utils... "
pascal@18730 36 rm -f "$1/bin/chown" "$1/bin/chgrp" "$1/bin/chmod" "$1/bin/touch"
rcx@3662 37 status
rcx@3662 38 }
rcx@3662 39
rcx@3662 40 post_remove()
rcx@3662 41 {
pascal@18730 42 ln -s /bin/busybox "$1/bin/chown"
pascal@18730 43 ln -s /bin/busybox "$1/bin/chgrp"
pascal@18730 44 ln -s /bin/busybox "$1/bin/chmod"
pascal@18730 45 ln -s /bin/busybox "$1/bin/touch"
rcx@3662 46 }