Name:		moonshiner
Version:	1.1
Release:	2.svn20120315%{?_dist_release}
Summary:	graphical frontend for Ghostscript's PostScript-to-PDF converter
Summary(ja):	Ghostscript を使い Postscript から PDF へ変換するためのグラフィカルフロントエンド

Group:		Applications/Publishing
License:	GPLv3+
URL:		http://moonshiner.sourceforge.net/
Source0:	%{name}-%{version}svn.tar.gz
Source1:	%{name}.desktop
BuildRoot:	%{_tmppath}/%{name}-%{version}-root
BuildArch:	noarch

Requires:	python >= 2.5
Requires:	pygtk2 >= 2.10
Requires:	ghostscript >= 8.60

BuildRequires: gettext
BuildRequires: desktop-file-utils
BuildRequires: python-devel

%description
Moonshiner is a graphical frontend (GUI) for Ghostscript's
PostScript-to-PDF converter.

%description -l ja
Moonshiner は Ghostscript を使い Postscript から PDF へ変換するための
グラフィカルフロントエンドです。

%prep
%setup -qn %{name}-%{version}svn

%build
python setup.py build

%install
rm -rf %{buildroot}
python setup.py install --skip-build --root %{buildroot}

desktop-file-install \
	--dir $RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE1}

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
update-desktop-database %{_datadir}/applications

%postun
touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
update-desktop-database %{_datadir}/applications

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc LICENSE CHANGES README PKG-INFO
%doc %{_docdir}/%{name}/*
%{_bindir}/%{name}
%{python_sitelib}/*
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/

%changelog
* Mon Jan 13 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.1-2.svn20120315
- rebuilt with current toolchain

* Tue Jul 03 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.1-1.svn20120315
- new usprtream snapshot
- added BuildRequires: gettext
- used %%{python_sitelib} in %%files

* Thu Feb 02 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.0-5
- added BuildRequires: python-devel

* Fri Feb 5 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.0-4
- rebuilt with python-2.6.4
- run gtk-update-icon-cache in %post, postun
- fixed icon path in source1

* Sat Nov 28 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.0-3
- fixed html helpfile include again
- probed install process
  - dropt Patch1

* Sat Aug 1 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.0-2
- fixed html helpfile include
- added Patch1 (don't require root for build)

* Thu Jun 25 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.0-1
- initial build for VineSeed
