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