wok view coreutils/receipt @ rev 25037

Up glza (0.11.4)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat May 21 21:38:29 2022 +0000 (23 months ago)
parents 17091bc7c301
children
line source
1 # SliTaz package receipt.
3 PACKAGE="coreutils"
4 VERSION="9.0"
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 SUGGESTED="coreutils-lang"
15 SIBLINGS="coreutils-multicall"
16 SPLIT="coreutils-character coreutils-command coreutils-conditions
17 coreutils-context-system coreutils-context-user
18 coreutils-context-working coreutils-directory coreutils-disk
19 coreutils-file-attributes coreutils-file-format
20 coreutils-file-output-full coreutils-file-output-part
21 coreutils-file-sort coreutils-file-special coreutils-file-summarize
22 coreutils-line coreutils-numeric coreutils-operations
23 coreutils-path coreutils-print coreutils-redirection"
24 DEPENDS="acl attr glibc-base gmp"
25 BUILD_DEPENDS="automake gmp-dev libcap-dev xz"
27 # What is the latest version available today?
28 current_version()
29 {
30 wget -O - ${WGET_URL%/*} 2>/dev/null | \
31 sed '/latest/d;/coreutils-/!d;/tar/!d;s|.*coreutils-||;s|.tar.*||' | sort -Vr | sed q
32 }
34 # Rules to configure and make the package.
35 compile_rules()
36 {
37 # LFS: Coreutils Internationalization Fixes Patch
38 # patch -Np1 -i $stuff/coreutils-8.25-i18n-2.patch
40 # SliTaz: show extended info touching CPU via uname
41 patch -p1 -i $stuff/uname.u
43 autoreconf -fi
45 # bypass checking whether mknod can create fifo without root privileges
46 export FORCE_UNSAFE_CONFIGURE=1
48 ./configure $CONFIGURE_ARGS &&
49 make &&
50 make install
52 # LFS: Move programs to the locations specified by the FHS
53 mkdir -p $install/bin
54 mkdir -p $install/usr/sbin
55 mkdir -p $install/usr/share/man/man8
57 while read i
58 do
59 mv $install/usr/bin/$i $install/bin
60 done <<EOT
61 cat
62 chgrp
63 chmod
64 chown
65 cp
66 date
67 dd
68 df
69 echo
70 false
71 ln
72 ls
73 mkdir
74 mknod
75 mv
76 pwd
77 rm
78 rmdir
79 stty
80 sync
81 true
82 uname
83 EOT
84 mv $install/usr/bin/chroot $install/usr/sbin
85 mv $install/usr/share/man/man1/chroot.1 \
86 $install/usr/share/man/man8/chroot.8
88 sed -i 's|"1"|"8"|' $install/usr/share/man/man8/chroot.8
90 find $install/usr/share/man -type f -exec gzip -9 \{\} \;
91 }
93 # Rules to gen a SliTaz package suitable for Tazpkg.
94 genpkg_rules()
95 {
96 # A set of binaries looks intriguing, isn't it?
97 # For what is this package with exactly these binaries?
99 mkdir -p $fs/usr/bin
100 mkdir -p $fs/bin
102 cd $install/usr/bin
103 while read i
104 do
105 cp -a $i $fs/usr/bin
106 done <<EOT
107 base64
108 csplit
109 factor
110 fmt
111 groups
112 join
113 od
114 paste
115 ptx
116 shred
117 shuf
118 split
119 users
120 EOT
121 cp -a $install/bin/cp $fs/bin
122 }
124 post_install()
125 {
126 # Remove Busybox applet in order to not clash with
127 # /usr/bin/base64 from this package.
128 rm "$1/bin/base64"
129 }
131 post_remove()
132 {
133 ln -s busybox "$1/bin/base64"
134 ln -s busybox "$1/bin/cp"
135 ln -s /bin/busybox "$1/usr/bin/groups"
136 ln -s /bin/busybox "$1/usr/bin/od"
137 ln -s /bin/busybox "$1/usr/bin/split"
138 ln -s /bin/busybox "$1/usr/bin/users"
139 }