darktable/darktable.spec
Dominique Leuenberger b629a7ecef Accepting request 450370 from graphics
- update to 2.2.1:
  - New features:
    - Show a dialog window that tells when locking the
      database/library failed
    - Ask before deleting history stack from lightable.
    - preferences: make features that are not available (greyed
      out) more obvious
  - Bugfixes:
    - Always cleanup undo list before entering darkroom view. Fixes
      crash when using undo after re-entering darkroom
    - Darkroom: properly delete module instances. Fixes rare
      crashes after deleting second instance of module.
    - Levels and tonecurve modules now also use 256 bins.
    - Rawoverexposed module: fix visualization when a camera custom
      white balance preset is used

- fix building with openjpeg2

OBS-URL: https://build.opensuse.org/request/show/450370
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/darktable?expand=0&rev=64
2017-01-16 10:15:15 +00:00

276 lines
7.8 KiB
RPMSpec

#
# spec file for package darktable
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%bcond_with clang
%if ( 0%{?suse_version} > 1310 && 0%{?is_opensuse} ) || 0%{?fedora_version} >= 22 || 0%{?fc22}%{?fc23}%{?fc24}%{?fc25}
%bcond_without osmgpsmap
%else
%bcond_with osmgpsmap
%endif
%if (0%{?suse_version} >= 1310 && 0%{?is_opensuse} ) || 0%{?rhel_version} > 6 || 0%{?centos_version} > 6 || 0%{?fedora_version} >= 20 || 0%{?el7}%{?fc20}%{?fc21}%{?fc22}%{?fc23}%{?fc24}%{?fc25}
%bcond_without flickcurl
%bcond_without translated_manpages
%else
%bcond_with flickcurl
%bcond_with translated_manpages
%endif
%if 0%{?suse_version}
%bcond_without system_lua
%else
%bcond_with system_lua
%endif
%if 0%{?suse_version} > 1320 || 0%{?rhel_version} > 6 || 0%{?centos_version} > 6 || 0%{?fedora_version} >= 20 || 0%{?el7}%{?fc20}%{?fc21}%{?fc22}%{?fc23}%{?fc24}%{?fc25}
%bcond_without system_opencl
%else
%bcond_with system_opencl
%endif
%define cmake_options -DCMAKE_SKIP_RPATH:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBINARY_PACKAGE_BUILD=1 -DCMAKE_INSTALL_DATAROOTDIR="share" -DCMAKE_INSTALL_LIBDIR="%{_lib}"
Name: darktable
Version: 2.2.1
Release: 0
Url: http://www.darktable.org/
Source0: %{name}-%{version}.tar.xz
Source1: https://github.com/darktable-org/darktable/releases/download/release-2.0.0/darktable-usermanual.pdf
Source2: https://github.com/darktable-org/darktable/releases/download/release-2.0.0/darktable-usermanual-fr.pdf
Source3: https://github.com/darktable-org/darktable/releases/download/release-2.0.0/darktable-usermanual-es.pdf
Source4: https://github.com/darktable-org/darktable/releases/download/release-2.0.0/darktable-lua-api.pdf
Source99: README.openSUSE
Patch: darktable-old-glib.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64 aarch64
# build time tools
BuildRequires: cmake >= 3
BuildRequires: fdupes
%if %{with clang}
BuildRequires: llvm-clang
%else
BuildRequires: gcc-c++
%endif
BuildRequires: intltool
BuildRequires: libxslt
%if %{with translated_manpages}
BuildRequires: po4a
%endif
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
BuildRequires: desktop-file-utils
BuildRequires: hicolor-icon-theme
BuildRequires: xz
# libraries deps
BuildRequires: cups-devel
BuildRequires: libjpeg-devel
BuildRequires: libtiff-devel
BuildRequires: libxml2-devel
#
%if %{with system_lua}
%if 0%{?suse_version}
%if 0%{?suse_version} > 1210 && 0%{?suse_version} < 1321
BuildRequires: lua-devel
%else
BuildRequires: lua52-devel
%endif
%endif
%endif
BuildRequires: pugixml-devel
#
BuildRequires: pkgconfig
%if 0%{?suse_version} != 1315 || ( 0%{?suse_version} == 1315 && 0%{?is_opensuse} )
BuildRequires: pkgconfig(GraphicsMagick)
%if 0%{?suse_version} && 0%{?suse_version} < 1315
BuildRequires: libGraphicsMagick3
%endif
BuildRequires: pkgconfig(libopenjp2)
%endif
BuildRequires: pkgconfig(OpenEXR)
BuildRequires: pkgconfig(atk)
BuildRequires: pkgconfig(colord)
BuildRequires: pkgconfig(colord-gtk)
BuildRequires: pkgconfig(exiv2)
%if %{with flickcurl}
BuildRequires: pkgconfig(flickcurl)
%endif
BuildRequires: pkgconfig(gdk-pixbuf-2.0)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(json-glib-1.0)
BuildRequires: pkgconfig(lensfun)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(libgphoto2)
BuildRequires: pkgconfig(librsvg-2.0)
BuildRequires: pkgconfig(libsecret-1)
BuildRequires: pkgconfig(libwebp)
%if %{with osmgpsmap}
BuildRequires: pkgconfig(osmgpsmap-1.0)
%endif
BuildRequires: pkgconfig(pango)
BuildRequires: pkgconfig(sdl)
BuildRequires: pkgconfig(sqlite3)
%if %{with system_opencl}
BuildRequires: opencl-headers
%endif
#
Summary: A virtual Lighttable and Darkroom
License: GPL-3.0+
Group: Productivity/Graphics/Viewers
%description
darktable is a virtual lighttable and darkroom for photographers: it manages
your digital negatives in a database and lets you view them through a zoomable
lighttable. it also enables you to develop raw images and enhance them.
%package doc
Summary: A virtual Lighttable and Darkroom
Group: Productivity/Graphics/Viewers
%description doc
darktable is a virtual lighttable and darkroom for photographers: it manages
your digital negatives in a database and lets you view them through a zoomable
lighttable. it also enables you to develop raw images and enhance them.
This package provides the user manual in pdf format
%prep
%setup -q -n %{name}-%{version}
%patch -p1
chmod -x tools/create_control_svg.sh tools/purge_non_existing_images.sh tools/basecurve/* tools/noise/*
cp %{S:1} %{S:2} %{S:3} %{S:4} .
cp %{S:99} .
%ifarch ppc64le
echo "" > src/is_supported_platform.h
%endif
%if %{with system_opencl}
# Remove bundled OpenCL headers.
rm -rf src/external/CL
sed -i -e 's, \"external/CL/\*\.h\" , ,' src/CMakeLists.txt
%endif
%if %{with system_lua}
# Remove bundled lua
rm -rf src/external/lua/
%endif
%build
./tools/create_version_c.sh src/version_gen.c "%{version}-%{release}"
%if %{with clang}
export CC="/usr/bin/clang"
export CXX="/usr/bin/clang++"
%endif
%if 0%{?suse_version}
%cmake %{cmake_options} || cat CMakeFiles/CMakeError.log
%else
mkdir %{_target_platform}
pushd %{_target_platform}
%cmake %{cmake_options} \
%if ! %{with system_lua}
-DDONT_USE_INTERNAL_LUA=Off \
%endif
..
%endif
make %{_smp_mflags} VERBOSE=1
%install
%if 0%{?suse_version}
%cmake_install
%else
pushd %{_target_platform}
make install DESTDIR="%{buildroot}"
popd
%endif
%if 0%{?suse_version}
%suse_update_desktop_file darktable
%endif
find %{buildroot}%{_libdir} -name "*.la" -delete
%find_lang darktable
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}/tools/
%if 0%{?suse_version}
mv %{buildroot}%{_datadir}/doc/darktable/* %{buildroot}%{_defaultdocdir}/%{name}/
%endif
cp -av %{S:2} doc/ChangeLog doc/NEWS \
doc/thumbnail_color_management.txt \
doc/TODO doc/TRANSLATORS \
%{buildroot}%{_defaultdocdir}/%{name}
cp -av tools/purge* \
%{buildroot}%{_defaultdocdir}/%{name}/tools/
%fdupes %{buildroot}
%if 0%{?suse_version}
%post
%desktop_database_post
%icon_theme_cache_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%else
%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%postun
update-desktop-database &> /dev/null || :
if [ $1 -eq 0 ] ; then
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%endif
%files -f darktable.lang
%defattr(-,root,root)
%doc %{_defaultdocdir}/%{name}
%{_bindir}/darktable
%{_bindir}/darktable-cltest
%{_bindir}/darktable-cli
%{_bindir}/darktable-generate-cache
%{_bindir}/darktable-chart
%{_bindir}/darktable-cmstest
%{_bindir}/darktable-rs-identify
%{_libdir}/darktable
%{_datadir}/applications/darktable.desktop
%{_datadir}/darktable
%dir %{_datadir}/appdata
%{_datadir}/appdata/darktable.appdata.xml
%{_datadir}/icons/hicolor/*/apps/darktable*
%{_mandir}/man1/darktable*.1*
%if %{with translated_manpages}
%{_mandir}/*/man1/darktable*.1*
%endif
%files doc
%defattr(-,root,root)
%doc darktable-*.pdf
%changelog