File wdiff.spec of Package wdiff

#
# spec file for package wdiff (Version 0.5.93)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#

# norootforbuild


Name:           wdiff
BuildRequires:  ncurses-devel
Url:            http://www.gnu.org/software/wdiff/
License:        GPLv2+
Group:          Productivity/Text/Utilities
AutoReqProv:    on
Version:        0.5.93
Release:        1
Summary:        Display Word Differences Between Text Files
Source:         http://alpha.gnu.org/gnu/wdiff/wdiff-%{version}.tar.bz2
Patch:          wdiff-%{version}-lermen.patch
Patch2:         wdiff-%{version}-diff.patch
Patch3:         happy-gcc.patch
Patch4:         linenumber_ansi.patch
# upstreamed
# Patch1:         wdiff-%{pversion}-tempfile.patch
# obsoleted by autoconf
# Patch3:         wdiff-%{pversion}-nb.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         %install_info_prereq

%description
wdiff compares two files and finds which words have been deleted or
added to old_file to get new_file. A word is considered to be anything
between whitespace.

Xwdiff is a handy X Window System front-end, based on Tcl/Tk.



Authors:
--------
    Francois Pinard  <pinard@iro.umontreal.ca>
    Hans Lermen  <lermen@fgan.de>

%prep
%setup -q
%patch -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

%build
# those autoconf tools never really work, do they?
# error: AC_REQUIRE: circular dependency of AC_GNU_SOURCE
# autoreconf -fi
LIBS=-lncurses \
CFLAGS="$RPM_OPT_FLAGS -pipe -DPROTOTYPES -DLERMEN_STUFF" \
GETOPT="" \
%configure 
make

%install
make "DESTDIR=$RPM_BUILD_ROOT" install
install -m 755 src/xwdiff $RPM_BUILD_ROOT/usr/bin
rm -rf $RPM_BUILD_ROOT/usr/share/locale/no
%find_lang %{name}

%files -f %{name}.lang
%defattr(-,root,root)
%doc BACKLOG ChangeLog NEWS README* THANKS TODO ABOUT-NLS AUTHORS COPYING 
%{_infodir}/wdiff.info*
/usr/bin/*
%{_mandir}/man1/*

%clean
rm -rf  %{buildroot}

%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%changelog
openSUSE Build Service is sponsored by