From c8d80b1773c2685b2de5d173d2a67cb5c4c4f276 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Wed, 1 Apr 2020 22:30:36 +0200 Subject: [PATCH] Fix the build We can't conditionally include the flatpak patch as the flatpak macro isn't defined when building the srpm in koji, which means that the patch doesn't get included in the srpm and the flatpak build fails due to not finding the patch file. As a fix, change it so that the flatpak patch is always included in the srpm, but only conditionally applied when building for flatpak. While at this, also guard gschema.xml %files entry with 0%{?flatpak} to fix the non-flatpak build. --- gnome-extensions-app.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gnome-extensions-app.spec b/gnome-extensions-app.spec index 11a14e0..4520559 100644 --- a/gnome-extensions-app.spec +++ b/gnome-extensions-app.spec @@ -10,9 +10,7 @@ License: GPLv2+ URL: https://gitlab.gnome.org/GNOME/%{source_name} Source0: https://download.gnome.org/sources/%{source_name}/3.36/%{source_name}-%{version}.tar.xz -%if 0%{?flatpak} Patch0: 0001-extensions-app-Add-compatibility-with-GNOME-3.34.patch -%endif BuildRequires: gcc BuildRequires: gettext @@ -37,7 +35,12 @@ GNOME Shell extensions. %prep -%autosetup -n %{source_name}-%{version} -S git +%setup -q -n %{source_name}-%{version} + +%if 0%{?flatpak} +%patch0 -p1 +%endif + %{_vpath_srcdir}/generate-translations.sh @@ -62,7 +65,9 @@ rm -rf %{buildroot}/%{_datadir}/%{name}/gir-1.0 %{_bindir}/%{exec_name} %{_datadir}/applications/%{bus_name}.desktop %{_datadir}/dbus-1/services/%{bus_name}.service +%if 0%{?flatpak} %{_datadir}/glib-2.0/schemas/%{bus_name}.gschema.xml +%endif %{_datadir}/metainfo/%{bus_name}.metainfo.xml %{_datadir}/icons/hicolor/scalable/apps/%{bus_name}.svg %{_datadir}/icons/hicolor/scalable/apps/%{bus_name}.Devel.svg