digikam/digikam.spec

312 lines
10 KiB
RPMSpec

#
# spec file for package digikam
#
# Copyright (c) 2018 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 https://bugs.opensuse.org/
#
Name: digikam
Version: 5.9.0
Release: 0
Summary: A KDE Photo Manager
License: GPL-2.0-or-later
Group: Productivity/Graphics/Viewers
Url: http://www.digikam.org/
Source0: http://download.kde.org/stable/%{name}/%{name}-%{version}.tar.xz
# PATCH-FIX-OPENSUSE 0001-Disable-detection-of-OpenGL-for-GLES-platforms.patch -- The OpenGL slideshow depends on Desktop GL, see kde#383715
Patch0: 0001-Disable-detection-of-OpenGL-for-GLES-platforms.patch
# PATCH-FIX-OPENSUSE
Patch1: 0001-Revert-replace-obsolete-qSort-function.patch
# PATCH-FIX-OPENSUSE
Patch2: 0002-Revert-replace-obsolete-qSort-function.patch
# PATCH-FIX-OPENSUSE
Patch3: Lower-minimum-exiv2-version.patch
# PATCH-FEATURE-UPSTREAM
Patch4: Add-QtWebEngine-support.patch
# PATCH-FIX-UPSTREAM
Patch5: fix-black-Welcome-page-by-clicking-on-a-link.patch
# PATCH-FIX-UPSTREAM -- fix build with exiv2-0.27
Patch6: add-support-for-Exiv2-0.27.patch
Patch7: be-compatible-with-backward-0.26.patch
Patch8: adjust-find-cmake-script-to-exiv2-0.27-RC1.patch
Patch9: first-patch-to-be-compatible-with-Exiv2-0.27.patch
Patch10: f27ab9c1051bd0a0.patch
Patch11: fix-compile.patch
#This pulls in QWebEngine, which is not available on ppc64
%ifarch %ix86 x86_64 %arm aarch64 mips mips64
BuildRequires: akonadi-contact-devel
BuildRequires: pkgconfig(Qt5WebEngineWidgets)
%else
BuildRequires: pkgconfig(Qt5WebKitWidgets)
%endif
BuildRequires: QtAV-devel >= 1.12
BuildRequires: bison
BuildRequires: boost-devel
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: graphviz-devel
BuildRequires: gtk2-devel
BuildRequires: karchive-devel
BuildRequires: kconfig-devel
BuildRequires: kcoreaddons-devel
BuildRequires: kdoctools-devel
BuildRequires: kfilemetadata5-devel
BuildRequires: ki18n-devel
BuildRequires: kiconthemes-devel
BuildRequires: kio-devel
BuildRequires: knotifications-devel
BuildRequires: knotifyconfig-devel
BuildRequires: kservice-devel
BuildRequires: kwindowsystem-devel
BuildRequires: kxmlgui-devel
BuildRequires: lensfun
BuildRequires: lensfun-devel
BuildRequires: libeigen3-devel
BuildRequires: libexiv2-devel >= 0.25
BuildRequires: libexpat-devel
BuildRequires: libgcrypt-devel
BuildRequires: libgpod-devel
BuildRequires: libjasper-devel
BuildRequires: libkipi-devel >= 16.04.0
BuildRequires: libksane-devel >= 15.12.0
BuildRequires: liblcms2-devel
BuildRequires: liblqr-devel
BuildRequires: libmediawiki-devel
BuildRequires: libmysqlclient-devel
BuildRequires: libmysqld-devel
BuildRequires: libpgf-devel
BuildRequires: libtiff-devel
BuildRequires: libusb-devel
BuildRequires: marble-devel
BuildRequires: mysql
BuildRequires: opencv-devel
BuildRequires: solid-devel
BuildRequires: threadweaver-devel >= 5.1.0
BuildRequires: update-desktop-files
BuildRequires: cmake(KF5CalendarCore)
BuildRequires: pkgconfig(Qt5Concurrent)
BuildRequires: pkgconfig(Qt5Core) >= 5.6.0
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5OpenGL)
BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Sql)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(Qt5X11Extras)
BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: pkgconfig(Qt5XmlPatterns)
BuildRequires: pkgconfig(libgphoto2) >= 2.4.0
Requires: kipi-plugins >= %{version}
Requires: libQt5Sql5-sqlite
Recommends: %{name}-doc
Recommends: %{name}-lang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Recommends: marble
Recommends: showfoto
# Got merged into libimageeditor in 5.2.0
Provides: %{name}-plugin-color = %{version}
Obsoletes: %{name}-plugin-color < %{version}
Provides: %{name}-plugin-decorate = %{version}
Obsoletes: %{name}-plugin-decorate < %{version}
Provides: %{name}-plugin-enhance = %{version}
Obsoletes: %{name}-plugin-enhance < %{version}
Provides: %{name}-plugin-fxfilters = %{version}
Obsoletes: %{name}-plugin-fxfilters < %{version}
Provides: %{name}-plugin-transform = %{version}
Obsoletes: %{name}-plugin-transform < %{version}
Obsoletes: digikam-libs < %{version}
%description
digiKam is a simple digital photo management application for KDE, which
allows you to import and organize your digital photos easily. The
photos can be organized in albums, which can be sorted chronologically,
by directory layout, or by custom collections. An easy-to-use interface
that enables you to connect to your camera and preview, download, or
delete your images, is provided.
%package doc
Summary: Documentation of Digikam
License: GFDL-1.2-only
Group: Documentation/HTML
BuildArch: noarch
%description doc
This package contains the documentation for digikam
%package -n kipi-plugins
Summary: KDE Plug-Ins for Image Manipulation
License: GPL-2.0-or-later
Group: Productivity/Graphics/Other
Recommends: ImageMagick
Recommends: enblend-enfuse
Recommends: hugin
Recommends: kipi-plugins-lang = %{version}
Obsoletes: kipi-plugins-acquireimage < %{version}
Obsoletes: kipi-plugins-geolocation < %{version}
Obsoletes: kipi-plugins5 < %{version}
Provides: kipi-plugins5 = %{version}
Obsoletes: kipi-plugin-icons < %{version}
Provides: kipi-plugin-icons = %{version}
%description -n kipi-plugins
A set of plug-ins for the KDE KIPI interface, used by some KDE imaging
applications.
%package -n showfoto
Summary: DigiKam: Showfoto
License: GPL-2.0-or-later
Group: Productivity/Graphics/Viewers
Supplements: %{name}
%description -n showfoto
Additional program to browse and view photos
%package -n libdigikamcore5
Summary: The main digikam libraries
License: GPL-2.0-or-later
Group: Development/Libraries/KDE
%description -n libdigikamcore5
The main digikam libraries that are being shared between showfoto and digikam
%lang_package
%lang_package -n kipi-plugins
%prep
%setup -q -n %{name}-%{version}
%ifarch %arm aarch64
# Disable OpenGL slideshow on embedded platforms
%patch0 -p1
%endif
%if 0%{?suse_version} < 1320
%patch1 -p1
%patch2 -p1
%patch3 -p1
%endif
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
# Remove build time references so build-compare can do its work
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M')
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" core/app/utils/digikam_version.h.cmake.in
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/g" extra/kipi-plugins/common/libkipiplugins/tools/kpversion.h.cmake.in
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/g" core/libs/dimg/filters/greycstoration/cimg/CImg.h
sed -i "s/__TIME__/\"$FAKE_BUILDTIME\"/g" core/libs/dimg/filters/greycstoration/cimg/CImg.h
# Workaround for kde#369517 - vkontakte installs translations even if not built
rm -f po/*/kipiplugin_vkontakte.po
%build
%ifarch %ix86 x86_64 %arm aarch64 mips mips64
%cmake_kf5 -d build -- -DENABLE_APPSTYLES=ON -DENABLE_MEDIAPLAYER=ON -DENABLE_QWEBENGINE=ON
%else
%cmake_kf5 -d build -- -DENABLE_APPSTYLES=ON -DENABLE_MEDIAPLAYER=ON
%endif
%make_jobs VERBOSE=1
%install
%kf5_makeinstall -C build
# Not needed, the package doesn't actually provide any shared libraries
rm -f %{buildroot}%{_kf5_libdir}/libdigikamcore.so
rm -f %{buildroot}%{_kf5_libdir}/libdigikamdatabase.so
rm -f %{buildroot}%{_kf5_libdir}/libdigikamgui.so
rm -f %{buildroot}%{_kf5_libdir}/libKF5kipiplugins.so
%if 0%{?suse_version}
%suse_update_desktop_file -r org.kde.digikam Qt KDE Graphics Photography
%suse_update_desktop_file -r org.kde.showfoto Qt KDE Graphics Photography
%endif
%find_lang %{name} --without-kde
%find_lang kipiplugins kipiplugin.lang --without-kde
for i in dropbox googleservices sendimages facebook flashexport flickr imageshack imgur kmlexport piwigo printimages rajce remotestorage sendimages smug yandexfotki
do
%find_lang kipiplugin_$i kipiplugin.lang
done
%fdupes -s %{buildroot}
%post -n libdigikamcore5 -p /sbin/ldconfig
%postun -n libdigikamcore5 -p /sbin/ldconfig
%post -n kipi-plugins -p /sbin/ldconfig
%postun -n kipi-plugins -p /sbin/ldconfig
%files
%{_bindir}/digikam
%{_bindir}/digitaglinktree
%{_bindir}/cleanup_digikamdb
%{_kf5_applicationsdir}/org.kde.digikam.desktop
%_kf5_iconsdir/hicolor/*/apps/digikam.*
%_kf5_iconsdir/hicolor/*/apps/expoblending.*
%_kf5_iconsdir/hicolor/*/actions/
%_datadir/digikam/
%dir %_datadir/solid
%dir %_datadir/solid/actions
%_datadir/solid/actions/digikam-opencamera.desktop
%_datadir/kxmlgui5/digikam/
%_datadir/knotifications5/digikam.notifyrc
%{_kf5_appstreamdir}/org.kde.digikam.appdata.xml
%_kf5_iconsdir/hicolor/*/apps/panorama.*
%files -n showfoto
%{_bindir}/showfoto
%{_kf5_applicationsdir}/org.kde.showfoto.desktop
%_kf5_iconsdir/hicolor/*/apps/showfoto.*
%_datadir/showfoto/
%_datadir/kxmlgui5/showfoto/
%{_kf5_appstreamdir}/org.kde.showfoto.appdata.xml
%files -n libdigikamcore5
%license COPYING*
%doc core/{AUTHORS,ChangeLog,NEWS,README.md}
%{_libdir}/libdigikam*.so*
%files doc
%license doc/COPYING.DOC
%doc %{_mandir}/man1/cleanup_digikamdb.1%{ext_man}
%doc %{_mandir}/man1/digitaglinktree.1%{ext_man}
%doc %{_kf5_htmldir}/*/
%files lang -f %{name}.lang
%files -n kipi-plugins
%license COPYING*
%doc extra/kipi-plugins/{AUTHORS,ChangeLog,NEWS,README,TODO}
%_libdir/libKF5kipiplugins.so*
%{_kf5_plugindir}/kipiplugin_*.so
%{_kf5_applicationsdir}/kipiplugins.desktop
%{_kf5_iconsdir}/hicolor/*/apps/kipi-*.*
%{_datadir}/kipiplugin_*/
%{_kf5_servicesdir}/kipiplugin_*.desktop
%{_kf5_kxmlguidir}/kipi/
%files -n kipi-plugins-lang -f kipiplugin.lang
%changelog