# To create svn tarball use: # svn co https://comix.svn.sourceforge.net/svnroot/comix/trunk # mv trunk comix-%%mainver # tar czf comix-%%mainver-%%alphatag.tar.gz comix-%%mainver %define mainver 4.0.4 %undefine alphatag %define comix4 1 %define fedorarel 9 Name: comix Version: %{mainver} Release: %{?ifalpha:0.}%{fedorarel}%{?ifalpha:.%alphatag}%{?dist}.3 Summary: A user-friendly, customizable image viewer Group: Amusements/Graphics URL: http://comix.sourceforge.net/ License: GPLv2+ %if 0%{?ifalpha} Source0: %{name}-%{mainver}-%{alphatag}.tar.gz %else Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz %endif # The directory of the archive being currently opened may not exist # bug 542752, 555534 Patch1: comix-4.0.4-archive-directory-removed.patch # Handle some error cases in comicthumb # bug 568167, 572434 Patch2: comix-4.0.4-thumb-imaging_error.patch # Fix handling of exec path for finding gettext catalog file # wrt usrmove Patch3: comix-4.0.4-gettext-usrmove.patch # Prevent crash when non-utf8 path name is given to thumbnail file # (bug 877604) Patch4: comix-4.0.4-pathname2url-utf8.patch # Don't import Image directory and import PIL instead for # F-19 Pillow conversion # (bug 895175) Patch5: comix-4.0.4-import-PIL-for-Image.patch # Pillow F-23 3.0.0 API change that tostring is removed # (bug 1290632) Patch6: comix-4.0.4-tobytes.patch BuildArch: noarch BuildRequires: gettext BuildRequires: pygtk2 BuildRequires: python-imaging BuildRequires: desktop-file-utils BuildRequires: %{_bindir}/jpegtran # The following BR is really needed for gconf2 macros BuildRequires: GConf2 Requires: pygtk2 Requires: python-imaging Requires: %{_bindir}/jpegtran Requires(pre): GConf2 Requires(preun): GConf2 Requires(post): GConf2 %description Comix is a user-friendly, customizable image viewer. It is specifically designed to handle comic books, but also serves as a generic viewer. It reads images in ZIP, RAR or tar archives (also gzip or bzip2 compressed) as well as plain image files. It is written in Python and uses GTK+ through the PyGTK bindings. %prep %setup -q -n %{name}-%{version}%{?ifalpha:-%alphatag} %patch1 -p1 -b .missing %patch2 -p1 -b .debug1 %patch3 -p1 -b .usrmove %patch4 -p1 -b .p2url %patch5 -p1 -b .pil %patch6 -p1 -b .tobytes %{__mkdir_p} TMPBIN cd TMPBIN %{__ln_s} -f /bin/true update-mime-database %{__ln_s} -f /bin/true gconftool-2 cd .. %build %{__sed} -i -e 's|shutil.copy|shutil.copy2|' install.py %{__sed} -e 's|\r||g' COPYING > COPYING.tmp && \ ( touch -r COPYING COPYING.tmp ; %{__mv} -f COPYING.tmp COPYING ) %{__rm} -f COPYING.tmp # embed Fedora EVR %{__sed} -i -e "/^VERSION/s|^\(.*\)$|\1\nVERSION_fedora = '%{version}-%{release}'|" \ src/constants.py %{__sed} -i -e "s|constants\.VERSION|constants.VERSION_fedora|" \ src/about.py for dir in messages/*/LC*/ do msgfmt --statistics -o $dir/comix.mo $dir/comix.po done %install %{__rm} -rf $RPM_BUILD_ROOT %{__mkdir_p} $RPM_BUILD_ROOT%{_prefix} export PATH=$(pwd)/TMPBIN:${PATH} %{__python} install.py \ --dir \ $RPM_BUILD_ROOT%{_prefix} \ install desktop-file-install \ %if 0%{?fedora} < 19 --vendor fedora \ %endif --delete-original \ --remove-category Application \ --dir $RPM_BUILD_ROOT%{_datadir}/applications/ \ $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop %{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/mime/ %{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/mime/packages %{__install} -c -p -m644 mime/comix.xml \ $RPM_BUILD_ROOT%{_datadir}/mime/packages/%{name}.xml %{__mkdir_p} $RPM_BUILD_ROOT%{_sysconfdir}/gconf/schemas %{__install} -c -p -m644 mime/comicbook.schemas \ $RPM_BUILD_ROOT%{_sysconfdir}/gconf/schemas/%{name}.schemas %find_lang %{name} %clean %{__rm} -rf $RPM_BUILD_ROOT %pre %gconf_schema_prepare %{name} %post %gconf_schema_upgrade %{name} /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : /bin/touch --no-create %{_datadir}/mime/packages &>/dev/null || : /usr/bin/update-desktop-database &> /dev/null || : %preun %gconf_schema_remove %{name} %postun /usr/bin/update-desktop-database &> /dev/null || : if [ $1 -eq 0 ] ; then /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : /usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || : fi %posttrans /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : /usr/bin/update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %files -f %{name}.lang %defattr(-,root,root,-) %doc COPYING ChangeLog README %{_sysconfdir}/gconf/schemas/%{name}.schemas %{_bindir}/* %{_datadir}/applications/*%{name}.desktop %{_datadir}/mime/packages/%{name}.xml %{_mandir}/man1/* %{_datadir}/icons/hicolor/*/apps/%{name}* %{_datadir}/icons/hicolor/*/mimetypes/application-x-*.png %dir %{_datadir}/%{name}/ %{_datadir}/%{name}/images/ %{_datadir}/%{name}/src/ %changelog * Wed Jul 26 2017 Fedora Release Engineering - 4.0.4-9.3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Fri Feb 10 2017 Fedora Release Engineering - 4.0.4-9.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Wed Feb 03 2016 Fedora Release Engineering - 4.0.4-9.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Fri Dec 11 2015 Mamoru TASAKA - 4.0.4-9 - Follow Pillow F-23 3.0.0 API change that tostring is removed (bug 1290632) * Wed Jun 17 2015 Fedora Release Engineering - 4.0.4-8.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Tue Sep 09 2014 Rex Dieter 4.0.4-8 - update scriptlets (icon/mime mostly) * Sat Jun 07 2014 Fedora Release Engineering - 4.0.4-7.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sat Aug 03 2013 Fedora Release Engineering - 4.0.4-7.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Sat Feb 9 2013 Mamoru TASAKA - 4.0.4-7 - F-19: kill vendorization of desktop file (fpc#247) * Tue Jan 15 2013 Mamoru TASAKA - 4.0.4-6 - Don't import Image directly and import PIL instead for F-19 Pillow conversion Patch from Toshio Kuratomi (bug 895175) * Tue Dec 4 2012 Mamoru TASAKA - 4.0.4-5 - Prevent crash when non-utf8 path name is given to thumbnail file (bug 877604) * Wed Jul 18 2012 Fedora Release Engineering - 4.0.4-4.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Fri Jun 29 2012 Mamoru Tasaka - 4.0.4-4 - Fix handling of exec path for detecting gettext catalog wrt usrmove * Thu Jan 12 2012 Fedora Release Engineering - 4.0.4-3.3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Tue Feb 08 2011 Fedora Release Engineering - 4.0.4-3.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Fri Jul 23 2010 Mamoru Tasaka - F-14: rebuild for python 2.7 * Thu Mar 18 2010 Mamoru Tasaka - 4.0.4-3 - Handle the error when the media where opened archive existed is removed (bug 542752, 555534) - Handle some error cases in comicthumb (bug 568167, 572434) - Remove macros no longer used, spec file cleanup - GConf2 scriptlets update * Sat Jul 25 2009 Mamoru Tasaka - 4.0.4-2 - F-12: Mass rebuild * Wed Apr 8 2009 Mamoru Tasaka - 4.0.4-1 - 4.0.4, remove upsteamed patch - Embed Fedora EVR to src/about.py * Sat Feb 28 2009 Mamoru Tasaka - 4.0.3-3 - Use upstreamed patch for filechooser issue * Tue Feb 24 2009 Mamoru Tasaka - 4.0.3-2 - F-11: Mass rebuild * Mon Feb 23 2009 Mamoru Tasaka - 4.0.3-1 - 4.0.3 - Modify icon cache updating scriptlets to follow latest guidelines - Patch for filechooser.py to prevent file choice failure * Tue Jan 27 2009 Mamoru Tasaka - 4.0.3-0.1.rc1 - 4.0.3 rc1 * Sun Jan 4 2009 Mamoru Tasaka - 4.0.2-1 - 4.0.2 * Mon Dec 15 2008 Mamoru Tasaka - 4.0.1-1 - 4.0.1 * Sat Dec 13 2008 Mamoru Tasaka - 4.0.1-0.1.rc1 - 4.0.1 rc1 - "flip with wheel" feature merged into upstream * Fri Dec 5 2008 Mamoru Tasaka - 4.0.0-2 - Add "flip with wheel" function * Thu Dec 4 2008 Mamoru Tasaka - 4.0.0-1 - 4.0.0 * Mon Dec 1 2008 Mamoru Tasaka - 4.0-0.2.rc1 - 4.0.0 rc1 - Update ja.po * Fri Oct 3 2008 Mamoru Tasaka - 4.0-0.1.svn199_trunk - 4.0 branch, rev 199 * Thu Jul 10 2008 Mamoru Tasaka - 3.6.5-1 - 3.6.5 (2 patches applied upstream) * Thu Apr 3 2008 Mamoru Tasaka - 3.6.4-6 - Second patch for bug 430635 Use tempfile.mkdtemp() for multiple user race condition (tagged as CVE-2008-1796) * Wed Apr 2 2008 Mamoru Tasaka - 3.6.4-4 - First patch for bug 430635 Replace os.popen() with subprocess.Popen() to handle hostile filename properly (CVE-2008-1568) * Wed Dec 5 2007 Mamoru Tasaka - 3.6.4-3 - Fix icon path in desktop file for desktop-file-utils 0.14+ * Mon Aug 20 2007 Mamoru Tasaka - 3.6.4-2 - Now %%_sysconfdir/gconf{,/schemas} are owned by GConf2 (#233756) * Fri Aug 3 2007 Mamoru Tasaka - 3.6.4-1.dist.1 - License update * Mon May 28 2007 Mamoru Tasaka - 3.6.4-1 - 3.6.4 * Sat Mar 17 2007 Mamoru Tasaka - 3.6.3-1 - 3.6.3 * Wed Jan 31 2007 Mamoru Tasaka - 3.6.2-2 - Surely remove ja.po, upstream included it. * Wed Jan 31 2007 Mamoru Tasaka - 3.6.2-1 - 3.6.2 * Wed Jan 31 2007 Mamoru Tasaka - 3.6.1-2 - Add Japanese translation * Thu Oct 19 2006 Mamoru Tasaka - 3.6.1-1 - 3.6.1 * Fri Oct 06 2006 Mamoru Tasaka - 3.6-2 - Specify URL. * Fri Oct 06 2006 Mamoru Tasaka - 3.6-1 - Initial packaging, importing to Fedora extras.