File fidei.spec of Package fidei
#
# spec file for package fidei
#
# Copyright (c) 2022 Florian "sp1rit" <packaging@sp1rit.anonaddy.me>
# Copyright (c) 2022 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/
#
%global appid arpa.sp1rit.Fidei
Name: fidei
Version: 0.0.1658839165
Release: 0
Summary: Bible reader
License: AGPL-3.0
URL: https://github.com/sp1ritCS/fidei
Group: Productivity/Scientific/Other
Source0: %{name}-%{version}.tar.xz
BuildRequires: desktop-file-utils
BuildRequires: gcc
BuildRequires: meson
BuildRequires: metainfo(org.freedesktop.appstream.cli.metainfo.xml)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(pango)
BuildRequires: pkgconfig(gtk4)
BuildRequires: pkgconfig(libadwaita-1)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(icu-uc)
BuildRequires: xmlstarlet
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%lang_package
%else
# expaneded suse's %%lang_package macro
%package lang
Summary: Translations for package %{name}
Group: System/Localization
Requires: %{name} = %{version}
Provides: %{name}-lang-all = %{version}
BuildArch: noarch
%description lang
Provides translations for the "%{name}" package.
%endif
%description
Fidei is an offline GTK bible reader for GNOME, that making use of modern technologies like libadwaita
%prep
%autosetup -p1
%build
%if %{defined override_gcc}
export CC=%{override_gcc}
%endif
%meson
%meson_build
%install
%meson_install
%find_lang %{appid}
%if 0%{?suse_version}
%suse_update_desktop_file %{appid}
%endif
%check
desktop-file-validate %{buildroot}%{_datadir}/applications/%{appid}.desktop
appstreamcli validate --no-net --pedantic %{buildroot}%{_datadir}/metainfo/%{appid}.metainfo.xml || true
%files lang -f %{appid}.lang
%files
%license LICENSE.md
%doc README.md
%{_bindir}/%{name}
%dir %{_datadir}/%{appid}/
%{_datadir}/applications/%{appid}.desktop
%{_datadir}/glib-2.0/schemas/%{appid}.gschema.xml
%{_datadir}/icons/hicolor/scalable/apps/%{appid}.svg
%{_datadir}/metainfo/%{appid}.metainfo.xml
%changelog