Blob Blame Raw
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

Name:		mirage
Version:	0.9.5.2
Release:	17%{?dist}
Summary:	A fast and simple image viewer

License:	GPLv3+
URL:		http://mirageiv.berlios.de/
Source0:	http://download.berlios.de/mirageiv/%{name}-%{version}.tar.bz2
# Fix bug 559853, backtrace when clicking middle button in some case
# Must be sent to upstream
Patch0:		mirage-0.9.3-prevmouse-not-defined-with-click.patch
# Don't call gtk.gdk.threads_init() on GLib >= 2.41,
# workaround for bug 1123953
Patch1:		mirage-0.9.5.2-glib241-init-workaround.patch

BuildRequires:	gcc
BuildRequires:	gettext
BuildRequires:	libX11-devel
BuildRequires:	python2-devel
BuildRequires:	desktop-file-utils
Requires:	pygtk2
Requires:	gnome-python2-gconf

%description
Mirage is a fast and simple GTK+ image viewer. Because it 
depends only on PyGTK, Mirage is ideal for users who wish to 
keep their computers lean while still having a clean image viewer.

%prep
%setup -q
%patch0 -p1 -b .bt_prevmouse
%patch1 -p1 -b .glib241
# Don't remove rebuilt files!
%{__sed} -i.build -e '/Cleanup/,$d' setup.py

%build
export CFLAGS="$RPM_OPT_FLAGS"
%{__python2} setup.py build

%install
%{__rm} -rf $RPM_BUILD_ROOT

%{__mkdir_p} $RPM_BUILD_ROOT
%{__python2} setup.py install --skip-build --prefix $RPM_BUILD_ROOT%{_prefix}

# remove document files
%{__rm} -f $RPM_BUILD_ROOT%{_datadir}/%{name}/[A-Z]*

# install desktop file
%{__sed} -i -e 's|%{name}.png|%{name}|' \
	$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
desktop-file-install \
	--delete-original \
	--remove-category 'Application' \
	--dir $RPM_BUILD_ROOT%{_datadir}/applications \
%if 0%{?fedora} < 19
	--vendor fedora \
%endif
	$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop

# gettext files
%{find_lang} %{name}

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc CHANGELOG COPYING README TODO TRANSLATORS

%{_bindir}/%{name}
%{python2_sitearch}/%{name}.py*
%{python2_sitearch}/*.egg-info
%{python2_sitearch}/*.so

%{_datadir}/%{name}/
%{_datadir}/pixmaps/*.png

%{_datadir}/applications/*%{name}.desktop

%changelog
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.5.2-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.5.2-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Sun Feb 18 2018 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.9.5.2-16
- Use %%__python2 instead of %%__python

* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.5.2-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.5.2-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.5.2-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.5.2-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5.2-11
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.5.2-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Tue Aug 12 2014 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.9.5.2-7
- Don't call gtk.gdk.threads_init() on GLib >= 2.41,
  workaround for bug 1123953

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sat Feb  9 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.9.5.2-4
- F-19: kill vendorization of desktop file (fpc#247)

* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Thu Mar 10 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.9.5.2-1
- 0.9.5.2

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Fri Jul 30 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.9.5.1-1
- 0.9.5.1

* Fri Jul 23 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp>
- F-14: ... and again rebuild for python 2.7

* Fri Jul 23 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.9.5-1
- 0.9.5

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.4-2
- F-14: Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Fri Jul  2 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.9.4-1
- 0.9.4

* Fri Jan 29 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.9.3-5
- Fix bt when clicking middle button in some case (bug 559853)

* Sat Jul 25 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.9.3-4
- F-12: Mass rebuild

* Tue Feb 24 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.9.3-3
- F-11: Mass rebuild

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.9.3-2
- Rebuild for Python 2.6

* Thu Mar 27 2008 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.9.3-1
- 0.9.3

* Sat Feb  9 2008 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp>
- Rebuild against gcc43 (F-9)

* Wed Jan 30 2008 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.9.2-1
- 0.9.2

* Thu Jan 10 2008 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.9.1-1
- 0.9.1

* Fri Jan  4 2008 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.9-3
- Support python egginfo for F-9+

* Wed Dec  5 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.9-2
- Fix icon path in desktop file for desktop-file-utils 0.14+

* Fri Oct 19 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.9-1
- 0.9

* Wed Aug 22 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.8.3-2.dist.2
- Mass rebuild (buildID or binutils issue)

* Fri Aug  3 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.8.3-2.dist.1
- License update

* Fri Jun 15 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.8.3-2
- Remove Version= entry (on F-8+)

* Fri Jan 19 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.8.3-1
- 0.8.3

* Sat Dec  9 2006 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.8.2-1
- 0.8.2

* Fri Dec  8 2006 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp>
- Rebuild against new python (only for devel)

* Sat Nov 18 2006 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.8.1-1
- Initial packaging to import to Fedora Extras.