File digikam.spec of Package digikam

# spec file for package digikam
# Copyright (c) 2011 SUSE LINUX Products 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

Name:           digikam
Version:        2.2.0
Release:        1
License:        GPL-2.0+
Summary:        A KDE Photo Manager
Group:          Productivity/Graphics/Viewers
# PATCH-FIX-OPENSUSE digikam-buildtime.patch -- Remove build time references so build-compare can do its work
Patch0:         digikam-buildtime.patch
# PATCH-FIX-UPSTREAM add_mimetype_bnc629393.diff bnc#629393 kde#261627 -- Add MimeTypes to desktop file for better integration in GNOME
Patch1:         add_mimetype_bnc629393.diff
# PATCH-FIX-OPENSUSE digikam-external-libs.patch -- Compile with external libs
Patch2:         digikam-external-libs.patch
BuildRequires:  boost-devel
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  lensfun-devel
BuildRequires:  libgphoto2-devel
BuildRequires:  libjasper-devel
BuildRequires:  libkdcraw-devel
BuildRequires:  libkde4-devel
BuildRequires:  libkdepimlibs4-devel
BuildRequires:  libkexiv2-devel
BuildRequires:  libkface-devel
BuildRequires:  libkgeomap-devel
BuildRequires:  libkipi-devel
BuildRequires:  liblcms-devel
BuildRequires:  liblqr-devel
BuildRequires:  libsoprano-devel
BuildRequires:  libusb-1_0-devel
BuildRequires:  shared-desktop-ontologies-devel
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
Requires:       kipi-plugins >= 2.1.0
Recommends:     %{name}-doc
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

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
Group:          Documentation/HTML
BuildArch:      noarch

%description doc
This package contains the documentation for digikam

%setup -q
rm po/*/kipi*

# 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')
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" core/digikam/utils/version.h.cmake

%cmake_kde4 -d build -- -DENABLE_INTERNALMYSQL=FALSE

cd build
cd ..

rm -rf %{buildroot}%{_kde4_htmldir}/en/kipi-plugins

# Not needed, the package doesn't actually provide any shared libraries
rm -f %{buildroot}%{_kde4_libdir}/
rm -f %{buildroot}%{_kde4_libdir}/

%if 0%{?suse_version}
%suse_update_desktop_file -r %{name} Qt KDE Graphics Photography
%suse_update_desktop_file -G "Photo Editor" -r showfoto Qt KDE Graphics Photography

%find_lang %{name} --all-name
%fdupes -s %{buildroot}

%post   -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%doc core/ChangeLog core/NEWS core/README core/TODO

%files doc
%doc %{_kde4_htmldir}/en/digikam/
%doc %{_kde4_htmldir}/en/showfoto/
%doc %{_mandir}/man1/cleanup_digikamdb.1%{ext_man}
%doc %{_mandir}/man1/digitaglinktree.1%{ext_man}

%files lang -f %{name}.lang
%exclude %{_kde4_htmldir}/en/digikam
%exclude %{_kde4_htmldir}/en/showfoto

openSUSE Build Service is sponsored by