# Remove old docs and binary file without source and licence createicon.exe
# wget https://rawtherapee.googlecode.com/files/%{name}-%{version}.tar.xz
# tar xf %{name}-%{version}.tar.xz && cd %{name}-%{version}
# rm tools/createicon.exe
# rm -rf doc/source
# find doc/ -name "*.pdf" | grep -v "4\.0" | xargs rm
# cd -
# tar -c --xz -f %{name}-%{version}.tar.xz %{name}-%{version}/
Name: rawtherapee
Version: 4.0.9
Release: 1%{?dist}
Summary: Raw image processing software
Group: Applications/Multimedia
License: GPLv3 and MIT and IJG
URL: http://www.rawtherapee.com/
Source0: %{name}-%{version}.tar.xz
BuildRequires: cmake >= 2.6
BuildRequires: gtk2-devel >= 2.12
BuildRequires: gtkmm24-devel >= 2.16
BuildRequires: lcms2-devel libjpeg-devel libtiff-devel
BuildRequires: libpng-devel libiptcdata-devel desktop-file-utils
BuildRequires: expat-devel
Requires: hicolor-icon-theme
%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.
%package doc
Group: Applications/Multimedia
Summary: Documentation for RawTherapee
BuildArch: noarch
Requires: %{name} = %{version}-%{release}
%description doc
The %{name}-doc package contains the documentation for Rawtherapee
%prep
%setup -q
# fix wrong line endings
sed -i "s|\r||g" AUTHORS.txt COMPILE.txt LICENSE.txt
# Remove mercurial dependency and specify version
cat > rtgui/version.h << EOF
#ifndef _VERSION_
#define _VERSION_
#define VERSION "%{version}"
#define TAGDISTANCE 0
#define CACHEFOLDERNAME "RawTherapee${CACHE_NAME_SUFFIX}"
#endif
EOF
cat > AboutThisBuild.txt << EOF
See package information
EOF
%build
%{cmake} %{?BUILD_TESTS} -DLIBDIR=%{_libdir} -DCMAKE_BUILD_TYPE=None -DAUTOMATED_BUILD_SYSTEM:BOOL=ON .
make VERBOSE=1 %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/16x16/apps/
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/32x32/apps/
# These file are taken from the root already
rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc
%post
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
fi
/usr/bin/update-desktop-database &> /dev/null || :
/sbin/ldconfig
%postun
/usr/bin/update-desktop-database &> /dev/null || :
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
fi || :
/sbin/ldconfig
%files
%doc AUTHORS.txt LICENSE.txt COMPILE.txt
%{_bindir}/rawtherapee
%{_libdir}/*.so
%{_datadir}/rawtherapee
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/rawtherapee.png
%files doc
%doc doc/built/pdf/*/*%{version}.pdf
%changelog
* Fri Jun 22 2012 Thibault North <tnorth@fedoraproject.org> - 4.0.9-1
- Update to 4.0.9
* Sat Apr 7 2012 Thibault North <tnorth@fedoraproject.org> - 4.0.8-1
- Update to 4.0.8
- Spec cleanup
- Rebase on the online source archive
* Sun Feb 12 2012 Thibault North <tnorth@fedoraproject.org> - 4.0.7-2
- Fix faulty MIME directive
* Sat Feb 11 2012 Thibault North <tnorth@fedoraproject.org> - 4.0.7-1
- Update to 4.0.7
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Sun Nov 27 2011 Thibault North <tnorth@fedoraproject.org> - 4.0.5-2
- Now require lcms2
* Sun Nov 27 2011 Thibault North <tnorth@fedoraproject.org> - 4.0.5-1
- Upgrade to release 4.0.5
* Thu Aug 18 2011 Thibault North <tnorth@fedoraproject.org> - 3.0.0-1
- Upgrade to stable release 3.0.0
* Tue Jul 12 2011 Thibault North <tnorth@fedoraproject.org> - 3.0-0.31.a1
- Fix .desktop file to properly run rawtherapee
* Sun Jul 10 2011 Thibault North <tnorth@fedoraproject.org> - 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 <tnorth@fedoraproject.org> - 3.0-0.29.a1
- Sync with upstream
- Versioning now needs to be included in version.h
* Sun Mar 20 2011 Thibault North <tnorth@fedoraproject.org> - 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 <rel-eng@lists.fedoraproject.org> - 3.0-0.28.a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Jan 3 2011 Thibault North <tnorth@fedoraproject.org> - 3.0-0.27.a1
- Sync with upstream for various bugfixes and enhancements
* Sun Dec 19 2010 Thibault North <tnorth@fedoraproject.org> - 3.0-0.26.a1
- Sync with branch_3.0 upstream: rawtherapee has a stable branch now.
* Sat Nov 6 2010 Dan HorĂ¡k <dan[at]danny.cz> - 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 <tnorth@fedoraproject.org> - 3.0-0.24.a1
- Sync with upstream for many enhancements and fixes
* Thu Sep 9 2010 Thibault North <tnorth@fedoraproject.org> - 3.0-0.23.a1
- Sync with upstream back to the official repository
- Various fixes and enhancements
* Thu May 27 2010 Thibault North <tnorth@fedoraproject.org> - 3.0-0.22.a1
- Sync upstream for OpenMP support
* Mon May 11 2010 Thibault North <tnorth@fedoraproject.org> - 3.0-0.21.a1
- Sync with upstream rev ccc12f4a03
- Segfault fix
- Various fixes/enhancements
* Tue Apr 27 2010 Thibault North <tnorth@fedoraproject.org> - 3.0-0.20.a1
- Fix compilation for 64 bits OSes
* Tue Apr 27 2010 Thibault North <tnorth@fedoraproject.org> - 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 <tnorth@fedoraproject.org> - 3.0-0.18.a1
- New release including curves (exposure and luminance)
* Fri Apr 16 2010 Thibault North <tnorth@fedoraproject.org> - 3.0-0.17.a1
- Sync with upstream: multiple fixes
* Mon Apr 12 2010 Thibault North <tnorth@fedoraproject.org> - 3.0-0.16.a1
- Sync with upstream for new resizing algorithms
- File renames
* Thu Apr 8 2010 Thibault North <tnorth@fedoraproject.org> - 3.0-0.15.a1
- Sync with upstream for new demosaicing algorithms
- Fix segfault
* Tue Mar 23 2010 Thibault North <tnorth@fedoraproject.org> - 3.0-0.14.a1
- Remove sed liners which have been pushed upstream
* Tue Mar 23 2010 Thibault North <tnorth@fedoraproject.org> - 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 <tnorth@fedoraproject.org> - 3.0-0.12.a1
- Now rely on RawTherapee-Fork, new upstream
* Sat Mar 20 2010 Sebastian Dziallas <sebastian@when.com> - 3.0-0.11.a1
- Correct path in .desktop file
* Wed Mar 17 2010 Thibault North <tnorth@fedoraproject.org> - 3.0-0.10.a1
- Run ldconfig at post/postun
* Mon Mar 15 2010 Thibault North <tnorth@fedoraproject.org> - 3.0-0.9.a1
- Use proper license tag
- Remove some files with different licensing
* Fri Mar 3 2010 Thibault North <tnorth@fedoraproject.org> - 3.0-0.8.a1
- Various fixes related to review request.
* Sat Feb 28 2010 Thibault North <tnorth@fedoraproject.org> - 3.0-0.7.a1
- Update icon database on install/removal
- Fix many files permissions (thanks Sebastian Dziallas)
* Sat Feb 28 2010 Thibault North <tnorth@fedoraproject.org> - 3.0-0.6.a1
- Set icons for desktop file
- Remove rawzor from SRPM
* Sat Feb 28 2010 Thibault North <tnorth@fedoraproject.org> - 3.0-0.5.a1
- More fixes and added desktop file
* Wed Feb 24 2010 Sebastian Dziallas <sebastian@when.com> - 3.0-0.4.a1
- Smaller modifications and changes
* Sun Jan 24 2010 Sebastian Dziallas <sebastian@when.com> - 3.0-0.3.a1
- Switch to a1 SVN checkout
* Sun Jan 24 2010 Thibault North <tnorth@fedoraproject.org> - 3.0-0.2.a1
- Various Fixes
* Fri Jan 22 2010 Thibault North <tnorth@fedoraproject.org> - 3.0-0.1.a1
- Initial package