Adapt flatpak conditionals for F39
Through Fedora 38, flatpaks were built as modules, which each Tracker-based app having their own build of tracker-miners with domain_ontology properly defined. As of Fedora 39, all /app builds use a common tag, and therefore there is only one tracker-miners build. Therefore, use a dummy app name (which must be different than org.freedesktop in order to trigger installation of the custom domain rule), and a script to handle the renaming which will need to be run during cleanup-commands in each app's container.yaml.
This commit is contained in:
parent
c0ab585b2c
commit
664a298a51
13
flatpak-fixup.sh
Executable file
13
flatpak-fixup.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
app=$1
|
||||
|
||||
for srv in Extract Files Files.Control; do
|
||||
sed -e "s|org.gnome.FlatpakApp|${app}|" -i /app/share/dbus-1/services/org.gnome.FlatpakApp.Tracker3.Miner.$srv.service ;
|
||||
mv /app/share/dbus-1/services/{org.gnome.FlatpakApp,${app}}.Tracker3.Miner.$srv.service ;
|
||||
done
|
||||
|
||||
sed -e "s|org.gnome.FlatpakApp|${app}|" -i /app/share/tracker3/domain-ontologies/org.gnome.FlatpakApp.domain.rule
|
||||
mv /app/share/tracker3/domain-ontologies/{org.gnome.FlatpakApp,${app}}.domain.rule
|
@ -1,6 +1,11 @@
|
||||
# This needs to be changed accordingly to the application for what tracker-miners is bundled,
|
||||
# e.g. for gnome-books, it would be org.gnome.Books
|
||||
%{!?domain_ontology: %global domain_ontology org.freedesktop}
|
||||
# e.g. for gnome-books, it would be org.gnome.Books. For F39+ flatpaks, this is done
|
||||
# in container.yaml cleanup-commands.
|
||||
%if 0%{?flatpak}
|
||||
%global domain_ontology org.gnome.FlatpakApp
|
||||
%else
|
||||
%global domain_ontology org.freedesktop
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} || 0%{?flatpak}
|
||||
%global with_enca 0
|
||||
@ -35,6 +40,7 @@ Summary: Tracker miners and metadata extractors
|
||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
||||
URL: https://gnome.pages.gitlab.gnome.org/tracker/
|
||||
Source0: https://download.gnome.org/sources/%{name}/3.6/%{name}-%{tarball_version}.tar.xz
|
||||
Source1: flatpak-fixup.sh
|
||||
|
||||
BuildRequires: asciidoc
|
||||
BuildRequires: gcc
|
||||
@ -127,6 +133,10 @@ This package contains various miners and metadata extractors for tracker.
|
||||
%install
|
||||
%meson_install
|
||||
|
||||
%if 0%{?flatpak}
|
||||
install -D -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{name}-flatpak-fixup.sh
|
||||
%endif
|
||||
|
||||
%find_lang tracker3-miners
|
||||
|
||||
|
||||
@ -160,6 +170,7 @@ This package contains various miners and metadata extractors for tracker.
|
||||
%endif
|
||||
%if 0%{?flatpak}
|
||||
%{_datadir}/tracker3/domain-ontologies/%{domain_ontology}.domain.rule
|
||||
%{_bindir}/%{name}-flatpak-fixup.sh
|
||||
%endif
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user