File luminance-hdr.spec of Package luminance-hdr
#
# spec file for package luminance-hdr
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2009 Buschmann <buschmann23@opensuse.org>
#
# 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/
#
Name: luminance-hdr
Version: 2.4.0
Release: 0
Summary: HDR Imaging Tool
License: GPL-2.0+
Group: Productivity/Graphics/Bitmap Editors
Url: http://qtpfsgui.sourceforge.net/
Source0: http://downloads.sourceforge.net/project/qtpfsgui/luminance/%{version}/%{name}-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE luminance-hdr_desktop.patch asterios.dramis@gmail.com -- Make the desktop file XDG compatible
Patch0: %{name}_desktop.patch
# PATCH-FIX-OPENSUSE luminance-hdr__CMakeLists.txt.patch toms@opensuse.org -- Added missing Qt5PrintSupport
Patch1: %{name}_CMakeLists.txt.patch
BuildRequires: OpenEXR-devel
BuildRequires: boost-devel
BuildRequires: cmake >= 2.8.11
BuildRequires: fftw3-threads-devel
BuildRequires: git
BuildRequires: gsl-devel
BuildRequires: libexiv2-devel
BuildRequires: libjpeg-devel
BuildRequires: liblcms2-devel
BuildRequires: libpng-devel
BuildRequires: libqt5-qttools-devel
BuildRequires: libraw-devel
BuildRequires: libraw-devel-static
BuildRequires: libtiff-devel
BuildRequires: perl
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(Qt5Concurrent)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Sql)
BuildRequires: pkgconfig(Qt5WebKit)
BuildRequires: pkgconfig(Qt5WebKitWidgets)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: pkgconfig(cfitsio)
Requires: libqt5_sql_backend
Recommends: hugin
Recommends: libQt5Sql5-sqlite
Provides: qtpfsgui = %{version}
Obsoletes: qtpfsgui < %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Luminance HDR is a graphical user interface that provides a workflow for HDR
imaging.
Supported features:
* Create an HDR file from a set of images (JPEG, TIFF 8bit and 16bit, RAW)
of the same scene taken at different exposure setting
* Save and load HDR files
* Rotate and resize HDR files
* Tonemap HDR images
* Projective Transformations
* Copy EXIF data between sets of images
* Supports internationalization
%package doc
Summary: Documentation for %{name}
Group: Productivity/Graphics/Bitmap Editors
Recommends: %{name} = %{version}
%description doc
Documentation and help files for %{name}
%lang_package
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
cd build
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
cmake \
-DCMAKE_SKIP_RPATH=ON \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
..
make %{?_smp_mflags}
%install
%cmake_install
%suse_update_desktop_file -r %{name} Qt Graphics 2DGraphics RasterGraphics Photography Viewer
# move documentation to the proper directory
mkdir -p %{buildroot}%{_docdir}/%{name}
mv %{buildroot}%{_datadir}/%{name}/{help,AUTHORS,Changelog,LICENSE,README} %{buildroot}%{_docdir}/%{name}
# move icons to the right size directory
mv %{buildroot}%{_datadir}/icons/hicolor/48x48 %{buildroot}%{_datadir}/icons/hicolor/32x32
# fixing wrong file end of line encoding
sed -i 's/\r//' %{buildroot}%{_docdir}/%{name}/help/en/style.css
%find_lang %{name} --with-qt --all-name
%files
%defattr(-,root,root)
%{_bindir}/%{name}
%{_bindir}/%{name}-cli
%{_datadir}/applications/%{name}.desktop
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/*
%dir %{_datadir}/icons/hicolor/*/apps
%{_datadir}/icons/hicolor/*/apps/luminance-hdr.png
%files lang -f %{name}.lang
%defattr(-,root,root)
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/i18n/
%files doc
%defattr(-,root,root)
%{_docdir}/%{name}/
%changelog