File qownnotes.spec of Package qownnotes
#
# spec file for package qownnotes
#
# Copyright (c) 2025 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/
#
%if 0%{?suse_version} >= 1600
%bcond_without botan
%endif
%define _name QOwnNotes
Name: qownnotes
Version: @SERVICE@
Release: 0
Summary: Plain-text file notepad and todo-list manager
License: GPL-2.0-or-later
Group: Productivity/Office/Other
URL: https://github.com/pbek/QOwnNotes
Source0: %{name}-%{version}.tar.xz
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: cmake(Qt6Concurrent)
BuildRequires: cmake(Qt6Core)
BuildRequires: cmake(Qt6Gui)
BuildRequires: cmake(Qt6LinguistTools)
BuildRequires: cmake(Qt6Network)
BuildRequires: cmake(Qt6PrintSupport)
BuildRequires: cmake(Qt6Qml)
BuildRequires: cmake(Qt6Sql)
BuildRequires: cmake(Qt6Svg)
BuildRequires: cmake(Qt6WebSockets)
BuildRequires: cmake(Qt6Widgets)
BuildRequires: cmake(Qt6Xml)
%{?with_botan:BuildRequires: pkgconfig(botan-3)}
Requires: qt6-sql-sqlite
%requires_eq libQt6Svg6
Recommends: %{name}-lang
Suggests: myspell-en_US
Suggests: myspell-ru_RU
%{!?with_botan:Provides: bundled(libbotan)}
Provides: bundled(libdiff_match_patch)
Provides: bundled(libfakevim)
Provides: bundled(libqhotkey)
%description
QOwnNotes is the open source notepad with Markdown support and todo list
manager for GNU/Linux, macOS and Windows, that works together with
Nextcloud Notes and ownCloud Notes.
%lang_package
%prep
%autosetup -p1
%build
%cmake_qt6 -S ./src \
-DQON_QT6_BUILD=ON \
-DUSE_QLITE_HTML=ON \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
%{?with_botan:-DBUILD_WITH_SYSTEM_BOTAN=ON}
%{nil}
%{qt6_build}
%install
%{qt6_install}
desktop-file-edit --set-key=Categories --set-value="Utility;X-SyncUtility" \
%{buildroot}%{_datadir}/applications/PBE.%{_name}.desktop
%find_lang %{_name} --with-qt
%check
desktop-file-validate %{buildroot}%{_datadir}/applications/PBE.%{_name}.desktop
%files
%doc README.md CHANGELOG.md
%{_bindir}/%{_name}
%{_datadir}/applications/PBE.%{_name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{_name}.??g
%license LICENSE
%files lang -f %{_name}.lang
%dir %{_datadir}/%{_name}
%dir %{_datadir}/%{_name}/translations
%if 0%{?sle_version}
%{_datadir}/%{_name}/translations/%{_name}_???.qm
%endif
%changelog