Name:           pypar2
Version:        1.3
Release:        3%{?dist}
Summary:        PyPar2 is a graphical frontend for the Linux par2 command line

Group:          Applications/File
License:        GPL
URL:            http://pypar2.silent-blade.org
Source0:        http://pypar2.silent-blade.org/uploads/Main/%{name}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  python-devel
BuildRequires:  desktop-file-utils
BuildRequires:  symlinks
BuildRequires:  gettext
Requires:       par2cmdline
Requires:       vte
Requires:       pygtk2-libglade
Requires:       PyXML


%description
PyPar2 is a graphical frontend 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.

%prep
%setup -q -n PyPar2-%{version}

%build
# Nothing to do

%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} prefix=%{_prefix} INSTALL="install -p -D"
%find_lang %{name}
#link needs to be rebuilt
rm %{buildroot}%{_bindir}/%{name}
ln -s %{buildroot}%{_datadir}/%{name}/src/main.py %{buildroot}%{_bindir}/%{name}
symlinks -cs %{buildroot}%{_bindir}
desktop-file-install --vendor="" \
        --add-category Utilities \
        --remove-category GTK \
        --remove-category Application \
        --dir=%{buildroot}%{_datadir}/applications \
        %{buildroot}%{_datadir}/applications/%{name}.desktop

%clean
rm -rf %{buildroot}

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc doc/whatsnew.txt doc/gpl.txt
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_mandir}/man1/%{name}.1.gz
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/%{name}

%changelog
* Thu Mar 29 2007 Maxime Carron <maxime.carron@fedoraproject.org> - 1.3-3
- remove install.txt and pypar2.1 from the doc section
- fix desktop-file-install options => patch no more needed
* Sat Mar  3 2007 Maxime Carron <maxime.carron@fedoraproject.org> - 1.3-2
- add some Requires
* Sat Mar  3 2007 Maxime Carron <maxime.carron@fedoraproject.org> - 1.3-1
- update to version 1.3
- Source1 is no more needed (GPL text is now included in the archive)
- add gettext in BR (according to abompard's fedora-qa script)
* Thu Mar  1 2007 Maxime Carron <maxime.carron@fedoraproject.org> - 1.2-2
- Symbolic link is now relative (line 44-45) (rpmlint is now quiet)
- add symlinks in BR
* Wed Feb 21 2007 Maxime Carron <maxime.carron@fedoraproject.org> - 1.2-1
- Initial RPM release.