File kiwix-desktop.spec of Package kiwix-desktop
#
# spec file for package kiwix-desktop
#
# Copyright (c) 2021 Samu Voutilainen <kiwix-desktop@smar.fi>
#
# 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.
Name: kiwix-desktop
Version: 2.0.5
Release: 0
Summary: Desktop offline reader for ZIM files
License: GPL-3.0
Group: Productivity/Other
Url: https://github.com/kiwix/kiwix-desktop
Source0: %{name}-%{version}.tar.xz
BuildRequires: libkiwix-devel
BuildRequires: libqt5-qtbase-devel
BuildRequires: libqt5-qtwebengine-devel
BuildRequires: update-desktop-files
Requires: aria2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The Kiwix Desktop is a viewer/manager of ZIM files for GNU/Linux and Microsoft Windows OSes.
%prep
%autosetup -p1
%build
qmake-qt5 QMAKE_CFLAGS+="%optflags" QMAKE_CXXFLAGS+="%optflags" QMAKE_STRIP="/bin/true" PREFIX="%{_prefix}"
%make_build
%install
make install INSTALL_ROOT="%buildroot"
# This is kind of silly, but Education alone is not allowed category, so this allows us to
# circumvent the restriction.
%suse_update_desktop_file -r -G "Offline wiki reader" org.kiwix.desktop Qt Education Languages
%files
%defattr(-,root,root,-)
%{_bindir}/kiwix-desktop
%{_datadir}/applications/org.kiwix.desktop.desktop
%{_datadir}/metainfo/org.kiwix.desktop.appdata.xml
%{_datadir}/mime/packages/org.kiwix.desktop-mime.xml
%{_datadir}/icons/hicolor
%changelog