File QOwnNotes.spec of Package qownnotes

#
# spec file for package QOwnNotes
#
# Copyright (c) 2021 SUSE LLC
#
# 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:           QOwnNotes
Version:        21.10.14
Release:        0
Summary:        Plain-text file markdown note taking with Nextcloud integration

# The entire source code is MIT except bundled libs:
# BSD:          qdarkstyle
#               qkeysequencewidget
#               qmarkdowntextedit
#               singleapplication
#               simplecrypt
# MIT:          piwiktracker
#               md4c
# GPLv2         versionnumber
# GPLv3+        qttoolbareditor
# LGPLv2+       fakevim
#               kfuzzymatcher
#               sonnet
# Apache-2.0    diff_match_patch
License:        MIT and LGPL-2.1-or-later and BSD-3-Clause and LGPL-3.0-only and Apache-2.0 and LGPL-2.0-or-later and GPL-2.0-or-later
URL:            https://www.qownnotes.org
Source0:        %{name}-%{version}.tar

BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig
BuildRequires:  hicolor-icon-theme
BuildRequires:  update-desktop-files
BuildRequires:  cmake(Qt5)
BuildRequires:  cmake(Qt5Concurrent)
BuildRequires:  cmake(Qt5Core)
BuildRequires:  cmake(Qt5DBus)
BuildRequires:  cmake(Qt5LinguistTools)
BuildRequires:  cmake(Qt5Multimedia)
BuildRequires:  cmake(Qt5PrintSupport)
BuildRequires:  cmake(Qt5Sql)
BuildRequires:  cmake(Qt5Svg)
BuildRequires:  cmake(Qt5WebSockets)
BuildRequires:  cmake(Qt5X11Extras)
BuildRequires:  cmake(Qt5Xml)
BuildRequires:  cmake(Qt5XmlPatterns)
BuildRequires:  pkgconfig(appstream-glib)
BuildRequires:  pkgconfig(botan-2) >= 2.12.0

%description
QOwnNotes is the open source notepad with markdown support and todo list manager
for GNU/Linux, Mac OS X and Windows, that works together with the default notes
application of ownCloud and Nextcloud.

You are able to write down your thoughts with QOwnNotes and edit or search for
them later from your mobile device, like with CloudNotes or the
ownCloud/Nextcloud web-service.

The notes are stored as plain text files and are synced with
ownCloud's/Nextcloud's file sync functionality. Of course other software, like
Syncthing or Dropbox can be used too.

%lang_package

%prep
%setup -q
mkdir build

%build
# Build translations
# * https://github.com/pbek/QOwnNotes/issues/1744
lrelease-qt5 src/%{name}.pro

pushd build
%qmake5 \
    USE_SYSTEM_BOTAN=1 \
    ../src
popd

%install
pushd build
export INSTALL_ROOT=%{buildroot}
%make_install
popd

install -m 0644 -Dp obs/qownnotes.appdata.xml %{buildroot}/%{_datadir}/metainfo/qownnotes.appdata.xml
%suse_update_desktop_file PBE.%{name}
%find_lang %{name} --with-qt

%files
%license LICENSE
%doc README.md CHANGELOG.md
%{_bindir}/%{name}
%{_datadir}/applications/*.desktop
%dir %{_datadir}/icons/hicolor/*
%dir %{_datadir}/icons/hicolor/*/apps
%{_datadir}/icons/hicolor/*/*/*.png
%{_datadir}/icons/hicolor/scalable/*/*.svg
%dir %{_datadir}/metainfo
%{_datadir}/metainfo/*.xml

%files lang -f %{name}.lang
# not added automatically for whatever reason
%dir %{_datadir}/qt5/translations
%{_datadir}/qt5/translations/%{name}_ceb.qm
%{_datadir}/qt5/translations/%{name}_fil.qm
%{_datadir}/qt5/translations/%{name}_hil.qm

%changelog
openSUSE Build Service is sponsored by