File gquilt.spec of Package gquilt

#
# spec file for package gquilt
#
# Copyright (c) 2011 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/
#

%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}

Name:           gquilt
Version:        0.25
Release:        0
License:        GPL-2.0
Summary:        GUI Wrapper for quilt
Url:            http://gquilt.sourceforge.net/
Group:          Development/Tools/Version Control
Source0:        http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE gquilt-0.25-pixmaps.patch lazy.kent@opensuse.org -- install icons into program dir, not into system one
Patch0:         gquilt-0.25-pixmaps.patch
BuildRequires:  fdupes
%if 0%{?suse_version} >= 1210
BuildRequires:  python-distribute
%else
BuildRequires:  python-setuptools
%endif
BuildRequires:  update-desktop-files
Requires:       mercurial
Requires:       python-gtk
Requires:       quilt
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} >= 1120
BuildArch:      noarch
%endif
%py_requires

%description
gquilt is a Python script that provides a GUI for quilt and Mercurial
using the PyGTK package.

%prep
%setup -q
%patch0

%build
python setup.py build

%install
python setup.py install \
    --prefix=%{_prefix} \
    --root=%{buildroot}
%fdupes -s %{buildroot}%{_datadir}
%suse_update_desktop_file -i -r %{name} Development RevisionControl

%files
%defattr(-,root,root,-)
%doc COPYING copyright
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%{_sysconfdir}/%{name}.d
%{python_sitelib}/%{name}_pkg
%{python_sitelib}/%{name}-%{version}-*.egg-info

%changelog
openSUSE Build Service is sponsored by