seq is added to tizen-coreutils package.
[external/tizen-coreutils.git] / packaging / tizen-coreutils.spec
1 %define _unpackaged_files_terminate_build 0
2
3 Summary:        The GNU core utilities: a set of tools commonly used in shell scripts
4
5 Name:           tizen-coreutils
6 Version:        6.9
7 Release:        9
8 License:        GPLv2+
9 Group:          System Environment/Base
10 Url:            http://www.gnu.org/software/coreutils/
11 Source0:        ftp://ftp.gnu.org/gnu/%{name}/coreutils-%{version}.tar.bz2
12 Source1:        mktemp-1.5.tar.gz
13 Patch1:         coreutils-futimens.patch
14
15 Patch1001:      mktemp-1.5-build.patch
16 BuildRequires:  autoconf >= 2.58
17 BuildRequires:  automake >= 1.10
18 BuildRequires:  gettext findutils
19
20 Provides:       fileutils sh-utils stat textutils mktemp
21
22 %description
23 These are the GNU core utilities.  This package is the combination of
24 the old GNU fileutils, sh-utils, and textutils packages.
25
26 %prep
27 %setup -q -b 1 -n coreutils-%{version}
28 %patch1 -p1 -b .futimens
29
30 %build
31 pushd ../mktemp-1.5
32 patch -p1 < %{PATCH1001}
33 %configure
34 make
35 popd
36
37 %configure
38 make
39
40 %install
41
42 pushd ../mktemp-1.5
43 make bindir=%{buildroot}/bin mandir=%{buildroot}%{_mandir} install
44 popd
45
46 %make_install
47
48 # man pages are not installed with make install
49 make mandir=%{buildroot}%{_mandir} install-man
50
51 # let be compatible with old fileutils, sh-utils and textutils packages :
52 mkdir -p %{buildroot}{/bin,%{_bindir},%{_sbindir},/sbin}
53 for f in cat chgrp chmod chown cp date dd df echo link ln ls mkdir mknod mv pwd rm rmdir sleep sync touch true uname unlink
54 do
55     mv %{buildroot}{%{_bindir},/bin}/$f
56 done
57
58 # chroot was in /usr/sbin :
59 mv %{buildroot}{%{_bindir},%{_sbindir}}/chroot
60
61 # These come from util-linux and/or procps.
62 for i in hostname uptime kill ; do
63     rm %{buildroot}{%{_bindir}/$i,%{_mandir}/man1/$i.1}
64 done
65
66 # Use hard links instead of symbolic links for LC_TIME files (bug #246729).
67 find %{buildroot}%{_datadir}/locale -type l | \
68 (while read link
69  do
70    target=$(readlink "$link")
71    rm -f "$link"
72    ln "$(dirname "$link")/$target" "$link"
73  done)
74  
75 %clean
76 rm -rf $RPM_BUILD_ROOT
77
78 %docs_package
79
80 %files
81 %doc COPYING
82 /bin/cat
83 /bin/chgrp
84 /bin/chmod
85 /bin/chown
86 /bin/cp
87 /bin/date
88 /bin/dd
89 /bin/df
90 /bin/echo
91 /bin/ln
92 /bin/ls
93 /bin/mkdir
94 /bin/mknod
95 /bin/mktemp
96 /bin/mv
97 /bin/pwd
98 /bin/rm
99 /bin/rmdir
100 /bin/sleep
101 /bin/sync
102 /bin/touch
103 /bin/true
104 /bin/uname
105 %{_bindir}/basename
106 %{_bindir}/cksum
107 %{_bindir}/cut
108 %{_bindir}/dirname
109 %{_bindir}/du
110 %{_bindir}/env
111 %{_bindir}/expr
112 %{_bindir}/head
113 %{_bindir}/id
114 %{_bindir}/install
115 %{_bindir}/md5sum
116 %{_bindir}/nice
117 %{_bindir}/od
118 %{_bindir}/printenv
119 %{_bindir}/seq
120 %{_bindir}/sort
121 %{_bindir}/stat
122 %{_bindir}/tac
123 %{_bindir}/tail
124 %{_bindir}/tee
125 %{_bindir}/test
126 %{_bindir}/tr
127 %{_bindir}/wc
128 %{_bindir}/who
129 %{_bindir}/whoami
130 %{_sbindir}/chroot