# This should be called "ndiff", but unfortunately ndiff(1) is in the # namp package, so rename this one to "n-diff" %global ndiff ndiff %global ucndiff NDIFF %global ucname N-DIFF Name: n-diff Version: 2.00 Release: 2%{?dist} Summary: Compare two putatively similar files, ignoring small numeric differences Group: Applications/Text License: GPLv2+ and HSRL URL: http://www.math.utah.edu/~beebe/software/%ndiff/index.html Source0: ftp://ftp.math.utah.edu/pub/misc/%ndiff-%version.tar.gz BuildRequires: gmp-devel gcc # Spencer regexp (in licence list, but not packaged?) Provides: bundled(regexp) %description When a numerical program is run in multiple environments (operating systems, architectures, or compilers), assessing its consistency can be a difficult task for a human, since small differences in numerical output values are expected. Application of a file differencing utility, such as POSIX/UNIX diff(1), will generally produce voluminous output, often longer than the original files, and is thus not useful. The lesser-known UNIX spiff(1) utility, while capable of handling numeric fields, suffers from excessively-long running times, and often terminates prematurely. %name provides a solution to this problem. It compares two files that are expected to be identical, or at least, numerically similar. It assumes that lines consist of whitespace-separated fields of numeric and non-numeric data. %prep %setup -q -n %ndiff-%version mv regexp/README regexp/README.regexp # configure eliminates -g and -O2... sed -i '/^CFLAGS="/d' configure %build # configure.in needs re-doing, but this works %configure --with-gmp %make_build %install install -D %ndiff $RPM_BUILD_ROOT%_bindir/%name install -m 644 -D %ndiff.man $RPM_BUILD_ROOT%_mandir/man1/%name.1 sed -i -e 's/%ucndiff/%ucname/g' -e 's/%ndiff /%name /g' -e 's/%ndiff$/%name/g' $RPM_BUILD_ROOT%_mandir/man1/%name.1 %check make check %files %doc ChangeLog regexp/README.regexp %license COPYING %_bindir/* %_mandir/*/* %changelog * Thu Dec 23 2021 Dave Love - 2.00-2 - Modernize spec - Avoid configure removing -g -O2 * Wed Nov 27 2013 Dave Love - 2.00-1 - Initial packaging