File photivo.spec of Package photivo
#
# spec file for package Photivo
#
# Copyright (c) 2011-2023 Sergey Salnikov <salsergey@gmail.com>
#
# 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.
#
%define _unpackaged_files_terminate_build 0
%if 0%{?fedora} > 26 || 0%{?mageia}
%global debug_package %{nil}
%endif
Name: photivo
Summary: Photo processor
Version: 1
Release: 1
Group: Productivity/Graphics/Other
License: GPL-3.0
Url: http://www.photivo.org/
Source0: %{name}-%{version}.tar.bz2
#%if 0%{?sle_version} >= 150200 && 0%{?sle_version} <= 150600 && 0%{?is_opensuse}
#Patch0: old-gcc.patch
#%endif
BuildRequires: cmake
BuildRequires: fftw3-devel
BuildRequires: gimp-devel
%if (0%{?suse_version} == 1315 && 0%{?is_opensuse}) || 0%{?suse_version} > 1320 || 0%{?fedora} > 21 || 0%{?mageia}
BuildRequires: lensfun-devel >= 0.3.0
%else
BuildRequires: lensfun-devel < 0.3.0
%endif
BuildRequires: libbz2-devel
BuildRequires: libjasper-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libraw-devel
BuildRequires: libtiff-devel
BuildRequires: libwmf-devel
BuildRequires: libxml2-devel
%if 0%{?suse_version} == 1315 || 0%{?suse_version} > 1320
BuildRequires: libqt5-qtbase-devel
%else
%if 0%{?fedora} > 21
BuildRequires: qt5-qtbase-devel
%else
BuildRequires: qtbase5-common-devel
%endif
%endif
%if 0%{?mdkversion}
BuildRequires: libGraphicsMagick3
BuildRequires: libgomp-devel
BuildRequires: libpython-devel
%ifarch x86_64
BuildRequires: lib64stdc++6
%else
BuildRequires: libstdc++6
%endif
%else
BuildRequires: mercurial
%endif
%if 0%{?fedora}
BuildRequires: GraphicsMagick-c++-devel
BuildRequires: gcc-c++
BuildRequires: exiv2-devel
BuildRequires: lcms2-devel
BuildRequires: liblqr-1-devel
%else
%if 0%{?suse_version} > 1310
BuildRequires: libGraphicsMagickWand-Q16-2
%else
BuildRequires: libGraphicsMagickWand2
%endif
BuildRequires: libGraphicsMagick++-devel
BuildRequires: libexiv2-devel
BuildRequires: liblcms2-devel
BuildRequires: liblqr-devel
%endif
%if 0%{?fedora} > 16
BuildRequires: kmod
%endif
%if 0%{?suse_version}
BuildRequires: update-desktop-files
Recommends: %{name}-gimp
Recommends: kipi-plugins-photivotool
%endif
%if 0%{?suse_version}
%if (0%{?suse_version} == 1315 && 0%{?is_opensuse}) || 0%{?suse_version} > 1320
Requires: liblensfun0 >= 0.3.0
%else
Requires: liblensfun0 < 0.3.0
%endif
%endif
%if 0%{?fedora}
%if 0%{?fedora} > 21
Requires: lensfun >= 0.3.0
%else
Requires: lensfun < 0.3.0
%endif
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Photivo is a free and open source photo processor. It handles your RAW files as well as your bitmap files in a non-destructive 16 bit processing pipe with integrated gimp export and batch mode.
Authors:
--------
Michael Munzert <mail@mm-log.com>
Bernd Schoeler <brjohn@brother-john.net>
%prep
%setup -q -n %{name}-%{version}
#%if 0%{?sle_version} >= 150200 && 0%{?sle_version} <= 150600 && 0%{?is_opensuse}
#%patch0 -p1
#%endif
%build
cmake -DWITH_GIMP=OFF -DBUILD_PHOTIVO_TO_GIMP_PLUGIN=OFF -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_POLICY_VERSION_MINIMUM=3.5 .
make %{?_smp_mflags}
%install
%define _unpackaged_files_terminate_build 0
%makeinstall DESTDIR=%{buildroot}
%if 0%{?suse_version}
%suse_update_desktop_file -i photivo Photography
%endif
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_bindir}/photivo
%{_bindir}/ptClear
%{_datadir}/photivo
%{_datadir}/applications/photivo.desktop
%{_datadir}/pixmaps/photivo-appicon.png
%changelog