wok view coreutils-multicall/receipt @ rev 24415

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Feb 10 18:04:02 2022 +0000 (2022-02-10)
parents 9b6a3a5c1a07
children 3b252eb4d26a
line source
1 # SliTaz package receipt.
3 PACKAGE="coreutils-multicall"
4 VERSION="8.31"
5 CATEGORY="system-tools"
6 SHORT_DESC="Utilities for using and setting the basic system."
7 MAINTAINER="al.bobylev@gmail.com"
8 LICENSE="GPL3"
9 WEB_SITE="https://www.gnu.org/software/coreutils/coreutils.html"
11 TARBALL="coreutils-$VERSION.tar.xz"
12 WGET_URL="https://ftp.gnu.org/gnu/coreutils/$TARBALL"
14 SIBLINGS="coreutils"
15 DEPENDS="acl attr glibc-base gmp libcap"
16 BUILD_DEPENDS="automake gmp-dev libcap-dev xz"
18 # What is the latest version available today?
19 current_version()
20 {
21 wget -O - ${WGET_URL%/*} 2>/dev/null | \
22 sed '/latest/d;/coreutils-/!d;/tar/!d;s|.*coreutils-||;s|.tar.*||' | sort -Vr | sed q
23 }
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 # LFS: Coreutils Internationalization Fixes Patch
29 # patch -Np1 -i $WOK/coreutils/stuff/coreutils-8.25-i18n-2.patch
31 # SliTaz: show extended info touching CPU via uname
32 patch -p1 -i $WOK/coreutils/stuff/uname.u
34 autoreconf -fi
36 # bypass checking whether mknod can create fifo without root privileges
37 export FORCE_UNSAFE_CONFIGURE=1
39 ./configure \
40 --enable-single-binary=symlinks \
41 $CONFIGURE_ARGS &&
42 make &&
43 make install
45 # LFS: Move programs to the locations specified by the FHS
46 mkdir -p $install/bin
47 mkdir -p $install/usr/sbin
48 mkdir -p $install/usr/share/man/man8
50 for i in cat chgrp chmod chown cp date dd df echo false ln ls mkdir \
51 mknod mv pwd rm rmdir stty sync true uname
52 do
53 rm $install/usr/bin/$i
54 ln -s /usr/bin/coreutils $install/bin/$i
55 done
56 rm $install/usr/bin/chroot
57 ln -s /usr/bin/coreutils $install/usr/sbin/chroot
58 mv $install/usr/share/man/man1/chroot.1 \
59 $install/usr/share/man/man8/chroot.8
61 sed -i 's|"1"|"8"|' $install/usr/share/man/man8/chroot.8
63 find $install/usr/share/man -type f -exec gzip -9 \{\} \;
64 }
66 # Rules to gen a SliTaz package suitable for Tazpkg.
67 genpkg_rules()
68 {
69 cp -a $install/* $fs
70 rm -r $fs/usr/share/info
71 rm -r $fs/usr/share/locale
72 }
74 post_install()
75 {
76 # Remove Busybox applets in order to not clash with ("/bin", "/sbin",
77 # "/usr/bin" and "/usr/sbin" conflicts with the same filename)
78 rm "$1/bin/base64" # /usr/bin/base64
79 rm "$1/bin/kill" # /usr/bin/kill
80 rm "$1/bin/mktemp" # /usr/bin/mktemp
81 rm "$1/bin/nice" # /usr/bin/nice
82 rm "$1/bin/printenv" # /usr/bin/printenv
83 rm "$1/bin/sleep" # /usr/bin/sleep
84 rm "$1/bin/stat" # /usr/bin/stat
85 rm "$1/bin/touch" # /usr/bin/touch
86 }
88 post_remove()
89 {
90 # Restore all Busybox applets that have been replaced
92 # /bin:
93 for i in base64 cat chgrp chmod chown cp date dd df echo false kill ln ls \
94 mkdir mknod mktemp mv nice printenv pwd rm rmdir sleep stat stty sync \
95 touch true uname
96 do
97 busybox ln -s busybox "$1/bin/$i"
98 done
100 # /usr/bin:
101 for i in '[' basename cksum comm cut dirname du env expand expr fold \
102 groups head hostid id install logname md5sum mkfifo nohup od printf \
103 readlink realpath seq sha1sum sha256sum sha512sum sort split sum tac \
104 tail tee test timeout tr tty unexpand uniq uptime users wc who whoami \
105 yes
106 do
107 busybox ln -s /bin/busybox "$1/usr/bin/$i"
108 done
110 # /usr/sbin:
111 busybox ln -s /bin/busybox "$1/usr/sbin/chroot"
112 }