ec6a42b
%global link_tcmalloc 1
ead8b8f
%global development 0
343e6e3
343e6e3
%if 0%{?development}
c9657a7
%global commit 4059ae5bcad8e18443bf8f37bcff84de1dcc0d03
343e6e3
%global shortcommit %(c=%{commit}; echo ${c:0:7})
343e6e3
%endif
ec6a42b
8249dbc
Name:           rawtherapee
ead8b8f
%if 0%{?development}
c9657a7
Version:        5.9~20221002git%{shortcommit}
ead8b8f
%else
90ff839
Version:        5.10
ead8b8f
%endif
d0d1216
Release:        %autorelease
8249dbc
Summary:        Raw image processing software
8249dbc
a5cb9f7
License:        GPL-3.0-or-later and AGPL-3.0-or-later and MIT-open-group and IJG and BSL-1.0 and Apache-2.0
8249dbc
URL:            http://www.rawtherapee.com/
a3938a3
343e6e3
%if 0%{?development}
c9657a7
Source0:        https://github.com/Beep6581/RawTherapee/archive/%{commit}/RawTherapee-%{commit}.tar.gz
c9657a7
# File created with ./create_ReleaseInfo.sh 5.9 4059ae5 2022-10-02
343e6e3
Source1:        create_ReleaseInfo.sh
343e6e3
Source2:        ReleaseInfo.cmake
343e6e3
%else
90ff839
Source0:        https://rawtherapee.com/shared/source/%{name}-%{version}.tar.xz
90ff839
#Source0:        https://github.com/Beep6581/RawTherapee/releases/download/5.10-rc1/rawtherapee-5.10-rc1.tar.xz
343e6e3
%endif
1c6b281
Mattia Verga a73ee12
BuildRequires:  cmake
Mattia Verga a73ee12
BuildRequires:  desktop-file-utils
Mattia Verga 2b4cd88
BuildRequires:  gcc-c++
1d7e5b1
BuildRequires:  klt-devel
dbfea52
BuildRequires:  libappstream-glib
de5d785
BuildRequires:  libatomic
Mattia Verga 3de0c1d
Mattia Verga 3de0c1d
BuildRequires:  pkgconfig(exiv2)
Mattia Verga 3de0c1d
BuildRequires:  pkgconfig(expat)
Mattia Verga 3de0c1d
BuildRequires:  pkgconfig(fftw3f)
Mattia Verga 3de0c1d
BuildRequires:  pkgconfig(glib-2.0)
Mattia Verga 3de0c1d
BuildRequires:  pkgconfig(glibmm-2.4)
Mattia Verga 3de0c1d
BuildRequires:  pkgconfig(gtk+-3.0)
Mattia Verga 3de0c1d
BuildRequires:  pkgconfig(gtkmm-3.0)
Mattia Verga 3de0c1d
BuildRequires:  pkgconfig(lcms2)
Mattia Verga 3de0c1d
BuildRequires:  pkgconfig(lensfun)
Mattia Verga 3de0c1d
BuildRequires:  pkgconfig(libcanberra)
Mattia Verga 3de0c1d
BuildRequires:  pkgconfig(libiptcdata)
Mattia Verga 3de0c1d
BuildRequires:  pkgconfig(libjpeg)
Mattia Verga 3de0c1d
BuildRequires:  pkgconfig(libpng)
c73b196
BuildRequires:  pkgconfig(librsvg-2.0)
ec6a42b
%if 0%{?link_tcmalloc}
ec6a42b
BuildRequires:  pkgconfig(libtcmalloc)
ec6a42b
%endif
Mattia Verga 3de0c1d
BuildRequires:  pkgconfig(libtiff-4)
Mattia Verga 3de0c1d
BuildRequires:  pkgconfig(sigc++-2.0)
Mattia Verga 3de0c1d
BuildRequires:  pkgconfig(zlib)
8249dbc
Mattia Verga a73ee12
Requires:       hicolor-icon-theme
7ca9659
Mattia Verga a73ee12
# https://fedorahosted.org/fpc/ticket/530
Mattia Verga bc701bd
# to find: `grep DCRAW_VERSION: rawtherapee-*/rtengine/dcraw.c`
Mattia Verga bc701bd
Provides:       bundled(dcraw) = 9.27
8249dbc
48e8ad1
8249dbc
%description
8249dbc
Rawtherapee is a RAW image processing software. It gives full control over
8249dbc
many parameters to enhance the raw picture before finally exporting it
8249dbc
to some common image format.
8249dbc
8249dbc
%prep
343e6e3
%if 0%{?development}
343e6e3
%autosetup -p1 -n RawTherapee-%{commit}
8e7a1b1
cp -p %SOURCE2 .
343e6e3
%else
90ff839
%autosetup -p1 -n %{name}-%{version}
343e6e3
%endif
8249dbc
ec6a42b
# remove bundled KLT, so we're sure to use system provided KLT
ec6a42b
rm -rf rtengine/klt/
ec6a42b
8249dbc
%build
7d0ad57
# do not build shared libs
7d0ad57
# https://github.com/Beep6581/RawTherapee/pull/5479
c99cca3
%{cmake} \
Mattia Verga a73ee12
        -DCMAKE_BUILD_TYPE=release \
c99cca3
        -DLIBDIR=%{_libdir} \
ec6a42b
        -DBUILD_SHARED_LIBS:BOOL=OFF \
ec6a42b
%if 0%{?link_tcmalloc}
ec6a42b
        -DENABLE_TCMALLOC=ON \
ec6a42b
%endif
757be47
        -DWITH_SYSTEM_KLT=ON
757be47
757be47
%cmake_build
8249dbc
8249dbc
8249dbc
%install
d116944
%cmake_install
8249dbc
8249dbc
ed61d97
# These file are taken from the root already
Mattia Verga a73ee12
rm -rf %{buildroot}/%{_datadir}/doc 
d4e9f33
d4e9f33
Mattia Verga a73ee12
%check
Mattia Verga a73ee12
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
c73b196
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/com.%{name}.RawTherapee.appdata.xml
dbfea52
dbfea52
8249dbc
%files
a5cb9f7
%doc AUTHORS.txt RELEASE_NOTES.txt
a5cb9f7
%license LICENSE licenses/DroidSansMonoDotted.txt licenses/sleef_LICENSE.txt licenses/jdatasrc
Mattia Verga 2f51ebe
%{_mandir}/man1/%{name}.1.gz
Mattia Verga 2f51ebe
%{_bindir}/%{name}
Mattia Verga 2f51ebe
%{_bindir}/%{name}-cli
Mattia Verga 2f51ebe
%{_datadir}/%{name}
8249dbc
%{_datadir}/applications/%{name}.desktop
c73b196
%{_datadir}/metainfo/com.%{name}.RawTherapee.appdata.xml
Mattia Verga 2f51ebe
%{_datadir}/icons/hicolor/*/apps/%{name}.png
343e6e3
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
8249dbc
Thibault North e4821b8
8249dbc
%changelog
b4198c9
%autochangelog