%global latest_git_commit c37c34fa1c1cbf4b0b96d0397705e3ec3c70309d %global shortened_git_commit %(c=%{latest_git_commit}; echo ${c:0:7}) %global date %(date +%Y%m%d) %global hour %(date +%H) %global base_pkg_name kiwix %define _disable_source_fetch 0 Name: %{base_pkg_name}-desktop-git Version: 2.5.0+%{date}.%{hour}.%{shortened_git_commit} Release: %autorelease License: GPL-3.0-or-later Summary: Kiwix desktop application URL: https://github.com/kiwix/kiwix-desktop Source0: %{url}/archive/%{latest_git_commit}/%{name}-%{latest_git_commit}.tar.gz Patch0: https://raw.githubusercontent.com/dangbroitsdon/copr-personal/refs/heads/main/git/patches/kiwix-desktop/disable-kiwix-dynamic-desktop-title.patch BuildRequires: lib%{base_pkg_name}-devel BuildRequires: libzim-devel BuildRequires: mustache-devel BuildRequires: pugixml-devel BuildRequires: qt6-linguist BuildRequires: qt6-qtbase-devel BuildRequires: qt6-qtwebengine-devel BuildRequires: qtsingleapplication-qt6-devel BuildRequires: aria2 BuildRequires: desktop-file-utils BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: libappstream-glib BuildRequires: make Requires: aria2%{?_isa} Requires: hicolor-icon-theme Requires: qt6-qtsvg%{?_isa} Requires: shared-mime-info # Required qt5-qtwebengine is not available on some arches. ExclusiveArch: %{qt6_qtwebengine_arches} %description The Kiwix-desktop is a view/manager of zim files for GNU/Linux and Windows. You can download and view your zim files as you which. %prep %autosetup -p1 -n %{name}-%{latest_git_commit} mkdir %{_vpath_builddir} sed -e "/static {/,+2d" -i %{name}.pro rm -rf subprojects %build pushd %{_vpath_builddir} %qmake PREFIX=%{_prefix} CONFIG+=qtsingleapplication .. popd %make_build -C %{_vpath_builddir} %install %make_install INSTALL_ROOT=%{buildroot} -C %{_vpath_builddir} %check appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.appdata.xml desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %files %doc ChangeLog README.md %license LICENSE %{_bindir}/%{name} %{_datadir}/icons/hicolor/*/apps/%{name}.* %{_datadir}/applications/*.desktop %{_datadir}/mime/packages/*.xml %{_metainfodir}/*.appdata.xml %changelog %autochangelog