%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %define debug_package %{nil} %define doc_license %{nil} %define doc_license 1 %if 0%{?rhel}%{?fedora} %if 0%{?rhel} %if 0%{?rhel} < 7 %define doc_license 0 %endif %else %if 0%{?fedora} < 19 %define doc_license 0 %endif %endif %endif %define license_files COPYING %undefine update_mime_database_n %if 0%{?fedora}%{?rhel} %define update_mime_database_n 1 %endif Name: phatch Version: 0.2.7 Release: 29%{?dist} Summary: Photo batch processor Group: Applications/Multimedia License: GPLv3+ URL: http://photobatch.stani.be/ Source0: http://photobatch.stani.be/download/package/%{name}-%{version}.1.tar.gz BuildArch: noarch BuildRequires: gettext BuildRequires: python BuildRequires: desktop-file-utils BuildRequires: python-setuptools Requires: hicolor-icon-theme Requires: xdg-utils Requires: wxPython Requires: %{name}-cli = %{version}-%{release} Patch1: crash_fix.patch Patch2: pyexiv2_compat.patch # https://bugzilla.redhat.com/show_bug.cgi?id=895778 Patch3: phatch-pillow.patch Patch4: phatch-gtk3-compatibility.patch Patch5: phatch-wxpy3.0-compat.patch Patch6: phatch-0.2.7-fromstring-tostring-deprecated.patch %description Phatch is a simple to use cross-platform GUI Photo Batch Processor which handles all popular image formats and can duplicate (sub)folder hierarchies. Phatch can batch re-size, rotate, apply perspective, shadows, rounded corners, ... and more in minutes instead of hours or days if you do it manually. Phatch allows you to use EXIF and IPTC tags for renaming and data stamping. Phatch also supports a console version to batch photos on web-servers. %package cli Summary: Command line interface for phatch Group: Applications/Multimedia Requires: python-imaging Requires: pygobject3-base Requires: pyexiv2 Requires: /usr/bin/tiffcp Requires: /usr/bin/tiffinfo Requires: gnu-free-sans-fonts Requires: mlocate Requires: dcraw Requires: ImageMagick Requires: /usr/bin/jpegtran Requires: fbida Requires: xcftools %package -n nautilus-%{name} Summary: Nautilus extension for %{name} Group: Applications/Multimedia Requires: %{name} = %{version}-%{release} Requires: nautilus-python %description cli Command line interface for phatch %description -n nautilus-%{name} Nautilus extension for %{name} %prep %setup -q rm -f "docs/build/html/.buildinfo" # let %%doc manage documentation sed -i -e 's/\+ doc_files//' "setup.py" # Change search path for documentation sed -i -e "s@help_path =.*@help_path=\'%{_docdir}/%{name}\'@" "%{name}/pyWx/gui.py" %patch1 -p1 -b .orig %patch2 -p1 -b .orig %patch3 -p1 -b .orig %patch4 -p0 -b .orig %patch5 -p1 -b .orig %patch6 -p1 -b .orig %build %{__python} setup.py build %install %{__python} setup.py install --skip-build --root "${RPM_BUILD_ROOT}" desktop-file-install --vendor="" \ --dir="${RPM_BUILD_ROOT}%{_datadir}/applications/" \ "${RPM_BUILD_ROOT}/%{_datadir}/applications/%{name}.desktop" desktop-file-install --vendor="" \ --dir="${RPM_BUILD_ROOT}%{_datadir}/applications/" \ "${RPM_BUILD_ROOT}/%{_datadir}/applications/%{name}-inspector.desktop" %find_lang "%{name}" # for non-executable-script chmod +x "${RPM_BUILD_ROOT}/%{python_sitelib}/%{name}"/{"%{name}.py","lib/pyWx/dialogsInspector.py","lib/metadataTest.py","other/surd.py","other/EXIF.py","other/pep8.py"} # Register as an application to be visible in the software center # # NOTE: It would be *awesome* if this file was maintained by the upstream # project, translated and installed into the right place during `make install`. # # See http://www.freedesktop.org/software/appstream/docs/ for more details. # mkdir -p "${RPM_BUILD_ROOT}%{_datadir}/appdata" cat > "${RPM_BUILD_ROOT}%{_datadir}/appdata/%{name}.appdata.xml" < phatch.desktop CC0-1.0 Process many images in one step

Phatch (PHoto bATCH Processor) is an application to batch process images. With phatch, you specify a group of images that you want to process, and then specify the effects you want to apply; once you click apply the process is run automatically without having to edit each image individually. Phatch has many effects you can apply to your images, including resizing, rotating, renaming, colour effects (like desaturation and color warmth), drop shadows and adding a background.

http://photobatch.stani.be/ http://photobatch.wdfiles.com/local--files/start/Screenshot-Phatch3d.jpg
EOF %post touch --no-create "%{_datadir}/icons/hicolor" &>/dev/null touch --no-create "%{_datadir}/mime/packages" &> /dev/null || : update-desktop-database &> /dev/null || : %postun if [[ "${1}" -eq "0" ]]; then touch --no-create "%{_datadir}/icons/hicolor" &>/dev/null gtk-update-icon-cache "%{_datadir}/icons/hicolor" &>/dev/null || : touch --no-create "%{_datadir}/mime/packages" &> /dev/null || : update-mime-database %{?update_mime_database_n:-n} "%{_datadir}/mime" &> /dev/null || : fi update-desktop-database &> /dev/null || : %posttrans gtk-update-icon-cache "%{_datadir}/icons/hicolor" &>/dev/null || : update-mime-database %{?update_mime_database_n:-n} "%{_datadir}/mime" &> /dev/null || : %files %if 0%{?doc_license} %license %{license_files} %else %doc %{license_files} %endif %doc docs/build/html/* %{_datadir}/appdata/%{name}*.appdata.xml %{_datadir}/applications/%{name}.desktop %{_datadir}/applications/%{name}-inspector.desktop %{_datadir}/icons/hicolor/*/apps/%{name}*.png %{_datadir}/icons/hicolor/scalable/apps/%{name}*.svg %{_datadir}/mime/packages/%{name}.xml %{_datadir}/pixmaps/%{name}.png %{_datadir}/pixmaps/%{name}-inspector.png %{python_sitelib}/%{name}/pyWx %{python_sitelib}/%{name}/lib/pyWx %files cli -f %{name}.lang %if 0%{?doc_license} %license %{license_files} %else %doc %{license_files} %endif %doc AUTHORS README %{python_sitelib}/%{name} %{_bindir}/%{name} %{_datadir}/%{name} %{_mandir}/man?/%{name}* %{python_sitelib}/*egg-info %exclude %{python_sitelib}/%{name}/pyWx %exclude %{python_sitelib}/%{name}/lib/pyWx %files -n nautilus-%{name} %if 0%{?doc_license} %license %{license_files} %else %doc %{license_files} %endif %{python_sitelib}/%{name}/lib/linux/nautilusExtension.* %changelog * Fri Oct 27 2017 Tomasz Tomasik - 0.2.7-29 - Add a few changes to the SPEC file - Rebuilt for EL7 * Thu Jul 27 2017 Fedora Release Engineering - 0.2.7-28 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 0.2.7-27 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Sun Aug 21 2016 Jaromír Cápík - 0.2.7-26 - Fixing deprecated fromstring/tostring [patch from Nuno Dias] (#1297194) * Tue Jul 19 2016 Fedora Release Engineering - 0.2.7-25 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 0.2.7-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Fri Sep 18 2015 Richard Hughes - 0.2.7-23 - Remove no longer required AppData file * Mon Jul 13 2015 Jaromir Capik - 0.2.7-22 - Replacing notify-python with pygobject3-base in the Requires (#1192867) * Tue Jul 07 2015 Jaromir Capik - 0.2.7-21 - Adding wxpy3 compatibility patch from Olly Betts (#1192867) * Tue Jul 07 2015 Jaromir Capik - 0.2.7-20 - Adding gtk3 compatibility patch from Scott Talbert (#1192867) * Thu Jun 18 2015 Fedora Release Engineering - 0.2.7-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Thu Mar 26 2015 Richard Hughes - 0.2.7-18 - Add an AppData file for the software center * Thu Oct 02 2014 Rex Dieter 0.2.7-17 - update icon/mime scriptlets * Mon Jun 30 2014 Toshio Kuratomi - 0.2.7-16 - Replace python-setuptools-devel BR with python-setuptools * Sat Jun 07 2014 Fedora Release Engineering - 0.2.7-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Wed Sep 04 2013 jcapik@redhat.com - 0.2.7-14 - Unversioned docdir change (#994032) - Spec cleaning - Fixing bogus dates in the changelog * Sun Aug 04 2013 Fedora Release Engineering - 0.2.7-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Mon Feb 4 2013 Toshio Kuratomi - 0.2.7-12 - Add patch for compatibility with python-pillow * Fri Jul 20 2012 Fedora Release Engineering - 0.2.7-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Sat Mar 24 2012 Lakshmi Narasimhan T V - 0.2.7-10 - Rebuild for xcftools * Thu Mar 08 2012 Lakshmi Narasimhan T V - 0.2.7-9 - Rebuild for xcftools * Sat Jan 14 2012 Fedora Release Engineering - 0.2.7-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Sat Jun 25 2011 Lakshmi Narasimhan T V - 0.2.7-7 - Fix pyexiv2 compatibility issue #704703. Updated the patch pyexiv2_compat.patch * Thu Jun 23 2011 Lakshmi Narasimhan T V - 0.2.7-6 - Fix pyexiv2 compatibility issue #704703. Applied patch pyexiv2_compat.patch * Thu May 12 2011 Lakshmi Narasimhan T V - 0.2.7-5 - Fix crash issue #646035 * Wed Feb 09 2011 Fedora Release Engineering - 0.2.7-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Sat Nov 20 2010 Nicoleau Fabien - 0.2.7-3 - Remove thai-scalable-purisa-fonts from requires * Wed Jul 21 2010 David Malcolm - 0.2.7-2 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Sat Mar 13 2010 Nicoleau Fabien - 0.2.7-1 - Update to 0.2.7 - Package is now noarch * Tue Dec 15 2009 Nicoleau Fabien - 0.2.5-1 - Update to 0.2.5 - New cli subpackage to use the application with no gui requirements * Sun Jul 26 2009 Fedora Release Engineering - 0.1.6-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Thu Feb 26 2009 Fedora Release Engineering - 0.1.6-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Fri Dec 19 2008 Nicoleau Fabien - 0.1.6-3 - Fix requires for nautilus-extension - Licence file added to nautilus-extension - No more docs subdirectory in documentation folder - Fix version * Thu Dec 18 2008 Nicoleau Fabien - 0.1.6-2 - subpckage created for nautilus extension - timestamp preserved for sed'ed file - wxPython removed from BuildRequires - Source0 updated - whole documentation included - update-desktop-database and update-mime-database added - egg-info properly builded - python-devel buildrequries changed to python * Sun Nov 9 2008 Nicoleau Fabien - 0.1.6-1 - Rebuild for 0.1.6 * Wed Jul 23 2008 Nicoleau Fabien - 0.1.5-2 - Licence tag updated * Mon Jul 21 2008 Nicoleau Fabien - 0.1.5-1 - rebuild for 0.1.5 - package now builds under F8 * Thu Jul 3 2008 Nicoleau Fabien - 0.1.4.bzr538-2 - find_lang usage to locate all locale files * Wed Jul 2 2008 Nicoleau Fabien - 0.1.4.bzr538-1 - Initial build