Enable Gnome Shell Search provider for Fedora 40+, Don't ship firefox-x11 and firefox-wayland on Fedora 40+

This commit is contained in:
Martin Stransky 2023-12-18 22:05:27 +01:00
parent 2714c26204
commit 722aeaae74
3 changed files with 315 additions and 16 deletions

View File

@ -36,6 +36,11 @@ ExcludeArch: i686
%global build_with_clang 0
%endif
%global gnome_shell_search_provider 0
%if 0%{?fedora} >= 40
%global gnome_shell_search_provider 1
%endif
# Temporary disabled due to
# https://bugzilla.redhat.com/show_bug.cgi?id=1951606
%global enable_mozilla_crashreporter 0
@ -124,7 +129,7 @@ ExcludeArch: i686
%if %{?system_nss}
%global nspr_version 4.32
%global nspr_build_version %{nspr_version}
%global nss_version 3.94
%global nss_version 3.95
%global nss_build_version %{nss_version}
%endif
@ -205,6 +210,7 @@ Source43: print_failures
Source44: print-error-reftest
Source45: run-wayland-compositor
Source46: org.mozilla.firefox.SearchProvider.service
Source47: org.mozilla.firefox.desktop
# Build patches
#Patch3: mozilla-build-arm.patch
@ -466,6 +472,7 @@ debug %{name}, you want to install %{name}-debuginfo instead.
%global _find_debuginfo_opts %{limit_build -m 32768}
%endif
%if 0%{?fedora} < 40
%package x11
Summary: Firefox X11 launcher.
Requires: %{name}
@ -485,6 +492,7 @@ to run Firefox explicitly on Wayland.
%files wayland
%{_bindir}/firefox-wayland
%{_datadir}/applications/firefox-wayland.desktop
%endif
%if 0%{?run_firefox_tests}
%global testsuite_pkg_name %{name}-testresults
@ -868,15 +876,25 @@ DESTDIR=%{buildroot} make -C objdir install
mkdir -p %{buildroot}{%{_libdir},%{_bindir},%{_datadir}/applications}
# TODO
%if %{gnome_shell_search_provider}
# Install Gnome search provider files
mkdir -p %{buildroot}%{_datadir}/gnome-shell/search-providers
cp %{SOURCE34} %{buildroot}%{_datadir}/gnome-shell/search-providers
mkdir -p %{buildroot}%{_datadir}/dbus-1/services
cp %{SOURCE46} %{buildroot}%{_datadir}/dbus-1/services
%endif
%if %{gnome_shell_search_provider}
desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE47}
%else
# We can't use desktop-file-install as it refuses to install firefox.desktop file.
# We need to change it to org.mozilla.firefox.desktop and also update
# gnome shell default applications.
#
#desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE20}
cp %{SOURCE20} %{buildroot}%{_datadir}/applications
%endif
%if 0%{?fedora} < 40
desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE31}
desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE29}
%endif
# set up the firefox start script
rm -rf %{buildroot}%{_bindir}/firefox
@ -889,10 +907,12 @@ sed -i -e 's|%FLATPAK_ENV_VARS%|export TMPDIR="$XDG_CACHE_HOME/tmp"|' %{buildroo
sed -i -e 's|%FLATPAK_ENV_VARS%||' %{buildroot}%{_bindir}/firefox
%endif
%if 0%{?fedora} < 40
sed -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE30} > %{buildroot}%{_bindir}/firefox-x11
chmod 755 %{buildroot}%{_bindir}/firefox-x11
sed -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE28} > %{buildroot}%{_bindir}/firefox-wayland
chmod 755 %{buildroot}%{_bindir}/firefox-wayland
%endif
install -p -D -m 644 %{SOURCE23} %{buildroot}%{_mandir}/man1/firefox.1
@ -1014,12 +1034,6 @@ sed -e "s/__VERSION__/%{version}/" \
-e "s/__DATE__/$(date '+%F')/" \
%{SOURCE33} > %{buildroot}%{_datadir}/metainfo/firefox.appdata.xml
# Install Gnome search provider files
mkdir -p %{buildroot}%{_datadir}/gnome-shell/search-providers
cp %{SOURCE34} %{buildroot}%{_datadir}/gnome-shell/search-providers
mkdir -p %{buildroot}%{_datadir}/dbus-1/services
cp %{SOURCE46} %{buildroot}%{_datadir}/dbus-1/services
# Remove copied libraries to speed up build
rm -f %{buildroot}%{mozappdirdev}/sdk/lib/libmozjs.so
rm -f %{buildroot}%{mozappdirdev}/sdk/lib/libmozalloc.so
@ -1082,10 +1096,14 @@ fi
%dir %{_sysconfdir}/%{name}/*
%dir %{_datadir}/mozilla/extensions/*
%dir %{_libdir}/mozilla/extensions/*
%{_datadir}/applications/firefox.desktop
%{_datadir}/metainfo/*.appdata.xml
%{_datadir}/gnome-shell/search-providers/*.ini
%if %{gnome_shell_search_provider}
%{_datadir}/applications/org.mozilla.firefox.desktop
%{_datadir}/dbus-1/services/*
%{_datadir}/gnome-shell/search-providers/*.ini
%else
%{_datadir}/applications/firefox.desktop
%endif
%{_datadir}/metainfo/*.appdata.xml
%dir %{mozappdir}
%license %{mozappdir}/LICENSE
%{mozappdir}/browser/chrome
@ -1147,6 +1165,10 @@ fi
#---------------------------------------------------------------------
%changelog
* Mon Dec 18 2023 Martin Stransky <stransky@redhat.com>- 121.0-2
- Enable Gnome Shell Search provider for Fedora 40+
- Don't ship firefox-x11 and firefox-wayland on Fedora 40+
* Mon Dec 18 2023 Martin Stransky <stransky@redhat.com>- 121.0-1
- Updated to 121.0

277
org.mozilla.firefox.desktop Normal file
View File

@ -0,0 +1,277 @@
[Desktop Entry]
Version=1.0
Name=Firefox
GenericName=Web Browser
GenericName[ca]=Navegador web
GenericName[cs]=Webový prohlížeč
GenericName[es]=Navegador web
GenericName[fa]=مرورگر اینترنتی
GenericName[fi]=WWW-selain
GenericName[fr]=Navigateur Web
GenericName[hu]=Webböngésző
GenericName[it]=Browser Web
GenericName[ja]=
GenericName[ko]=
GenericName[nb]=Nettleser
GenericName[nl]=Webbrowser
GenericName[nn]=Nettlesar
GenericName[no]=Nettleser
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[sk]=Internetový prehliadač
GenericName[sv]=Webbläsare
Comment=Browse the Web
Comment[ca]=Navegueu per el web
Comment[cs]=Prohlížení stránek World Wide Webu
Comment[de]=Im Internet surfen
Comment[es]=Navegue por la web
Comment[fa]=صفحات شبکه جهانی اینترنت را مرور نمایید
Comment[fi]=Selaa Internetin WWW-sivuja
Comment[fr]=Navigue sur Internet
Comment[hu]=A világháló böngészése
Comment[it]=Esplora il web
Comment[ja]=
Comment[ko]=
Comment[nb]=Surf på nettet
Comment[nl]=Verken het internet
Comment[nn]=Surf på nettet
Comment[no]=Surf på nettet
Comment[pl]=Przeglądanie stron WWW
Comment[pt]=Navegue na Internet
Comment[pt_BR]=Navegue na Internet
Comment[sk]=Prehliadanie internetu
Comment[sv]=Surfa på webben
Exec=firefox %u
Icon=firefox
Terminal=false
Type=Application
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
StartupNotify=true
Categories=Network;WebBrowser;
Keywords=web;browser;internet;
Actions=new-window;new-private-window;profile-manager-window;
DBusActivatable=true
[Desktop Action new-window]
Name=Open a New Window
Name[ach]=Dirica manyen
Name[af]=Nuwe venster
Name[an]=Nueva finestra
Name[ar]=نافذة جديدة
Name[as]=
Name[ast]=Ventana nueva
Name[az]=Yeni Pəncərə
Name[be]=Новае акно
Name[bg]=Нов прозорец
Name[bn_BD]= (N)
Name[bn_IN]=
Name[br]=Prenestr nevez
Name[brx]= '(N)
Name[bs]=Novi prozor
Name[ca]=Finestra nova
Name[cak]=K'ak'a' tzuwäch
Name[cs]=Nové okno
Name[cy]=Ffenestr Newydd
Name[da]=Nyt vindue
Name[de]=Neues Fenster
Name[dsb]=Nowe wokno
Name[el]=Νέο παράθυρο
Name[en_GB]=New Window
Name[en_US]=New Window
Name[en_ZA]=New Window
Name[eo]=Nova fenestro
Name[es_AR]=Nueva ventana
Name[es_CL]=Nueva ventana
Name[es_ES]=Nueva ventana
Name[es_MX]=Nueva ventana
Name[et]=Uus aken
Name[eu]=Leiho berria
Name[fa]=پنجره جدید
Name[ff]=Henorde Hesere
Name[fi]=Uusi ikkuna
Name[fr]=Nouvelle fenêtre
Name[fy_NL]=Nij finster
Name[ga_IE]=Fuinneog Nua
Name[gd]=Uinneag ùr
Name[gl]=Nova xanela
Name[gn]=Ovetã pyahu
Name[gu_IN]= િ
Name[he]=חלון חדש
Name[hi_IN]= ि
Name[hr]=Novi prozor
Name[hsb]=Nowe wokno
Name[hu]=Új ablak
Name[hy_AM]=Նոր Պատուհան
Name[id]=Jendela Baru
Name[is]=Nýr gluggi
Name[it]=Nuova finestra
Name[ja]=
Name[ja_JP-mac]=
Name[ka]=
Name[kk]=Жаңа терезе
Name[km]=
Name[kn]= ಿಿ
Name[ko]=
Name[kok]=
Name[ks]=نئئ وِنڈو
Name[lij]=Neuvo barcon
Name[lo]=
Name[lt]=Naujas langas
Name[ltg]=Jauns lūgs
Name[lv]=Jauns logs
Name[mai]= ि
Name[mk]=Нов прозорец
Name[ml]=ി
Name[mr]=
Name[ms]=Tetingkap Baru
Name[my]=
Name[nb_NO]=Nytt vindu
Name[ne_NP]=
Name[nl]=Nieuw venster
Name[nn_NO]=Nytt vindauge
Name[or]= ି
Name[pa_IN]= ਿ
Name[pl]=Nowe okno
Name[pt_BR]=Nova janela
Name[pt_PT]=Nova janela
Name[rm]=Nova fanestra
Name[ro]=Fereastră nouă
Name[ru]=Новое окно
Name[sat]= ि (N)
Name[si]=
Name[sk]=Nové okno
Name[sl]=Novo okno
Name[son]=Zanfun taaga
Name[sq]=Dritare e Re
Name[sr]=Нови прозор
Name[sv_SE]=Nytt fönster
Name[ta]=ி
Name[te]= ి
Name[th]=
Name[tr]=Yeni pencere
Name[tsz]=Eraatarakua jimpani
Name[uk]=Нове вікно
Name[ur]=نیا دریچہ
Name[uz]=Yangi oyna
Name[vi]=Ca s mi
Name[wo]=Palanteer bu bees
Name[xh]=Ifestile entsha
Name[zh_CN]=
Name[zh_TW]=
Exec=firefox --new-window %u
[Desktop Action new-private-window]
Name=Open a New Private Window
Name[ach]=Dirica manyen me mung
Name[af]=Nuwe privaatvenster
Name[an]=Nueva finestra privada
Name[ar]=نافذة خاصة جديدة
Name[as]= ি
Name[ast]=Ventana privada nueva
Name[az]=Yeni Məxfi Pəncərə
Name[be]=Новае акно адасаблення
Name[bg]=Нов прозорец за поверително сърфиране
Name[bn_BD]= ি
Name[bn_IN]= ি
Name[br]=Prenestr merdeiñ prevez nevez
Name[brx]= '
Name[bs]=Novi privatni prozor
Name[ca]=Finestra privada nova
Name[cak]=K'ak'a' ichinan tzuwäch
Name[cs]=Nové anonymní okno
Name[cy]=Ffenestr Breifat Newydd
Name[da]=Nyt privat vindue
Name[de]=Neues privates Fenster
Name[dsb]=Nowe priwatne wokno
Name[el]=Νέο παράθυρο ιδιωτικής περιήγησης
Name[en_GB]=New Private Window
Name[en_US]=New Private Window
Name[en_ZA]=New Private Window
Name[eo]=Nova privata fenestro
Name[es_AR]=Nueva ventana privada
Name[es_CL]=Nueva ventana privada
Name[es_ES]=Nueva ventana privada
Name[es_MX]=Nueva ventana privada
Name[et]=Uus privaatne aken
Name[eu]=Leiho pribatu berria
Name[fa]=پنجره ناشناس جدید
Name[ff]=Henorde Suturo Hesere
Name[fi]=Uusi yksityinen ikkuna
Name[fr]=Nouvelle fenêtre de navigation privée
Name[fy_NL]=Nij priveefinster
Name[ga_IE]=Fuinneog Nua Phríobháideach
Name[gd]=Uinneag phrìobhaideach ùr
Name[gl]=Nova xanela privada
Name[gn]=Ovetã ñemi pyahu
Name[gu_IN]= િ
Name[he]=חלון פרטי חדש
Name[hi_IN]= ि ि
Name[hr]=Novi privatni prozor
Name[hsb]=Nowe priwatne wokno
Name[hu]=Új privát ablak
Name[hy_AM]=Սկսել Գաղտնի դիտարկում
Name[id]=Jendela Mode Pribadi Baru
Name[is]=Nýr huliðsgluggi
Name[it]=Nuova finestra anonima
Name[ja]=
Name[ja_JP-mac]=
Name[ka]=
Name[kk]=Жаңа жекелік терезе
Name[km]=
Name[kn]= ಿ ಿಿ
Name[ko]=
Name[kok]= ि
Name[ks]=نْو پرایوٹ وینڈو&amp;
Name[lij]=Neuvo barcon privou
Name[lo]=
Name[lt]=Naujas privataus naršymo langas
Name[ltg]=Jauns privatais lūgs
Name[lv]=Jauns privātais logs
Name[mai]= ि ि (W)
Name[mk]=Нов приватен прозорец
Name[ml]=ി
Name[mr]= ि
Name[ms]=Tetingkap Persendirian Baharu
Name[my]=New Private Window
Name[nb_NO]=Nytt privat vindu
Name[ne_NP]= ि
Name[nl]=Nieuw privévenster
Name[nn_NO]=Nytt privat vindauge
Name[or]= ି ି
Name[pa_IN]= ਿ
Name[pl]=Nowe okno prywatne
Name[pt_BR]=Nova janela privativa
Name[pt_PT]=Nova janela privada
Name[rm]=Nova fanestra privata
Name[ro]=Fereastră privată nouă
Name[ru]=Новое приватное окно
Name[sat]= ि ि (W )
Name[si]= (W)
Name[sk]=Nové okno v režime Súkromné prehliadanie
Name[sl]=Novo zasebno okno
Name[son]=Sutura zanfun taaga
Name[sq]=Dritare e Re Private
Name[sr]=Нови приватан прозор
Name[sv_SE]=Nytt privat fönster
Name[ta]=ி ி
Name[te]= ి ి
Name[th]=
Name[tr]=Yeni gizli pencere
Name[tsz]=Juchiiti eraatarakua jimpani
Name[uk]=Приватне вікно
Name[ur]=نیا نجی دریچہ
Name[uz]=Yangi maxfiy oyna
Name[vi]=Ca s riêng tư mi
Name[wo]=Panlanteeru biir bu bees
Name[xh]=Ifestile yangasese entsha
Name[zh_CN]=
Name[zh_TW]=
Exec=firefox --private-window %u
[Desktop Action profile-manager-window]
Name=Open the Profile Manager
Name[cs]=Správa profilů
Name[de]=Profilverwaltung öffnen
Name[fr]=Ouvrir le gestionnaire de profils
Exec=firefox --ProfileManager

View File

@ -1,5 +1,5 @@
[Shell Search Provider]
DesktopId=firefox.desktop
DesktopId=org.mozilla.firefox.desktop
BusName=org.mozilla.firefox.SearchProvider
ObjectPath=/org/mozilla/firefox/SearchProvider
Version=2