wok view coreutils/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"
4 VERSION="8.31"
5 CATEGORY="system-tools"
6 SHORT_DESC="Utilities for using and setting the basic system."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL3"
9 WEB_SITE="https://www.gnu.org/software/coreutils/coreutils.html"
11 TARBALL="$PACKAGE-$VERSION.tar.xz"
12 WGET_URL="https://ftp.gnu.org/gnu/$PACKAGE/$TARBALL"
14 SIBLINGS="coreutils-multicall"
15 SPLIT="coreutils-character coreutils-command coreutils-conditions
16 coreutils-context-system coreutils-context-user
17 coreutils-context-working coreutils-directory coreutils-disk
18 coreutils-file-attributes coreutils-file-format
19 coreutils-file-output-full coreutils-file-output-part
20 coreutils-file-sort coreutils-file-special coreutils-file-summarize
21 coreutils-line coreutils-numeric coreutils-operations
22 coreutils-path coreutils-print coreutils-redirection"
23 DEPENDS="acl attr glibc-base gmp"
24 BUILD_DEPENDS="automake gmp-dev libcap-dev xz"
26 # What is the latest version available today?
27 current_version()
28 {
29 wget -O - ${WGET_URL%/*} 2>/dev/null | \
30 sed '/latest/d;/coreutils-/!d;/tar/!d;s|.*coreutils-||;s|.tar.*||' | sort -Vr | sed q
31 }
33 # Rules to configure and make the package.
34 compile_rules()
35 {
36 # LFS: Coreutils Internationalization Fixes Patch
37 # patch -Np1 -i $stuff/coreutils-8.25-i18n-2.patch
39 # SliTaz: show extended info touching CPU via uname
40 patch -p1 -i $stuff/uname.u
42 autoreconf -fi
44 # bypass checking whether mknod can create fifo without root privileges
45 export FORCE_UNSAFE_CONFIGURE=1
47 ./configure $CONFIGURE_ARGS &&
48 make &&
49 make install
51 # LFS: Move programs to the locations specified by the FHS
52 mkdir -p $install/bin
53 mkdir -p $install/usr/sbin
54 mkdir -p $install/usr/share/man/man8
56 for i in cat chgrp chmod chown cp date dd df echo false ln ls mkdir \
57 mknod mv pwd rm rmdir stty sync true uname
58 do
59 mv $install/usr/bin/$i $install/bin
60 done
61 mv $install/usr/bin/chroot $install/usr/sbin
62 mv $install/usr/share/man/man1/chroot.1 \
63 $install/usr/share/man/man8/chroot.8
65 sed -i 's|"1"|"8"|' $install/usr/share/man/man8/chroot.8
67 find $install/usr/share/man -type f -exec gzip -9 \{\} \;
68 }
70 # Rules to gen a SliTaz package suitable for Tazpkg.
71 genpkg_rules()
72 {
73 # A set of binaries looks intriguing, isn't it?
74 # For what is this package with exactly these binaries?
76 mkdir -p $fs/usr/bin
77 mkdir -p $fs/bin
79 cd $install/usr/bin
80 for i in base64 csplit factor fmt join od paste ptx shred shuf \
81 split users groups
82 do
83 cp -a $i $fs/usr/bin
84 done
86 cp -a $install/bin/cp $fs/bin
87 }
89 post_install()
90 {
91 # Remove Busybox applet in order to not clash with
92 # /usr/bin/base64 from this package.
93 rm "$1/bin/base64"
94 }
96 post_remove()
97 {
98 ln -s busybox "$1/bin/base64"
99 ln -s busybox "$1/bin/cp"
100 ln -s /bin/busybox "$1/usr/bin/groups"
101 ln -s /bin/busybox "$1/usr/bin/od"
102 ln -s /bin/busybox "$1/usr/bin/split"
103 ln -s /bin/busybox "$1/usr/bin/users"
104 }