add packaging
[platform/upstream/coreutils.git] / packaging / coreutils.spec
1 Name:           coreutils
2 Summary:        GNU Core Utilities
3 License:        GPL-3.0+
4 Group:          System/Base
5 BuildRequires:  automake
6 BuildRequires:  gmp-devel
7 BuildRequires:  help2man
8 BuildRequires:  libacl-devel
9 BuildRequires:  libcap-devel
10 BuildRequires:  pam-devel
11 BuildRequires:  xz
12 Url:            http://www.gnu.org/software/coreutils/
13 Version:        8.20
14 Release:        0
15 Provides:       fileutils = %{version}
16 Provides:       mktemp = %{version}
17 Provides:       sh-utils = %{version}
18 Provides:       stat = %version}
19 Provides:       textutils = %{version}
20 Obsoletes:      fileutils < %{version}
21 Obsoletes:      mktemp < %{version}
22 Obsoletes:      sh-utils < %{version}
23 Obsoletes:      stat < %version}
24 Obsoletes:      textutils < %{version}
25 Requires:       pam >= 1.1.1.90
26 Source:         coreutils-%{version}.tar.xz
27 Source1:        su.pamd
28 Source2:        su.default
29 Source3:        baselibs.conf
30 Source4:        coreutils-%{version}.de.po.xz
31
32 %description
33 Basic file, shell, and text manipulation utilities.  The package
34 contains the following programs:
35
36 [ arch base64 basename cat chcon chgrp chmod chown chroot cksum comm cp
37 csplit cut date dd df dir dircolors dirname du echo env expand expr
38 factor false fmt fold groups head id install join kill link ln logname
39 ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup od paste pathchk
40 pinky pr printenv printf ptx pwd readlink rm rmdir runcon seq sha1sum
41 sha224sum sha256sum sha384sum sha512sum shred shuf sleep sort split
42 stat stty su sum sync tac tail tee test timeout touch tr true tsort tty
43 uname unexpand uniq unlink uptime users vdir wc who whoami yes
44
45 %lang_package
46
47 %prep
48 %setup -q
49
50 %build
51 AUTOPOINT=true autoreconf -fi
52 export CFLAGS="%optflags -Wall"
53 %configure --libexecdir=%{_libdir} --without-included-regex \
54             --enable-install-program=arch,su \
55             gl_cv_func_printf_directive_n=yes \
56             gl_cv_func_isnanl_works=yes \
57             DEFAULT_POSIX2_VERSION=199209
58
59 make -C po update-po
60 make %{?_smp_mflags} V=1
61
62 %install
63 %makeinstall pkglibexecdir=%{_libdir}/%{name}
64 test -f %{buildroot}%{_bindir}/su || \
65   install src/su %{buildroot}%{_bindir}/su
66 install -d -m 755 %{buildroot}/etc/pam.d
67 install -m 644 %{S:1} %{buildroot}/etc/pam.d/su
68 install -m 644 %{S:1} %{buildroot}/etc/pam.d/su-l
69 install -d -m 755 %{buildroot}/etc/default
70 install -m 644 %{S:2} %{buildroot}/etc/default/su
71 echo '.so man1/test.1' > %{buildroot}/%{_mandir}/man1/\[.1
72
73 %find_lang %name
74
75 %post
76 %install_info --info-dir=%{_infodir} %{_infodir}/coreutils.info.gz
77
78 %postun
79 %install_info_delete --info-dir=%{_infodir} %{_infodir}/coreutils.info.gz
80
81
82 %files
83 %defattr(-,root,root)
84 %doc README NEWS
85 %config %{_sysconfdir}/pam.d/su
86 %config %{_sysconfdir}/pam.d/su-l
87 %config(noreplace) %{_sysconfdir}/default/su
88 %attr(4755,root,root) %{_bindir}/su
89 %{_bindir}/*
90 %{_libdir}/%{name}
91 %doc %{_infodir}/coreutils.info*.gz
92 %doc %{_mandir}/man1/*.1.gz
93 %dir %{_prefix}/share/locale/*/LC_TIME
94
95
96 %changelog