File xxdiff.spec of Package xxdiff
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: xxdiff
Version: 4.0+hg445
Release: 0
License: GPL-2.0+
Summary: A graphical front end to the diff command
Url: https://bitbucket.org/blais/xxdiff
Group: Development/Tools/Other
Source: xxdiff-%{version}.tar.xz
BuildRequires: bison,
BuildRequires: flex,
BuildRequires: python,
BuildRequires: python-devel
BuildRequires: libqt4-devel,
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%py_requires
%description
xxdiff is a graphical browser for viewing the differences between two
files and can be used to produce a merged version. The text of the
two or three files are presented side by side with their differences
highlighted for easy identification.
%package tools
Summary: Tools for xxdiff
Url: http://furius.ca/xxdiff/doc/xxdiff-scripts.html
Group: Development/Tools/Other
%description tools
Helper scripts built around xxdiff to ease various tasks. See http://furius.ca/xxdiff/doc/xxdiff-scripts.html
for more details.
%prep
%setup -q
# directly call python
sed -i -e '1s,/env ,/,' bin/svn-foreign
# not needed. the sed call above converted the symlink to file
# already
rm lib/python/xxdiff/scripts/svnforeign.py
%build
pushd src
QMAKE=/usr/bin/qmake make -f Makefile.bootstrap
make %{?_smp_mflags} CFLAGS="%{optflags}" CXXFLAGS="%{optflags}"
popd
bin/xxdiff --help-html > xxdiff-doc.html
# tools
CFLAGS="%{optflags}" python setup.py build
%install
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_mandir}/man1
install -c -m 755 bin/xxdiff %{buildroot}%{_bindir}/
install -c -m 644 src/xxdiff.1 %{buildroot}%{_mandir}/man1/xxdiff.1
# tools
python setup.py install --prefix=%{_prefix} --root=%{buildroot} --record-rpm=INSTALLED_FILES
%clean
rm -rf %{buildroot}
%files
%defattr(-,root, root)
%doc README
%doc CHANGES
%doc xxdiff-doc.html
%{_bindir}/xxdiff
%{_mandir}/man1/xxdiff.1*
%files tools -f INSTALLED_FILES
%defattr(-,root, root)
%changelog