File qownnotes.spec of Package qownnotes

%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)
Requires:       qt6-qtsvg
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 -S ./src \
    -DQON_QT6_BUILD=ON \
    -DUSE_QLITE_HTML=ON \
    -DCMAKE_POLICY_VERSION_MINIMUM=3.5
%cmake_build

%install
%cmake_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 -f %{_name}.lang
%doc README.md CHANGELOG.md
%{_bindir}/%{_name}
%{_datadir}/applications/PBE.%{_name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{_name}.??g
%license LICENSE

%changelog
openSUSE Build Service is sponsored by