File dwdiff.spec of Package dwdiff
#
# spec file for package dwdiff
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: dwdiff
Version: 2.1.4
Release: 0
Summary: Diff that operates at the word level
License: GPL-3.0-only
Group: Productivity/Text/Utilities
URL: https://os.ghalkes.nl/dwdiff.html
Source: https://os.ghalkes.nl/dist/dwdiff-%{version}.tar.bz2
BuildRequires: gcc
BuildRequires: glibc-devel
BuildRequires: libicu-devel
BuildRequires: make
BuildRequires: pkgconfig
%description
dwdiff is a diff program that operates at the word level instead of the line
level. It is different from wdiff in that it allows the user to specify what
should be considered whitespace, and in that it takes an optional list of
characters that should be considered delimiters. Delimiters are single
characters that are treated as if they are words, even when there is no
whitespace separating them from preceding words or delimiters. dwdiff is mostly
commandline compatible with wdiff. Only the --autopager, --terminal and
--avoid-wraps options are not supported.
%prep
%setup -q
%build
export CFLAGS="%{optflags}"
# dear spec file cleaner: this is _not_ the autotools configure!
./configure --prefix="%{_prefix}" --mandir="%{_mandir}"
%make_build
%install
%make_install
rm -rf "%{buildroot}%{_datadir}/doc"
rm -rf "%{buildroot}%{_mandir}/nl"
mv "%{buildroot}%{_mandir}/nl.UTF-8" "%{buildroot}%{_mandir}/nl"
%find_lang "%{name}" --with-man --all-name
%files -f "%{name}.lang"
%license COPYING
%doc Changelog README
%{_bindir}/dwdiff
%{_bindir}/dwfilter
%{_mandir}/man1/dwdiff.1%{?ext_man}*
%{_mandir}/man1/dwfilter.1%{?ext_man}*
%changelog