| 1 | Summary: A GNU collection of diff utilities | 
|---|
| 2 | Name: diffutils | 
|---|
| 3 | Version: 3.2 | 
|---|
| 4 | Release: 2%{?dist} | 
|---|
| 5 | Group: Applications/Text | 
|---|
| 6 | URL: http://www.gnu.org/software/diffutils/diffutils.html | 
|---|
| 7 | Source: ftp://ftp.gnu.org/gnu/diffutils/diffutils-%{version}.tar.xz | 
|---|
| 8 |  | 
|---|
| 9 | Source1: cmp.1 | 
|---|
| 10 | Source2: diff.1 | 
|---|
| 11 | Source3: diff3.1 | 
|---|
| 12 | Source4: sdiff.1 | 
|---|
| 13 | Patch0: diffutils-os2.patch | 
|---|
| 14 | Patch1: diffutils-cmp-s-empty.patch | 
|---|
| 15 |  | 
|---|
| 16 | License: GPLv2+ | 
|---|
| 17 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | 
|---|
| 18 |  | 
|---|
| 19 | %description | 
|---|
| 20 | Diffutils includes four utilities: diff, cmp, diff3 and sdiff. Diff | 
|---|
| 21 | compares two files and shows the differences, line by line.  The cmp | 
|---|
| 22 | command shows the offset and line numbers where two files differ, or | 
|---|
| 23 | cmp can show the characters that differ between the two files.  The | 
|---|
| 24 | diff3 command shows the differences between three files.  Diff3 can be | 
|---|
| 25 | used when two people have made independent changes to a common | 
|---|
| 26 | original; diff3 can produce a merged file that contains both sets of | 
|---|
| 27 | changes and warnings about conflicts.  The sdiff command can be used | 
|---|
| 28 | to merge two files interactively. | 
|---|
| 29 |  | 
|---|
| 30 | Install diffutils if you need to compare text files. | 
|---|
| 31 |  | 
|---|
| 32 | %prep | 
|---|
| 33 | %setup -q | 
|---|
| 34 | %patch0 -p1 -b .os2~ | 
|---|
| 35 | %patch1 -p1 -b .cmp-s | 
|---|
| 36 |  | 
|---|
| 37 | %build | 
|---|
| 38 | export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe" | 
|---|
| 39 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" | 
|---|
| 40 | export LIBS="-lurpo -lmmap" | 
|---|
| 41 | %configure \ | 
|---|
| 42 | "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache" | 
|---|
| 43 | make PR_PROGRAM=%{_bindir}/pr %{?_smp_mflags} | 
|---|
| 44 |  | 
|---|
| 45 | %install | 
|---|
| 46 | rm -rf $RPM_BUILD_ROOT | 
|---|
| 47 | make DESTDIR=$RPM_BUILD_ROOT install | 
|---|
| 48 |  | 
|---|
| 49 | ( cd $RPM_BUILD_ROOT | 
|---|
| 50 | gzip -9nf .%{_infodir}/diff* | 
|---|
| 51 | mkdir -p .%{_mandir}/man1 | 
|---|
| 52 | for manpage in %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} | 
|---|
| 53 | do | 
|---|
| 54 | install -m 0644 ${manpage} .%{_mandir}/man1 | 
|---|
| 55 | done | 
|---|
| 56 | ) | 
|---|
| 57 |  | 
|---|
| 58 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir | 
|---|
| 59 | rm -f $RPM_BUILD_ROOT/%{_libdir}/charset.alias | 
|---|
| 60 |  | 
|---|
| 61 | #%find_lang %{name} | 
|---|
| 62 |  | 
|---|
| 63 | %clean | 
|---|
| 64 | rm -rf $RPM_BUILD_ROOT | 
|---|
| 65 |  | 
|---|
| 66 | %files | 
|---|
| 67 | # -f %{name}.lang | 
|---|
| 68 | %defattr(-,root,root) | 
|---|
| 69 | %doc NEWS README | 
|---|
| 70 | %{_bindir}/* | 
|---|
| 71 | %{_mandir}/*/* | 
|---|
| 72 | %{_infodir}/diffutils.info*gz | 
|---|
| 73 | %{_datadir}/locale/* | 
|---|
| 74 |  | 
|---|
| 75 | %changelog | 
|---|
| 76 | * Mon Jan 09 2012 yd | 
|---|
| 77 | - do not build with -Zbin-files flag. | 
|---|
| 78 |  | 
|---|
| 79 | * Sun Jan 08 2012 yd | 
|---|
| 80 | - initial unixroot build. | 
|---|