%define appid com.rawtherapee.RawTherapee %define link_tcmalloc 1 # Do not build shared libs # https://github.com/Beep6581/RawTherapee/pull/5479 %define build_shared 0 %define backport %{nil} %if 0%{?rhel} && 0%{?rhel} <= 7 %define backport 1 %endif %define libtiff4_opt 0 %if 0%{?backport} %define libtiff4_opt 1 %endif %define libtiff4_dir /opt/libtiff4 %define system_klt %{nil} %if 0%{?fedora} >= 14 %define system_klt 1 %endif %define devtoolset %{nil} %if 0%{?backport} %define devtoolset 8 %endif %{!?_licensedir:%global license %doc} %if 0%{?libtiff4_opt} # https://fedoraproject.org/wiki/PackagingDrafts/FilteringAutomaticDependencies # https://fedoraproject.org/wiki/EPEL:Packaging_Autoprovides_and_Requires_Filtering %filter_from_requires /^libtiff\.so\.5.*$/d; /^libtiffxx\.so\.5.*$/d %filter_setup %endif %define dir_appdata metainfo %if 0%{?rhel}%{?fedora} %if 0%{?rhel} %if 0%{?rhel} <= 7 %define dir_appdata appdata %endif %endif %endif %if 0%{!?_metainfodir:1} %define _metainfodir %{_datadir}/%{dir_appdata} %endif %define dir_metainfo %( echo "%{_metainfodir}" | xargs -I{} basename '{}' ) %define fix_appdata_releases %{nil} %if 0%{?rhel}%{?fedora} %if 0%{?rhel} %if 0%{?rhel} <= 7 %define fix_appdata_releases 1 %endif %endif %endif Name: rawtherapee Version: 5.8 Release: 1.1%{?dist} Summary: Raw image processing software Group: Applications/Multimedia License: GPLv3 and MIT and IJG URL: http://www.rawtherapee.com/ # Do not use the Source code (zip/tar.gz) tarballs auto-generated by GitHub below, they lack some metadata. #Source0: https://rawtherapee.com/shared/source/%{name}-%{version}.tar.xz Source0: https://github.com/Beep6581/RawTherapee/releases/download/%{version}/%{name}-%{version}.tar.xz # Upstreamable patches # Fix linking against system's KLT # https://github.com/Beep6581/RawTherapee/pull/5539 # https://github.com/Beep6581/RawTherapee/pull/5539/commits/9205b506b50c941ee13c78243f51a2e15d9fe16f Patch0: rawtherapee-5.8-system-klt.patch # Install additional icons # https://github.com/Beep6581/RawTherapee/pull/5646 # https://github.com/Beep6581/RawTherapee/pull/5646/commits/291abfd7a705122420af7874c109c4fea712dada Patch10: rawtherapee-5.8-icons.patch # Package-specific patches # Allow to use alternative libtiff4 Patch100: rawtherapee-5.5-libtiff-4-opt.patch BuildRequires: cmake3 BuildRequires: desktop-file-utils %if 0%{?devtoolset} BuildRequires: devtoolset-%{devtoolset}-gcc BuildRequires: devtoolset-%{devtoolset}-gcc-c++ BuildRequires: devtoolset-%{devtoolset}-toolchain BuildRequires: devtoolset-%{devtoolset}-libatomic-devel %else BuildRequires: gcc-c++ %endif BuildRequires: libappstream-glib BuildRequires: libatomic %if 0%{?system_klt} BuildRequires: klt-devel %endif BuildRequires: pkgconfig(cairomm-1.0) BuildRequires: pkgconfig(exiv2) BuildRequires: pkgconfig(expat) >= 2.1 BuildRequires: pkgconfig(fftw3f) BuildRequires: pkgconfig(gio-2.0) >= 2.44 BuildRequires: pkgconfig(giomm-2.4) >= 2.44 BuildRequires: pkgconfig(glib-2.0) >= 2.44 BuildRequires: pkgconfig(glibmm-2.4) >= 2.44 BuildRequires: pkgconfig(gobject-2.0) >= 2.44 BuildRequires: pkgconfig(gthread-2.0) >= 2.44 BuildRequires: pkgconfig(gtk+-3.0) >= 3.16 BuildRequires: pkgconfig(gtkmm-3.0) >= 3.16 BuildRequires: pkgconfig(lcms2) >= 2.6 BuildRequires: pkgconfig(lensfun) >= 0.2 BuildRequires: pkgconfig(libcanberra) BuildRequires: pkgconfig(libiptcdata) BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(librsvg-2.0) >= 2.40 %if 0%{?link_tcmalloc} BuildRequires: pkgconfig(libtcmalloc) %endif %if !0%{?libtiff4_opt} BuildRequires: pkgconfig(libtiff-4) %else # http://rawpedia.rawtherapee.com/Linux#CentOS # https://github.com/Beep6581/RawTherapee/issues/4501 BuildRequires: libtiff4-opt-devel >= 4.0.4 Requires: libtiff4-opt >= 4.0.4 %endif BuildRequires: pkgconfig(sigc++-2.0) >= 2.3.1 BuildRequires: pkgconfig(zlib) BuildRequires: xmlstarlet Requires: fftw Requires: hicolor-icon-theme # https://fedorahosted.org/fpc/ticket/530 # to find: `grep DCRAW_VERSION rawtherapee-*/rtengine/dcraw.c` Provides: bundled(dcraw) = 9.27 # https://fedoraproject.org/wiki/Packaging:Scriptlets # https://fedoraproject.org/wiki/PackagingDrafts/ScriptletSnippets # gtk-update-icon-cache Requires(postun): gtk-update-icon-cache Requires(posttrans): gtk-update-icon-cache # update-desktop-database Requires(post): desktop-file-utils Requires(postun): desktop-file-utils # ldconfig Requires(post): glibc /sbin/ldconfig Requires(postun): glibc /sbin/ldconfig %description Rawtherapee is a RAW image processing software. It gives full control over many parameters to enhance the raw picture before finally exporting it to some common image format. %prep %autosetup -p1 -n "%{name}-%{version}" # fix wrong line endings sed -i "s|\r||g" "LICENSE.txt" %if 0%{?system_klt} # remove bundled KLT, so we're sure to use system provided KLT %{__rm} -rf "rtengine/klt/" %endif %build %if 0%{?devtoolset} . /opt/rh/devtoolset-%{devtoolset}/enable %endif %if 0%{?libtiff4_opt} export LIBTIFF4_LIBRARY_PATH="%{libtiff4_dir}/%{_lib}" export LIBTIFF4_INCLUDE_PATH="%{libtiff4_dir}/include" if [[ -n "${LD_LIBRARY_PATH}" ]]; then LD_LIBRARY_PATH="${LIBTIFF4_LIBRARY_PATH}:${LD_LIBRARY_PATH}" else LD_LIBRARY_PATH="${LIBTIFF4_LIBRARY_PATH}" fi export LD_LIBRARY_PATH if [[ -n "${C_INCLUDE_PATH}" ]]; then C_INCLUDE_PATH="${LIBTIFF4_INCLUDE_PATH}:${C_INCLUDE_PATH}" else C_INCLUDE_PATH="${LIBTIFF4_INCLUDE_PATH}" fi export C_INCLUDE_PATH if [[ -n "${CPLUS_INCLUDE_PATH}" ]]; then CPLUS_INCLUDE_PATH="${LIBTIFF4_INCLUDE_PATH}:${CPLUS_INCLUDE_PATH}" else CPLUS_INCLUDE_PATH="${LIBTIFF4_INCLUDE_PATH}" fi export CPLUS_INCLUDE_PATH %endif %{cmake3} %{?BUILD_TESTS} \ -DCMAKE_INSTALL_PREFIX="%{_prefix}" \ -DLIBDIR="%{_libdir}" \ -DCMAKE_BUILD_TYPE=release \ %if 0%{?build_shared} -DBUILD_SHARED_LIBS:BOOL=ON \ %else -DBUILD_SHARED_LIBS:BOOL=OFF \ %endif -DAUTOMATED_BUILD_SYSTEM:BOOL=ON \ -DCACHE_NAME_SUFFIX="" \ -DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS}" \ -DCMAKE_C_FLAGS="${RPM_OPT_FLAGS}" \ %if 0%{?libtiff4_opt} -DTIFF_INCLUDE_DIR="${LIBTIFF4_INCLUDE_PATH}" \ -DTIFF_LIBRARIES="${LIBTIFF4_LIBRARY_PATH}" \ -DTIFF_LIBRARY="${LIBTIFF4_LIBRARY_PATH}/libtiff.so" \ -DCMAKE_INSTALL_RPATH="${LIBTIFF4_LIBRARY_PATH}" \ %endif %if 0%{?link_tcmalloc} -DENABLE_TCMALLOC=ON \ %endif %if 0%{?system_klt} -DWITH_SYSTEM_KLT=ON \ %endif . %{__make} VERBOSE=1 %{?_smp_mflags} %install %{__make} install DESTDIR="%{buildroot}" # These file are taken from the root already %{__rm} -rf "%{buildroot}%{_datadir}/doc" %if "%{dir_metainfo}" != "metainfo" [[ -d "%{buildroot}%{_metainfodir}" ]] || %{__mv} "%{buildroot}%{_datadir}/metainfo" "%{buildroot}%{_metainfodir}" %endif %if 0%{?fix_appdata_releases} xmlstarlet ed --inplace -d '/component/releases/release[position()>1][contains(@version,"~")]' "%{buildroot}%{_metainfodir}/%{appid}.appdata.xml" %endif # Update AppData file: Add developer_name tag # https://github.com/Beep6581/RawTherapee/pull/5478 xmlstarlet ed --inplace -s '/component' -t elem -n 'developer_name' -v 'The RawTherapee Team' "%{buildroot}%{_metainfodir}/%{appid}.appdata.xml" %check desktop-file-validate "%{buildroot}%{_datadir}/applications/%{name}.desktop" appstream-util validate-relax --nonet "%{buildroot}%{_metainfodir}/%{appid}.appdata.xml" %post /bin/touch --no-create "%{_datadir}/icons/hicolor" &> /dev/null || : /usr/bin/update-desktop-database &> /dev/null || : /sbin/ldconfig %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 --quiet "%{_datadir}/icons/hicolor" &> /dev/null || : fi /sbin/ldconfig %posttrans /usr/bin/gtk-update-icon-cache --quiet "%{_datadir}/icons/hicolor" &> /dev/null || : %files %doc AUTHORS.txt CONTRIBUTING.md README.md RELEASE_NOTES.txt %license LICENSE.txt %{_mandir}/man1/%{name}.1.gz %{_bindir}/%{name} %{_bindir}/%{name}-cli %if 0%{?build_shared} %{_libdir}/*.so %endif %{_datadir}/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/*/apps/%{name}.??g %{_metainfodir}/%{appid}.appdata.xml %changelog * Sun Feb 09 2020 Tomasz Tomasik - 5.8-1.1 - Add xmlstarlet to build requirements * Sun Feb 09 2020 Tomasz Tomasik - 5.8-1 - Update to 5.8 - Install additional icons - Fix linking to system's KLT lib - Use static libraries - Enable linking to tcmalloc * Mon Oct 21 2019 Tomasz Tomasik - 5.7-3 - Update desktop file: Add StartupNotify entry * Wed Oct 16 2019 Tomasz Tomasik - 5.7-2 - Add developer_name to the AppData file - Fix progress bar of invoking external editor - Add fixes for EL8 * Thu Sep 26 2019 Tomasz Tomasik - 5.7-1 - Update to 5.7 - Update XDG files - Update screenshots in the AppData file - Quote parameters correctly for Linux when spawning commands - Fix launch of custom editor - Allow to use GIMP from the flatpak as an external tool to edit photos * Tue Apr 23 2019 Tomasz Tomasik - 5.6-1.1 - Update to 5.6 - Fix AppData file - Switch to cmake3 - Update requirements - Rebuild for EL7 * Tue Dec 25 2018 Tomasz Tomasik - 5.5-1.1 - SPEC file cleanups - Update requirements for EL7 - Rebuild for EL7 * Fri Dec 21 2018 Mattia Verga - 5.5-1 - Release 5.5 stable - Add libatomic to BRs to fix x64 builds * Tue Sep 18 2018 Owen Taylor - 5.4-3 - Don't explicitly require fftw - this pulls in unnecessary library subpackages and binaries; just count on RPM's standard library autodependencies. * Sat Jul 14 2018 Fedora Release Engineering - 5.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Thu Mar 22 2018 Mattia Verga - 5.4-1 - Release 5.4 stable * Wed Mar 14 2018 Mattia Verga - 5.4-0.2.rc3 - Update to 5.4RC3 * Sun Mar 04 2018 Mattia Verga - 5.4-0.1.rc2 - Update to 5.4RC2 - Report correct dcraw version in bundled statement - Remove obsolete ld scriptlets * Mon Feb 19 2018 Mattia Verga - 5.3-4 - Add gcc-c++ to BuildRequires * Fri Feb 09 2018 Fedora Release Engineering - 5.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Jan 18 2018 Igor Gnatenko - Remove obsolete scriptlets * Mon Oct 2 2017 Matthew Miller - 5.3-1 - update to 5.3 final * Mon Sep 25 2017 Matthew Miller - 5.3-0.1 - upstream 5.3 rc1 for rawhide - includes fix for CVE-2017-13735 - lensfun is now required (enabling new lens correction feature) - appdata -> metainfo dir * Sun Sep 10 2017 Mattia Verga - 5.2-2 - Backport upstream patch for fixing CVE-2017-13735 * Mon Jul 31 2017 Mattia Verga - 5.2-1 - Upgrade to 5.2 - Use system KLT library instead of bundled one - No further requires bzip2 as BR * Thu Jul 27 2017 Fedora Release Engineering - 5.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Thu May 18 2017 Matthew Miller - 5.1-1 - 5.1 final is out * Mon May 15 2017 Fedora Release Engineering - 5.1-0.2.rc1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild * Sun May 14 2017 Mattia Verga - 5.1-0.1.rc1 - Upgrade to 5.1-rc1 - New command line binary - Removed support for gtk2 * Sat Feb 18 2017 Mattia Verga - 5.0-3.r1 - Upgrade to 5.0-r1 - Fix build error with GCC7 * Sat Feb 11 2017 Fedora Release Engineering - 5.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Jan 23 2017 Mattia Verga - 5.0-1 - Upgrade to stable 5.0-gtk3 * Sat Nov 05 2016 Mattia Verga - 4.2.1234-2.20161105gitb766110 - Upgrade svn version - Add provides klt * Sun Oct 09 2016 Mattia Verga - 4.2.1234-1.20161009gitd16d244 - Upgrade to svn version - GTK3 is now default - Remove unneeded patches * Thu Feb 04 2016 Fedora Release Engineering - 4.2-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Jun 18 2015 Fedora Release Engineering - 4.2-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Wed May 13 2015 Matthew Miller - 4.2-10 - note dcraw bundling (see https://fedorahosted.org/fpc/ticket/530) * Wed May 13 2015 Matthew Miller - 4.2-9 - same thing, format patch correctly * Wed May 13 2015 Matthew Miller - 4.2-8 - Security fix for CVE-2015-3885 (dcraw input sanitization), bz #1221257 * Sat May 02 2015 Kalev Lember - 4.2-7 - Rebuilt for GCC 5 C++11 ABI change * Tue Mar 24 2015 Matthew Miller - 4.2-6 - ooh, fixed it. (insufficiently strict html in description. will submit bug upstream -- thanks Kalev for the fix!) * Tue Mar 24 2015 Matthew Miller - 4.2-5 - appstream validation currently failing on f22 and f23. temporarily disabling * Tue Mar 24 2015 Matthew Miller - 4.2-4 - oh look! fix some invalid dates in changelog including the previous entry - move appdata validation next to desktop file validation * Tue Mar 24 2015 Matthew Miller - 4.2-3 - package appdata - fix some invalid dates in changelog * Tue Mar 24 2015 Matthew Miller - 4.2-2 - a few config changes to match upstream rpm * Sat Nov 08 2014 Matthew Miller - 4.2-1 - update to new upstream stable release - set cache and config dir to be unversioned by upstream request (see http://rawtherapee.com/blog/4.2-pre-release-announcement) Note that this will cause config from 4.1 to be ignored, and possibly even older config to be used instead. * Sun Aug 17 2014 Fedora Release Engineering - 4.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sun Jun 08 2014 Matthew Miller - 4.1-1 - update to new upstream stable release (first officially-stable release since 3.1) - see changelog at http://rawtherapee.com/blog/rawtherapee-4.1-is-out - drop documentation subpackage, because upstream does not yet have a pdf for 4.1; see docs online at http://rawtherapee.com/blog/documentation and http://rawpedia.rawtherapee.com/ - no need to include COMPILE.txt in binary package, but do incliude RELEASE_NOTES.txt * Sun Jun 08 2014 Fedora Release Engineering - 4.0.11-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Aug 04 2013 Fedora Release Engineering - 4.0.11-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Sat Jun 29 2013 Thibault North - 4.0.11-1 - Update to 4.0.11 * Sun Apr 7 2013 Thibault North - 4.0.10-1 - Update to 4.0.10 * Thu Feb 14 2013 Fedora Release Engineering - 4.0.9-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Mon Jan 21 2013 Adam Tkac - 4.0.9-4 - rebuild due to "jpeg8-ABI" feature drop * Fri Dec 21 2012 Adam Tkac - 4.0.9-3 - rebuild against new libjpeg * Sat Jul 21 2012 Fedora Release Engineering - 4.0.9-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Fri Jun 22 2012 Thibault North - 4.0.9-1 - Update to 4.0.9 * Sat Apr 7 2012 Thibault North - 4.0.8-1 - Update to 4.0.8 - Spec cleanup - Rebase on the online source archive * Sun Feb 12 2012 Thibault North - 4.0.7-2 - Fix faulty MIME directive * Sat Feb 11 2012 Thibault North - 4.0.7-1 - Update to 4.0.7 * Sat Jan 14 2012 Fedora Release Engineering - 4.0.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Sun Nov 27 2011 Thibault North - 4.0.5-2 - Now require lcms2 * Sun Nov 27 2011 Thibault North - 4.0.5-1 - Upgrade to release 4.0.5 * Thu Aug 18 2011 Thibault North - 3.0.0-1 - Upgrade to stable release 3.0.0 * Tue Jul 12 2011 Thibault North - 3.0-0.31.a1 - Fix .desktop file to properly run rawtherapee * Sun Jul 10 2011 Thibault North - 3.0-0.30.a1 - Sync with upstream for many fixes and improvements - Executable is now rawtherapee instead of rt (see BZ#715390) * Mon Jun 6 2011 Thibault North - 3.0-0.29.a1 - Sync with upstream - Versioning now needs to be included in version.h * Sun Mar 20 2011 Thibault North - 3.0-0.28.a1 - Updated to 3.0A2, distance 13 for many fixes - Updated spec file thanks to upstream fixes * Wed Feb 09 2011 Fedora Release Engineering - 3.0-0.28.a1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Mon Jan 3 2011 Thibault North - 3.0-0.27.a1 - Sync with upstream for various bugfixes and enhancements * Sun Dec 19 2010 Thibault North - 3.0-0.26.a1 - Sync with branch_3.0 upstream: rawtherapee has a stable branch now. * Sat Nov 6 2010 Dan HorĂ¡k - 3.0-0.25.a1 - Fix libdir for 64-bit architectures - Fix ownership of the /usr/share/rawtherapee directory * Mon Oct 25 2010 Thibault North - 3.0-0.24.a1 - Sync with upstream for many enhancements and fixes * Thu Sep 9 2010 Thibault North - 3.0-0.23.a1 - Sync with upstream back to the official repository - Various fixes and enhancements * Thu May 27 2010 Thibault North - 3.0-0.22.a1 - Sync upstream for OpenMP support * Tue May 11 2010 Thibault North - 3.0-0.21.a1 - Sync with upstream rev ccc12f4a03 - Segfault fix - Various fixes/enhancements * Tue Apr 27 2010 Thibault North - 3.0-0.20.a1 - Fix compilation for 64 bits OSes * Tue Apr 27 2010 Thibault North - 3.0-0.19.a1 - Switch back to Rawtherapee original release - Bug fixes - Translations and themes now have a licence and can be used - Hide information on pictures by default * Fri Apr 16 2010 Thibault North - 3.0-0.18.a1 - New release including curves (exposure and luminance) * Fri Apr 16 2010 Thibault North - 3.0-0.17.a1 - Sync with upstream: multiple fixes * Mon Apr 12 2010 Thibault North - 3.0-0.16.a1 - Sync with upstream for new resizing algorithms - File renames * Thu Apr 8 2010 Thibault North - 3.0-0.15.a1 - Sync with upstream for new demosaicing algorithms - Fix segfault * Tue Mar 23 2010 Thibault North - 3.0-0.14.a1 - Remove sed liners which have been pushed upstream * Tue Mar 23 2010 Thibault North - 3.0-0.13.a1 - Fix CMakeLists to build without extra languages and themes - Remove PDF docs : development-related or outdated * Tue Mar 23 2010 Thibault North - 3.0-0.12.a1 - Now rely on RawTherapee-Fork, new upstream * Sat Mar 20 2010 Sebastian Dziallas - 3.0-0.11.a1 - Correct path in .desktop file * Wed Mar 17 2010 Thibault North - 3.0-0.10.a1 - Run ldconfig at post/postun * Mon Mar 15 2010 Thibault North - 3.0-0.9.a1 - Use proper license tag - Remove some files with different licensing * Wed Mar 3 2010 Thibault North - 3.0-0.8.a1 - Various fixes related to review request. * Sun Feb 28 2010 Thibault North - 3.0-0.7.a1 - Update icon database on install/removal - Fix many files permissions (thanks Sebastian Dziallas) * Sun Feb 28 2010 Thibault North - 3.0-0.6.a1 - Set icons for desktop file - Remove rawzor from SRPM * Sun Feb 28 2010 Thibault North - 3.0-0.5.a1 - More fixes and added desktop file * Wed Feb 24 2010 Sebastian Dziallas - 3.0-0.4.a1 - Smaller modifications and changes * Sun Jan 24 2010 Sebastian Dziallas - 3.0-0.3.a1 - Switch to a1 SVN checkout * Sun Jan 24 2010 Thibault North - 3.0-0.2.a1 - Various Fixes * Fri Jan 22 2010 Thibault North - 3.0-0.1.a1 - Initial package