File hgview.spec of Package hgview

#
# spec file for package hgview
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Guido Berhoerster.
#
# 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/
#


Name:           hgview
Version:        1.7.1
Release:        0
Summary:        Visual Log Navigator for Mercurial
License:        GPL-2.0+
Group:          Development/Tools/Version Control
Url:            http://www.logilab.org/project/hgview
Source:         http://download.logilab.org/pub/hgview/%{name}-%{version}.tar.gz
BuildRequires:  asciidoc
BuildRequires:  mercurial
BuildRequires:  python-devel
BuildRequires:  python-qt4
BuildRequires:  python-qt4-utils
BuildRequires:  python-setuptools
BuildRequires:  xmlto
%{py_requires}
Requires:       mercurial
Requires:       python-pygments
Requires:       python-pyinotify
# Qt4 default interface
Recommends:     hgview-qt4
# for the optional curses interface in the main package
Recommends:     python-urwid
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
hgview is a simple tool aiming at visually navigate in a Mercurial repository
history.  It is written in Python with quick and efficient key-based navigation
in mind, trying to be fast enough to be usable for big repositories.

%package qt4
Summary:        Qt4 User Interface for hgview
Group:          Development/Tools/Version Control
Requires:       hgview = %{version}
Requires:       python-docutils
Requires:       python-qscintilla
Requires:       python-qt4

%description qt4
This package provides the Qt4 user interface for hgview.

%prep
%setup -q

%build
%{__python} setup.py build

%install
%{__python} setup.py install \
    --prefix=%{_prefix} \
    --root=%{buildroot}
mkdir %{buildroot}%{_datadir}
mv %{buildroot}%{_prefix}/man %{buildroot}%{_datadir}/
chmod 644 %{buildroot}%{_mandir}/man1/hgview.1*

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc COPYING ChangeLog README
%{python_sitelib}/%{name}-*.egg-info
%{python_sitelib}/hgext
%dir %{python_sitelib}/hgviewlib/
%{python_sitelib}/hgviewlib/*.py*
%{python_sitelib}/hgviewlib/hgpatches
%{python_sitelib}/hgviewlib/curses/
%{_bindir}/hgview
%{_mandir}/man1/hgview.1*

%files qt4
%defattr(-,root,root,-)
%{python_sitelib}/hgviewlib/qt4/

%changelog
openSUSE Build Service is sponsored by