File kraft.spec of Package kraft

#
# spec file for package kraft
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2007-2011 Klaas Freitag <freitag@kde.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:           kraft
Url:            http://volle-kraft-voraus.de

Version:        0.80
Release:        0
Summary:        KDE software to manage office documents in the office
License:        GPL-2.0-or-later AND LGPL-2.1-or-later
Group:          Productivity/Office/Other
Source0:        kraft-%{version}.tar.xz

%define build_with_akonadi 1

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%if 0%{?suse_version}
# requires need to be python2-PyPDF2 for later distros
Requires:       python-PyPDF2
Requires:       python-libxml2
Requires:       python-reportlab

%if 0%{?build_with_akonadi}
BuildRequires:  akonadi-contact-devel
%endif
BuildRequires:  extra-cmake-modules
BuildRequires:  kcontacts-devel
BuildRequires:  ki18n-devel
BuildRequires:  kxmlgui-devel
BuildRequires:  libctemplate-devel
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(Qt5Core) >= 5.5.0
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Sql)
BuildRequires:  pkgconfig(Qt5Widgets)
%endif

%if 0%{?fedora_version}
   # Still completely bonkers
Requires:       kdepim-runtime
Requires:       pyPdf
Requires:       qt >= 4.7
Requires:       qt-x11 >= 4.7
Requires:       sqlite

BuildRequires:  ctemplate-devel
BuildRequires:  kdelibs-devel
BuildRequires:  kdepimlibs-devel
%endif

%description
Kraft is KDE software to help to create and manage office documents such as
offers and invoices in the small enterprise.

It supports easy document creation, templates with calculation, customer management
through the KDE addressbook, highly configurable PDF output and more.

See the website http://volle-kraft-voraus.de for more information.

%prep
%setup -q

%build

%cmake_kf5 -d build
%make_jobs

%install
%kf5_makeinstall -C build
chmod 755 %{buildroot}%{_datadir}/kraft/tools/erml2pdf.py

%if %{?suse_version:1}0
%suse_update_desktop_file -G %{name} %{name} Office Finance
%endif

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%clean
  rm -rf %{buildroot}

%files
%defattr(-,root,root)
%{_bindir}/kraft
%if 0%{?build_with_akonadi}
%{_bindir}/findcontact
%endif
%{_datadir}/applications/kraft.desktop
%{_datadir}/appdata/kraft.appdata.xml
%{_datadir}/icons/*/*/*/*.png
%{_datadir}/icons/*/*/*/*.svg
%{_datadir}/config.kcfg/*
%{_datadir}/kraft/
%{_datadir}/kxmlgui5/kraft/kraftui.rc
%{_datadir}/kxmlgui5/kraft/katalogview.rc
%{_datadir}/locale/*/LC_MESSAGES/kraft.mo

%dir %{_datadir}/config.kcfg
%dir %{_datadir}/kxmlgui5/kraft
%doc AUTHORS COPYING README.md Changes.txt Releasenotes.txt TODO

%changelog
openSUSE Build Service is sponsored by