]> TLD Linux GIT Repositories - packages/coreutils.git/blob - coreutils.spec
- merged 9.3 from PLD
[packages/coreutils.git] / coreutils.spec
1 #
2 # Conditional build:
3 %bcond_with     advcopy         # progress bar in cp (orphaned patch)
4 %bcond_with     multicall       # Compile all the tools in a single binary
5 %bcond_with     tests           # unit tests running
6 %bcond_without  y2038           # Y2038 support for 32-bit archs
7
8 Summary:        GNU Core-utils - basic command line utilities
9 Summary(pl.UTF-8):      GNU Core-utils - podstawowe narzędzia działające z linii poleceń
10 Name:           coreutils
11 Version:        9.3
12 Release:        1
13 License:        GPL v3+
14 Group:          Applications/System
15 Source0:        http://ftp.gnu.org/gnu/coreutils/%{name}-%{version}.tar.xz
16 # Source0-md5:  040b4b7acaf89499834bfc79609af29f
17 Source1:        %{name}-non-english-man-pages.tar.bz2
18 # Source1-md5:  f7c986ebc74ccb8d08ed70141063f14c
19 Source2:        DIR_COLORS
20 Source3:        DIR_COLORS.256color
21 Source4:        colorls.sh
22 Source5:        colorls.csh
23 Source6:        mktemp.1.pl
24 Source7:        %{name}.sh
25 Patch0:         %{name}-info.patch
26 Patch1:         %{name}-getgid.patch
27 Patch2:         %{name}-uname-cpuinfo.patch
28 Patch3:         %{name}-date-man.patch
29
30 Patch6:         %{name}-fmt-wchars.patch
31 Patch7:         %{name}-sparc64.patch
32 # http://translationproject.org/latest/coreutils/pl.po (pass through msgcat to generate shorter diff)
33 Patch8:         %{name}-pl.po-update.patch
34 # https://github.com/jarun/advcpmv
35 Patch9:         %{name}-advcopy.patch
36 Patch10:        tests.patch
37 URL:            http://www.gnu.org/software/coreutils/
38 BuildRequires:  acl-devel
39 BuildRequires:  attr-devel
40 BuildRequires:  autoconf >= 2.69
41 BuildRequires:  automake >= 1:1.11.2
42 BuildRequires:  gcc >= 5:3.2
43 BuildRequires:  gettext-tools >= 0.19.2
44 BuildRequires:  gmp-devel
45 BuildRequires:  help2man
46 BuildRequires:  libcap-devel
47 BuildRequires:  libselinux-devel
48 BuildRequires:  rpmbuild(find_lang) >= 1.24
49 BuildRequires:  smack-devel
50 BuildRequires:  tar >= 1:1.22
51 BuildRequires:  texinfo >= 4.2
52 BuildRequires:  xz
53 %if %{with tests}
54 BuildRequires:  strace
55 %endif
56 Requires:       setup >= 2.4.6-2
57 Provides:       fileutils
58 Provides:       mktemp = %{version}-%{release}
59 Provides:       sh-utils
60 Provides:       stat
61 Provides:       textutils
62 Obsoletes:      fileutils < 4.2
63 Obsoletes:      mktemp < 1.6
64 Obsoletes:      sh-utils < 2.1
65 Obsoletes:      stat < 3.4
66 Obsoletes:      textutils < 1:2.2
67 Conflicts:      shadow < 1:4.0.3-6
68 Conflicts:      tetex < 1:2.0.2
69 # ensure util-linux has su included
70 Conflicts:      util-linux < 2.22
71 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
72
73 %description
74 These are the GNU core utilities. This package is the union of the GNU
75 fileutils, sh-utils, and textutils packages.
76
77 Most of these programs have significant advantages over their Unix
78 counterparts, such as greater speed, additional options, and fewer
79 arbitrary limits.
80
81 The programs that can be built with this package are:
82
83   [ basename cat chgrp chmod chown chroot cksum comm cp csplit cut date
84   dd df dir dircolors dirname du echo env expand expr factor false fmt
85   fold install groups head hostid id join link ln logname ls md5sum
86   mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr printenv
87   printf ptx pwd realpath rm rmdir seq sha1sum shred sleep sort split
88   stat stty sum sync tac tail tee test touch tr true tsort tty uname
89   unexpand uniq unlink users vdir wc who whoami yes
90
91 %description -l pl.UTF-8
92 Narzędzia podstawowe (core utilities) GNU to połączone paczki GNU
93 fileutils, sh-utils i textutils.
94
95 Większość z zawartych programów jest znacznie ulepszona w porównaniu
96 z ich uniksowymi odpowiednikami, np. szybciej działają, mają dodatkowe
97 opcje i mniej ograniczeń.
98
99 Programy zawarte w tym pakiecie to:
100
101   [ basename cat chgrp chmod chown chroot cksum comm cp csplit cut date
102   dd df dir dircolors dirname du echo env expand expr factor false fmt
103   fold ginstall groups head hostid id join link ln logname ls md5sum
104   mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr printenv
105   printf ptx pwd realpath rm rmdir seq sha1sum shred sleep sort split
106   stat stty sum sync tac tail tee test touch tr true tsort tty uname
107   unexpand uniq unlink users vdir wc who whoami yes
108
109 %prep
110 %setup -q -a1
111 # translationproject seems to be older than in 9.0
112 #%patch8 -p1
113 %patch0 -p1
114 %patch1 -p1
115 %patch2 -p1
116 %patch3 -p1
117
118 %patch6 -p1
119 %ifarch sparc64
120 %patch7 -p1
121 %endif
122 %if %{with advcopy}
123 # progress-bar patch, -g,--progress-bar //if in doubt, comment it out
124 %patch9 -p1
125 %endif
126 %patch10 -p1
127
128 %{__mv} man/pt_BR man/pt
129
130 %{__perl} -pi -e 's@GNU/Linux@TLD Linux@' m4/host-os.m4
131
132 # allow rebuilding *.gmo
133 %{__rm} po/stamp-po
134
135 # 8-bit-pfx test fails under C locale:
136 # LC_ALL=C echo -e "ça\nçb\n"|LC_ALL=C fmt -p 'ç'
137 # fmt: memory exhausted
138 %{__sed} -i -e 25,27d tests/fmt/base.pl
139
140 # /etc/resolv.conf is blocked in tld builders, try some other file
141 %{__sed} -i -e 's,/etc/resolv.conf,/etc/hosts,' gnulib-tests/test-read-file.c
142
143 # getgid needs to be fixed:
144 # getgid: missing operand
145 # Try `getgid --help' for more information.
146 %{__rm} tests/misc/help-version.sh
147 %{__sed} -i -e '/misc\/help-version/d' tests/local.mk
148
149 # fails on some filesystems (like XFS), where readdir returns d_type=DT_UNKNOWN
150 %{__rm} tests/ls/stat-free-color.sh
151 %{__sed} -i -e '/ls\/stat-free-color/d' tests/local.mk
152
153 # filesystem layout dependant (fails on some xfs fs)
154 %{__rm} tests/dd/sparse.sh
155 %{__sed} -i -e '/dd\/sparse/d' tests/local.mk
156
157 # mksh is too smart for those, won't let programs fail on ulimit
158 # would need bash here
159 %{__rm} tests/misc/sort-merge-fdlimit.sh
160 %{__sed} -i -e '/misc\/sort-merge-fdlimit/d' tests/local.mk
161 %{__rm} tests/split/r-chunk.sh
162 %{__sed} -i -e '/split\/r-chunk/d' tests/local.mk
163
164 %build
165 build-aux/gen-lists-of-programs.sh --autoconf > m4/cu-progs.m4
166 build-aux/gen-lists-of-programs.sh --automake > src/cu-progs.mk
167 %{__gettextize}
168 %{__aclocal} -I m4
169 %{__autoconf}
170 %{__autoheader}
171 %{__automake}
172 %configure \
173         CFLAGS="%{rpmcflags} -DSYSLOG_SUCCESS -DSYSLOG_FAILURE -DSYSLOG_NON_ROOT" \
174         %{?with_multicall:--enable-single-binary=symlinks} \
175         --disable-silent-rules \
176         --enable-install-program=arch \
177         --enable-no-install-program=hostname,kill,uptime \
178         %{!?with_y2038:--disable-year2038}
179
180 %{__make} -j1
181
182 %if %{with tests}
183 sed -i -e 's#COLUMNS##g' tests/envvar-check
184 LC_ALL=C LANG=C %{__make} -j1 tests check
185 %endif
186
187 %install
188 rm -rf $RPM_BUILD_ROOT
189 install -d $RPM_BUILD_ROOT{/bin,/sbin,%{_bindir},%{_sbindir},/etc/shrc.d}
190
191 %{__make} install \
192         DESTDIR=$RPM_BUILD_ROOT
193
194 %{__mv} $RPM_BUILD_ROOT%{_bindir}/{arch,basename,cat,chgrp,chmod,chown,cp,date,dd,\
195 df,echo,false,id,link,ln,ls,mkdir,mknod,mktemp,mv,nice,printf,pwd,readlink,rm,rmdir,\
196 sleep,sort,stat,stty,sync,touch,true,unlink,uname} $RPM_BUILD_ROOT/bin
197
198 %if %{with multicall}
199 %{__mv} $RPM_BUILD_ROOT{%{_bindir},/bin}/coreutils
200 ln -s ../../bin/coreutils $RPM_BUILD_ROOT%{_bindir}
201 %endif
202
203 %{__mv} $RPM_BUILD_ROOT%{_bindir}/chroot $RPM_BUILD_ROOT%{_sbindir}
204
205 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
206 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
207 cp -p %{SOURCE4} %{SOURCE5} %{SOURCE7} $RPM_BUILD_ROOT/etc/shrc.d
208
209 for d in cs da de es fi fr hu id it ja ko nl pl pt ru zh_CN; do
210         install -d $RPM_BUILD_ROOT%{_mandir}/$d/man1
211         cp -p man/$d/*.1 $RPM_BUILD_ROOT%{_mandir}/$d/man1
212 done
213 cp -p %{SOURCE6} $RPM_BUILD_ROOT%{_mandir}/pl/man1/mktemp.1
214 # unwanted (-f left intentionally - some manuals could have no translations)
215 rm -f $RPM_BUILD_ROOT%{_mandir}/*/man1/{hostname,kill,su,uptime}.1
216 # always remove, never packaged but sometimes installed
217 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
218
219 %find_lang %{name}
220
221 %clean
222 rm -rf $RPM_BUILD_ROOT
223
224 %post   -p /sbin/postshell
225 -/usr/sbin/fix-info-dir -c %{_infodir}
226
227 %postun -p /sbin/postshell
228 -/usr/sbin/fix-info-dir -c %{_infodir}
229
230 %files -f %{name}.lang
231 %defattr(644,root,root,755)
232 %doc AUTHORS ChangeLog NEWS README THANKS THANKS-to-translators TODO
233 %attr(755,root,root) /bin/arch
234 %attr(755,root,root) /bin/basename
235 %attr(755,root,root) /bin/cat
236 %attr(755,root,root) /bin/chgrp
237 %attr(755,root,root) /bin/chmod
238 %attr(755,root,root) /bin/chown
239 %attr(755,root,root) /bin/cp
240 %attr(755,root,root) /bin/date
241 %attr(755,root,root) /bin/dd
242 %attr(755,root,root) /bin/df
243 %attr(755,root,root) /bin/echo
244 %attr(755,root,root) /bin/false
245 %attr(755,root,root) /bin/id
246 %attr(755,root,root) /bin/link
247 %attr(755,root,root) /bin/ln
248 %attr(755,root,root) /bin/ls
249 %attr(755,root,root) /bin/mkdir
250 %attr(755,root,root) /bin/mknod
251 %attr(755,root,root) /bin/mktemp
252 %attr(755,root,root) /bin/mv
253 %attr(755,root,root) /bin/nice
254 %attr(755,root,root) /bin/printf
255 %attr(755,root,root) /bin/pwd
256 %attr(755,root,root) /bin/readlink
257 %attr(755,root,root) /bin/rm
258 %attr(755,root,root) /bin/rmdir
259 %attr(755,root,root) /bin/sleep
260 %attr(755,root,root) /bin/sort
261 %attr(755,root,root) /bin/stat
262 %attr(755,root,root) /bin/stty
263 %attr(755,root,root) /bin/sync
264 %attr(755,root,root) /bin/touch
265 %attr(755,root,root) /bin/true
266 %attr(755,root,root) /bin/uname
267 %attr(755,root,root) /bin/unlink
268 %attr(755,root,root) %{_bindir}/[
269 %attr(755,root,root) %{_bindir}/b2sum
270 %attr(755,root,root) %{_bindir}/base32
271 %attr(755,root,root) %{_bindir}/base64
272 %attr(755,root,root) %{_bindir}/basenc
273 %attr(755,root,root) %{_bindir}/chcon
274 %attr(755,root,root) %{_bindir}/cksum
275 %attr(755,root,root) %{_bindir}/comm
276 %attr(755,root,root) %{_bindir}/csplit
277 %attr(755,root,root) %{_bindir}/cut
278 %attr(755,root,root) %{_bindir}/dir
279 %attr(755,root,root) %{_bindir}/dircolors
280 %attr(755,root,root) %{_bindir}/dirname
281 %attr(755,root,root) %{_bindir}/du
282 %attr(755,root,root) %{_bindir}/env
283 %attr(755,root,root) %{_bindir}/expand
284 %attr(755,root,root) %{_bindir}/expr
285 %attr(755,root,root) %{_bindir}/factor
286 %attr(755,root,root) %{_bindir}/fmt
287 %attr(755,root,root) %{_bindir}/fold
288 %attr(755,root,root) %{_bindir}/getgid
289 %attr(755,root,root) %{_bindir}/groups
290 %attr(755,root,root) %{_bindir}/head
291 %attr(755,root,root) %{_bindir}/hostid
292 %attr(755,root,root) %{_bindir}/install
293 %attr(755,root,root) %{_bindir}/join
294 %attr(755,root,root) %{_bindir}/logname
295 %attr(755,root,root) %{_bindir}/md5sum
296 %attr(755,root,root) %{_bindir}/mkfifo
297 %attr(755,root,root) %{_bindir}/nl
298 %attr(755,root,root) %{_bindir}/nohup
299 %attr(755,root,root) %{_bindir}/nproc
300 %attr(755,root,root) %{_bindir}/numfmt
301 %attr(755,root,root) %{_bindir}/od
302 %attr(755,root,root) %{_bindir}/paste
303 %attr(755,root,root) %{_bindir}/pathchk
304 %attr(755,root,root) %{_bindir}/pinky
305 %attr(755,root,root) %{_bindir}/pr
306 %attr(755,root,root) %{_bindir}/printenv
307 %attr(755,root,root) %{_bindir}/ptx
308 %attr(755,root,root) %{_bindir}/realpath
309 %attr(755,root,root) %{_bindir}/runcon
310 %attr(755,root,root) %{_bindir}/seq
311 %attr(755,root,root) %{_bindir}/sha1sum
312 %attr(755,root,root) %{_bindir}/sha224sum
313 %attr(755,root,root) %{_bindir}/sha256sum
314 %attr(755,root,root) %{_bindir}/sha384sum
315 %attr(755,root,root) %{_bindir}/sha512sum
316 %attr(755,root,root) %{_bindir}/shred
317 %attr(755,root,root) %{_bindir}/shuf
318 %attr(755,root,root) %{_bindir}/split
319 %attr(755,root,root) %{_bindir}/stdbuf
320 %attr(755,root,root) %{_bindir}/sum
321 %attr(755,root,root) %{_bindir}/tac
322 %attr(755,root,root) %{_bindir}/tail
323 %attr(755,root,root) %{_bindir}/tee
324 %attr(755,root,root) %{_bindir}/test
325 %attr(755,root,root) %{_bindir}/timeout
326 %attr(755,root,root) %{_bindir}/tr
327 %attr(755,root,root) %{_bindir}/truncate
328 %attr(755,root,root) %{_bindir}/tsort
329 %attr(755,root,root) %{_bindir}/tty
330 %attr(755,root,root) %{_bindir}/unexpand
331 %attr(755,root,root) %{_bindir}/uniq
332 %attr(755,root,root) %{_bindir}/users
333 %attr(755,root,root) %{_bindir}/vdir
334 %attr(755,root,root) %{_bindir}/wc
335 %attr(755,root,root) %{_bindir}/who
336 %attr(755,root,root) %{_bindir}/whoami
337 %attr(755,root,root) %{_bindir}/yes
338 %attr(755,root,root) %{_sbindir}/chroot
339 %if %{with multicall}
340 %attr(755,root,root) /bin/coreutils
341 %attr(755,root,root) %{_bindir}/coreutils
342 %{_mandir}/man1/coreutils.1*
343 %endif
344 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/DIR_COLORS
345 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/DIR_COLORS.256color
346 %config(noreplace) /etc/shrc.d/colorls.csh
347 %config(noreplace) /etc/shrc.d/colorls.sh
348 %config(noreplace) /etc/shrc.d/%{name}.sh
349 %dir %{_libexecdir}/coreutils
350 %attr(755,root,root) %{_libexecdir}/coreutils/libstdbuf.so
351 %{_mandir}/man1/arch.1*
352 %{_mandir}/man1/b2sum.1*
353 %{_mandir}/man1/base32.1*
354 %{_mandir}/man1/base64.1*
355 %{_mandir}/man1/basenc.1*
356 %{_mandir}/man1/basename.1*
357 %{_mandir}/man1/cat.1*
358 %{_mandir}/man1/chcon.1*
359 %{_mandir}/man1/chgrp.1*
360 %{_mandir}/man1/chmod.1*
361 %{_mandir}/man1/chown.1*
362 %{_mandir}/man1/chroot.1*
363 %{_mandir}/man1/cksum.1*
364 %{_mandir}/man1/comm.1*
365 %{_mandir}/man1/cp.1*
366 %{_mandir}/man1/csplit.1*
367 %{_mandir}/man1/cut.1*
368 %{_mandir}/man1/date.1*
369 %{_mandir}/man1/dd.1*
370 %{_mandir}/man1/df.1*
371 %{_mandir}/man1/dir.1*
372 %{_mandir}/man1/dircolors.1*
373 %{_mandir}/man1/dirname.1*
374 %{_mandir}/man1/du.1*
375 %{_mandir}/man1/echo.1*
376 %{_mandir}/man1/env.1*
377 %{_mandir}/man1/expand.1*
378 %{_mandir}/man1/expr.1*
379 %{_mandir}/man1/factor.1*
380 %{_mandir}/man1/false.1*
381 %{_mandir}/man1/fmt.1*
382 %{_mandir}/man1/fold.1*
383 %{_mandir}/man1/getgid.1*
384 %{_mandir}/man1/groups.1*
385 %{_mandir}/man1/head.1*
386 %{_mandir}/man1/hostid.1*
387 %{_mandir}/man1/id.1*
388 %{_mandir}/man1/install.1*
389 %{_mandir}/man1/join.1*
390 %{_mandir}/man1/link.1*
391 %{_mandir}/man1/ln.1*
392 %{_mandir}/man1/logname.1*
393 %{_mandir}/man1/ls.1*
394 %{_mandir}/man1/md5sum.1*
395 %{_mandir}/man1/mkdir.1*
396 %{_mandir}/man1/mkfifo.1*
397 %{_mandir}/man1/mknod.1*
398 %{_mandir}/man1/mktemp.1*
399 %{_mandir}/man1/mv.1*
400 %{_mandir}/man1/nice.1*
401 %{_mandir}/man1/nl.1*
402 %{_mandir}/man1/nohup.1*
403 %{_mandir}/man1/nproc.1*
404 %{_mandir}/man1/numfmt.1*
405 %{_mandir}/man1/od.1*
406 %{_mandir}/man1/paste.1*
407 %{_mandir}/man1/pathchk.1*
408 %{_mandir}/man1/pinky.1*
409 %{_mandir}/man1/pr.1*
410 %{_mandir}/man1/printenv.1*
411 %{_mandir}/man1/printf.1*
412 %{_mandir}/man1/ptx.1*
413 %{_mandir}/man1/pwd.1*
414 %{_mandir}/man1/readlink.1*
415 %{_mandir}/man1/realpath.1*
416 %{_mandir}/man1/rm.1*
417 %{_mandir}/man1/rmdir.1*
418 %{_mandir}/man1/runcon.1*
419 %{_mandir}/man1/seq.1*
420 %{_mandir}/man1/sha1sum.1*
421 %{_mandir}/man1/sha224sum.1*
422 %{_mandir}/man1/sha256sum.1*
423 %{_mandir}/man1/sha384sum.1*
424 %{_mandir}/man1/sha512sum.1*
425 %{_mandir}/man1/shred.1*
426 %{_mandir}/man1/shuf.1*
427 %{_mandir}/man1/sleep.1*
428 %{_mandir}/man1/sort.1*
429 %{_mandir}/man1/split.1*
430 %{_mandir}/man1/stat.1*
431 %{_mandir}/man1/stdbuf.1*
432 %{_mandir}/man1/stty.1*
433 %{_mandir}/man1/sum.1*
434 %{_mandir}/man1/sync.1*
435 %{_mandir}/man1/tac.1*
436 %{_mandir}/man1/tail.1*
437 %{_mandir}/man1/tee.1*
438 %{_mandir}/man1/test.1*
439 %{_mandir}/man1/timeout.1*
440 %{_mandir}/man1/touch.1*
441 %{_mandir}/man1/tr.1*
442 %{_mandir}/man1/true.1*
443 %{_mandir}/man1/truncate.1*
444 %{_mandir}/man1/tsort.1*
445 %{_mandir}/man1/tty.1*
446 %{_mandir}/man1/uname.1*
447 %{_mandir}/man1/unexpand.1*
448 %{_mandir}/man1/uniq.1*
449 %{_mandir}/man1/unlink.1*
450 %{_mandir}/man1/users.1*
451 %{_mandir}/man1/vdir.1*
452 %{_mandir}/man1/wc.1*
453 %{_mandir}/man1/who.1*
454 %{_mandir}/man1/whoami.1*
455 %{_mandir}/man1/yes.1*
456 %lang(cs) %{_mandir}/cs/man1/*
457 %lang(da) %{_mandir}/da/man1/*
458 %lang(de) %{_mandir}/de/man1/*
459 %lang(es) %{_mandir}/es/man1/*
460 %lang(fi) %{_mandir}/fi/man1/*
461 %lang(fr) %{_mandir}/fr/man1/*
462 %lang(hu) %{_mandir}/hu/man1/*
463 %lang(id) %{_mandir}/id/man1/*
464 %lang(it) %{_mandir}/it/man1/*
465 %lang(ja) %{_mandir}/ja/man1/*
466 %lang(ko) %{_mandir}/ko/man1/*
467 %lang(nl) %{_mandir}/nl/man1/*
468 %lang(pl) %{_mandir}/pl/man1/*
469 %lang(pt) %{_mandir}/pt/man1/*
470 %lang(ru) %{_mandir}/ru/man1/*
471 %lang(zh_CN) %{_mandir}/zh_CN/man1/*
472 %{_infodir}/coreutils.info*