wok-next view coreutils/receipt @ rev 20533

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