wok view coreutils-file-special/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
line source
1 # SliTaz package receipt.
3 PACKAGE="coreutils-file-special"
4 VERSION="8.12"
5 CATEGORY="system-tools"
6 SHORT_DESC="GNU utilities that work with special file types."
7 MAINTAINER="rcx@zoominternet.net"
8 LICENSE="GPL3"
9 WEB_SITE="http://www.gnu.org/software/coreutils/"
10 WANTED="coreutils"
12 DEPENDS="glibc-base"
14 # Rules to gen a SliTaz package suitable for Tazpkg.
15 #
16 # This is a special package for installed system or developer. We only take
17 # a few things, as Busybox provides all the basic utilities, but not for compiling.
18 # But DO NOT erase a Busybox applet, remove it before with pre_install rules.
19 #
20 genpkg_rules()
21 {
22 mkdir -p $fs/bin
23 cp -a $install/usr/bin/ln $fs/bin
24 cp -a $install/usr/bin/mkdir $fs/bin
25 cp -a $install/usr/bin/mknod $fs/bin
26 cp -a $install/usr/bin/rmdir $fs/bin
28 mkdir -p $fs/usr/bin
29 cp -a $install/usr/bin/link $fs/usr/bin
30 cp -a $install/usr/bin/mkfifo $fs/usr/bin
31 cp -a $install/usr/bin/mktemp $fs/usr/bin
32 cp -a $install/usr/bin/readlink $fs/usr/bin
33 cp -a $install/usr/bin/unlink $fs/usr/bin
34 }
36 # Pre and post install commands for Tazpkg.
37 # We must remove all Busybox symlink before installing.
38 #
39 pre_install()
40 {
41 echo "Processing pre-install commands..."
42 echo -n "Removing all Busybox replaced utils... "
43 rm -f "$1/bin/ln" "$1/bin/mkdir" "$1/bin/mknod" "$1/bin/rmdir"
44 rm -f "$1/usr/bin/mkfifo" "$1/usr/bin/readlink"
45 status
46 }
48 pre_remove()
49 {
50 # Need to handle the removal of ln
51 cp -a -fd "$1/bin/ln" "$1/bin/ln-coreutils"
52 }
53 post_remove()
54 {
55 # Restore ln
56 ln-coreutils -s /bin/busybox "$1/bin/ln"
58 ln -s /bin/busybox "$1/bin/mkdir"
59 ln -s /bin/busybox "$1/bin/mknod"
60 ln -s /bin/busybox "$1/bin/rmdir"
61 ln -s /bin/busybox "$1/usr/bin/mkfifo"
62 ln -s /bin/busybox "$1/usr/bin/readlink"
64 rm -f "$1/bin/ln-coreutils"
65 }