wok-next view coreutils/receipt @ rev 21722

efivar: typo in post_install
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Sep 01 10:31:46 2020 +0000 (2020-09-01)
parents 303e20b105cd
children
line source
1 # SliTaz package receipt v2.
3 PACKAGE="coreutils"
4 VERSION="8.32"
5 CATEGORY="meta"
6 TAGS="LFS"
7 SHORT_DESC="Utilities for using and setting the basic system"
8 MAINTAINER="maintainer@slitaz.org"
9 LICENSE="GPL3"
10 WEB_SITE="https://www.gnu.org/software/coreutils/coreutils.html"
11 LFS="http://www.linuxfromscratch.org/lfs/view/stable/chapter05/coreutils.html"
13 TARBALL="$PACKAGE-$VERSION.tar.xz"
14 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
16 BUILD_DEPENDS="autoconf automake gettext-dev gmp-dev libcap-dev openssl-dev
17 patch texinfo xz"
18 SPLIT="\
19 $PACKAGE-character $PACKAGE-command $PACKAGE-conditions \
20 $PACKAGE-context-system $PACKAGE-context-user $PACKAGE-context-working \
21 $PACKAGE-directory $PACKAGE-disk $PACKAGE-file-attributes \
22 $PACKAGE-file-format $PACKAGE-file-output-full $PACKAGE-file-output-part \
23 $PACKAGE-file-sort $PACKAGE-file-special $PACKAGE-file-summarize \
24 $PACKAGE-line $PACKAGE-numeric $PACKAGE-operations \
25 $PACKAGE-path $PACKAGE-print $PACKAGE-redirection \
26 $PACKAGE-multicall:multi"
28 compile_rules()
29 {
30 case $SET in
31 multi) SET_ARGS='--enable-single-binary=symlinks';;
32 *) SET_ARGS='';;
33 esac
34 # Rebuild fixed translations
35 msgfmt po/nb.po -o po/nb.gmo
36 msgfmt po/sl.po -o po/sl.gmo
38 autoreconf -fi
40 FORCE_UNSAFE_CONFIGURE=1 \
41 ./configure \
42 --with-openssl \
43 $SET_ARGS \
44 $CONFIGURE_ARGS &&
45 make &&
46 make install || return 1
48 # LFS: Move programs to the locations specified by the FHS
49 mkdir -p \
50 $install/bin \
51 $install/usr/sbin \
52 $install/usr/share/man/man8
54 while read from to
55 do
56 case $SET in
57 multi)
58 rm $install$from
59 # make relative symlinks
60 case $to in
61 /bin/*) ln -s ../usr/bin/coreutils $install$to;;
62 *) ln -s ../bin/coreutils $install$to;;
63 esac
64 ;;
65 *)
66 mv $install$from $install$to
67 ;;
68 esac
69 done <<EOT
70 /usr/bin/cat /bin/cat
71 /usr/bin/chgrp /bin/chgrp
72 /usr/bin/chmod /bin/chmod
73 /usr/bin/chown /bin/chown
74 /usr/bin/cp /bin/cp
75 /usr/bin/date /bin/date
76 /usr/bin/dd /bin/dd
77 /usr/bin/df /bin/df
78 /usr/bin/echo /bin/echo
79 /usr/bin/false /bin/false
80 /usr/bin/kill /bin/kill
81 /usr/bin/ln /bin/ln
82 /usr/bin/ls /bin/ls
83 /usr/bin/mkdir /bin/mkdir
84 /usr/bin/mknod /bin/mknod
85 /usr/bin/mv /bin/mv
86 /usr/bin/pwd /bin/pwd
87 /usr/bin/rm /bin/rm
88 /usr/bin/rmdir /bin/rmdir
89 /usr/bin/stty /bin/stty
90 /usr/bin/sync /bin/sync
91 /usr/bin/true /bin/true
92 /usr/bin/uname /bin/uname
93 /usr/bin/chroot /usr/sbin/chroot
94 EOT
95 mv $install/usr/share/man/man1/chroot.1 \
96 $install/usr/share/man/man8/chroot.8
97 sed -i 's|"1"|"8"|' $install/usr/share/man/man8/chroot.8
98 }
100 genpkg_rules()
101 {
102 DEPENDS="glibc-base" # default
103 case $PACKAGE in
104 coreutils)
105 DEPENDS=${SPLIT/coreutils-multicall:multi} # all but coreutils-multicall
106 ;;
107 *-character)
108 copy expand tr unexpand
109 CAT="system-tools|operate on characters"
110 ;;
111 *-command)
112 copy env kill nice nohup sleep stdbuf timeout libstdbuf.so chroot
113 CAT="system-tools|commands"
114 ;;
115 *-conditions)
116 copy false true [ expr test
117 CAT="system-tools|conditions"
118 DEPENDS="glibc-base gmp"
119 ;;
120 *-context-system)
121 copy date uname chcon hostid nproc runcon uptime
122 CAT="system-tools|system context"
123 ;;
124 *-context-user)
125 copy groups id logname pinky users who whoami
126 CAT="system-tools|user context"
127 ;;
128 *-context-working)
129 copy pwd stty printenv tty
130 CAT="system-tools|working context"
131 ;;
132 *-directory)
133 copy ls dir dircolors vdir
134 CAT="system-tools|list directories"
135 DEPENDS="glibc-base libcap"
136 ;;
137 *-disk)
138 copy df sync du stat truncate
139 CAT="system-tools|work with disks"
140 ;;
141 *-file-attributes)
142 copy chgrp chmod chown touch
143 CAT="system-tools|change file attributes"
144 ;;
145 *-file-format)
146 copy fmt fold pr
147 CAT="system-tools|format file contents"
148 ;;
149 *-file-output-full)
150 copy cat base32 base64 nl od tac
151 CAT="system-tools|output entire files"
152 ;;
153 *-file-output-part)
154 copy csplit head split tail
155 CAT="system-tools|output file parts"
156 ;;
157 *-file-sort)
158 copy comm ptx shuf sort tsort uniq
159 CAT="system-tools|operate on sorted files"
160 DEPENDS="glibc-base openssl" # openssl for `sort`
161 ;;
162 *-file-special)
163 copy ln mkdir mknod rmdir link mkfifo mktemp readlink realpath unlink
164 CAT="system-tools|work with special file types"
165 ;;
166 *-file-summarize)
167 copy b2sum cksum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum sum wc
168 CAT="system-tools|summarize files"
169 DEPENDS="glibc-base openssl"
170 ;;
171 *-line)
172 copy cut join paste
173 CAT="system-tools|operate on fields within a line"
174 ;;
175 *-numeric)
176 copy factor seq
177 CAT="system-tools|numeric"
178 DEPENDS="glibc-base gmp"
179 ;;
180 *-operations)
181 copy cp dd mv install rm shred
182 CAT="system-tools|perform basic operations"
183 DEPENDS="glibc-base acl attr"
184 ;;
185 *-path)
186 copy basename dirname pathchk
187 CAT="system-tools|perform path manipulation"
188 ;;
189 *-print)
190 copy echo numfmt printf yes
191 CAT="system-tools|print text"
192 ;;
193 *-redirection)
194 copy tee
195 CAT="system-tools|redirection"
196 ;;
197 *-multicall)
198 copy @std
199 CAT="system-tools|packed in single binary like Busybox"
200 DEPENDS="glibc-base acl attr gmp libcap openssl"
201 ;;
202 esac
203 }
205 # Remove Busybox applets in order to not clash with ("/bin", "/sbin",
206 # "/usr/bin" and "/usr/sbin" conflicts with the same filename)
208 # for /usr/bin/nice /usr/bin/sleep
209 post_install_coreutils_command()
210 {
211 for i in nice sleep
212 do
213 readlink "$1/bin/$i" | grep -q busybox && rm "$1/bin/$i"
214 done
215 :
216 }
218 # for /usr/bin/printenv
219 post_install_coreutils_context_working()
220 {
221 readlink "$1/bin/printenv" | grep -q busybox && rm "$1/bin/printenv"
222 :
223 }
225 # for /usr/bin/stat
226 post_install_coreutils_disk()
227 {
228 readlink "$1/bin/stat" | grep -q busybox && rm "$1/bin/stat"
229 :
230 }
232 # for /usr/bin/touch
233 post_install_coreutils_file_attributes()
234 {
235 readlink "$1/bin/touch" | grep -q busybox && rm "$1/bin/touch"
236 :
237 }
239 # for /usr/bin/base64
240 post_install_coreutils_file_output_full()
241 {
242 readlink "$1/bin/base64" | grep -q busybox && rm "$1/bin/base64"
243 :
244 }
246 # for /usr/bin/mktemp
247 post_install_coreutils_file_special()
248 {
249 readlink "$1/bin/mktemp" | grep -q busybox && rm "$1/bin/mktemp"
250 :
251 }
253 # for /usr/bin/base64 /usr/bin/mktemp /usr/bin/nice /usr/bin/printenv
254 # /usr/bin/sleep /usr/bin/stat /usr/bin/touch
255 post_install_coreutils_multicall()
256 {
257 for i in base64 mktemp nice printenv sleep stat touch
258 do
259 readlink "$1/bin/$i" | grep -q busybox && rm "$1/bin/$i"
260 done
261 :
262 }