File pypar2.spec of Package pypar2
#
# spec file for package pypar2
#
# Copyright (c) 2013 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/
#
Name: pypar2
Version: 1.4
Release: 0
License: GPL-2.0+
Summary: Graphical Front-end for par2cmdline
Url: http://pypar2.silent-blade.org
Group: Productivity/File utilities
Source0: http://pypar2.silent-blade.org/uploads/Main/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM pypar2-1.4-desktop.patch lazy.kent@opensuse.org -- correct desktop file
Patch0: pypar2-1.4-desktop.patch
Patch1: pypar2-1.4-xmldomext.patch
# PATCH-FIX-UPSTREAM pypar2-1.4-typeorder.patch stefanor@debian.org lp#719708 deb#617966 -- use a list of tuples instead of depending on dict iteration order
Patch2: pypar2-1.4-typeorder.patch
BuildRequires: fdupes
BuildRequires: python-base
BuildRequires: update-desktop-files
Requires: par2cmdline
Requires: python-gtk
Requires: python-vte
Recommends: %{name}-lang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
PyPar2 is a graphical front-end for the Linux par2 command line, written
in Python and GTK.
It's able to restore files using PAR2 files, and also create PAR2 files.
%lang_package
%prep
%setup -qn PyPar2-%{version}
%patch0
%patch1
%patch2 -p1
%build
%install
%make_install prefix=%{_prefix}
rm %{buildroot}%{_bindir}/%{name}
ln -s ../share/pypar2/src/main.py %{buildroot}%{_bindir}/%{name}
%fdupes -s %{buildroot}%{_datadir}/
pushd %{buildroot}%{_datadir}/%{name}/src/
%py_compile .
popd
%find_lang %{name}
%suse_update_desktop_file %{name}
%files
%defattr(-,root,root,-)
%doc doc/{gpl.txt,whatsnew.txt}
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%doc %{_mandir}/man?/*
%files lang -f %{name}.lang
%changelog