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.
This commit is contained in:
Kalev Lember 2020-04-01 22:30:36 +02:00
parent d5abadba52
commit c8d80b1773

View File

@ -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