%bcond_with tests # enable tests (whatever they check)
%bcond_without kerberos # disable krb5 support
%bcond_without official # official Firefox branding
%bcond_with tests # enable tests (whatever they check)
%bcond_without kerberos # disable krb5 support
%bcond_without official # official Firefox branding
%bcond_with pgo # PGO-enabled build (requires working $DISPLAY == :100)
%bcond_without geckodriver # WebDriver
%bcond_with pgo # PGO-enabled build (requires working $DISPLAY == :100)
%bcond_without geckodriver # WebDriver
# - disabled shared_js - https://bugzilla.mozilla.org/show_bug.cgi?id=1039964
%bcond_with shared_js # shared libmozjs library [broken]
%bcond_without system_icu # build without system ICU
# - disabled shared_js - https://bugzilla.mozilla.org/show_bug.cgi?id=1039964
%bcond_with shared_js # shared libmozjs library [broken]
%bcond_without system_icu # build without system ICU
-%bcond_with system_cairo # build with system cairi (not supported in 60.0)
-%bcond_without clang # build using Clang/LLVM
+%bcond_with system_cairo # build with system cairo (not supported in 60.0)
+%bcond_with clang # build using Clang/LLVM
+%bcond_with legacy_exts # build with legacy extensions support
# On updating version, grab CVE links from:
# https://www.mozilla.org/security/known-vulnerabilities/firefox.html
# Release Notes:
# On updating version, grab CVE links from:
# https://www.mozilla.org/security/known-vulnerabilities/firefox.html
# Release Notes:
# The actual sqlite version (see RHBZ#480989):
%define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR)
# The actual sqlite version (see RHBZ#480989):
%define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR)
Summary: Firefox web browser
Summary(hu.UTF-8): Firefox web böngésző
Summary(pl.UTF-8): Firefox - przeglądarka WWW
Name: firefox
Summary: Firefox web browser
Summary(hu.UTF-8): Firefox web böngésző
Summary(pl.UTF-8): Firefox - przeglądarka WWW
Name: firefox
Release: 1
License: MPL v2.0
Group: X11/Applications/Networking
# http://archive.mozilla.org/pub/firefox/releases/%{version}/SOURCE
Source0: http://archive.mozilla.org/pub/firefox/releases/%{version}/source/firefox-%{version}.source.tar.xz
Release: 1
License: MPL v2.0
Group: X11/Applications/Networking
# http://archive.mozilla.org/pub/firefox/releases/%{version}/SOURCE
Source0: http://archive.mozilla.org/pub/firefox/releases/%{version}/source/firefox-%{version}.source.tar.xz
Patch4: %{name}-prefs.patch
Patch5: %{name}-pld-bookmarks.patch
Patch6: %{name}-no-subshell.patch
Patch4: %{name}-prefs.patch
Patch5: %{name}-pld-bookmarks.patch
Patch6: %{name}-no-subshell.patch
BuildRequires: gtk+2-devel >= 2:2.18.0
BuildRequires: gtk+3-devel >= 3.4.0
%{?with_kerberos:BuildRequires: heimdal-devel >= 0.7.1}
BuildRequires: gtk+2-devel >= 2:2.18.0
BuildRequires: gtk+3-devel >= 3.4.0
%{?with_kerberos:BuildRequires: heimdal-devel >= 0.7.1}
BuildRequires: libIDL-devel >= 0.8.0
BuildRequires: libatomic-devel
# DECnet (dnprogs.spec), not dummy net (libdnet.spec)
BuildRequires: libIDL-devel >= 0.8.0
BuildRequires: libatomic-devel
# DECnet (dnprogs.spec), not dummy net (libdnet.spec)
BuildRequires: libevent-devel >= 1.4.7
# standalone libffi 3.0.9 or gcc's from 4.5(?)+
BuildRequires: libffi-devel >= 6:3.0.9
BuildRequires: libevent-devel >= 1.4.7
# standalone libffi 3.0.9 or gcc's from 4.5(?)+
BuildRequires: libffi-devel >= 6:3.0.9
# requires libjpeg-turbo implementing at least libjpeg 6b API
BuildRequires: libjpeg-devel >= 6b
BuildRequires: libjpeg-turbo-devel
# requires libjpeg-turbo implementing at least libjpeg 6b API
BuildRequires: libjpeg-devel >= 6b
BuildRequires: libjpeg-turbo-devel
BuildRequires: libpng-devel >= 2:1.6.34
BuildRequires: libstdc++-devel >= 6:4.4
BuildRequires: libvpx-devel >= 1.5.0
BuildRequires: libpng-devel >= 2:1.6.34
BuildRequires: libstdc++-devel >= 6:4.4
BuildRequires: libvpx-devel >= 1.5.0
BuildRequires: llvm-devel
BuildRequires: nspr-devel >= 1:%{nspr_ver}
BuildRequires: nss-devel >= 1:%{nss_ver}
BuildRequires: llvm-devel
BuildRequires: nspr-devel >= 1:%{nspr_ver}
BuildRequires: nss-devel >= 1:%{nss_ver}
BuildRequires: rpmbuild(macros) >= 1.601
BuildRequires: rust >= 1.22.1
BuildRequires: sed >= 4.0
BuildRequires: rpmbuild(macros) >= 1.601
BuildRequires: rust >= 1.22.1
BuildRequires: sed >= 4.0
BuildRequires: startup-notification-devel >= 0.8
BuildRequires: xorg-lib-libX11-devel
BuildRequires: xorg-lib-libXScrnSaver-devel
BuildRequires: startup-notification-devel >= 0.8
BuildRequires: xorg-lib-libX11-devel
BuildRequires: xorg-lib-libXScrnSaver-devel
-# avoid using included headers (-I. is before HUNSPELL_CFLAGS)
-%{__rm} extensions/spellcheck/hunspell/src/{*.hxx,hunspell.h}
-# hunspell needed for factory including mozHunspell.h
-echo 'LOCAL_INCLUDES += $(MOZ_HUNSPELL_CFLAGS)' >> extensions/spellcheck/src/Makefile.in
-
-%patch0 -p2
ac_add_options --enable-default-toolkit=cairo-gtk3
ac_add_options --enable-extensions=default
%{?with_geckodriver:ac_add_options --enable-geckodriver}
ac_add_options --enable-default-toolkit=cairo-gtk3
ac_add_options --enable-extensions=default
%{?with_geckodriver:ac_add_options --enable-geckodriver}
ac_add_options --enable-readline
%{?with_shared_js:ac_add_options --enable-shared-js}
ac_add_options --enable-startup-notification
%{?with_system_cairo:ac_add_options --enable-system-cairo}
ac_add_options --enable-system-ffi
ac_add_options --enable-readline
%{?with_shared_js:ac_add_options --enable-shared-js}
ac_add_options --enable-startup-notification
%{?with_system_cairo:ac_add_options --enable-system-cairo}
ac_add_options --enable-system-ffi
ac_add_options --enable-system-sqlite
%{?with_official:ac_add_options --enable-official-branding}
ac_add_options --with-distribution-id=org.pld-linux
ac_add_options --enable-system-sqlite
%{?with_official:ac_add_options --enable-official-branding}
ac_add_options --with-distribution-id=org.pld-linux
ac_add_options --with-system-bz2
ac_add_options --with%{!?with_system_icu:out}-system-icu
ac_add_options --with-system-jpeg
ac_add_options --with-system-bz2
ac_add_options --with%{!?with_system_icu:out}-system-icu
ac_add_options --with-system-jpeg
# move arch independant ones to datadir
%{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/chrome
# move arch independant ones to datadir
%{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/chrome
%{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults
%{__mv} $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/{pref,preferences}
%{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults
%{__mv} $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/{pref,preferences}
ln -s ../../../share/%{name}/browser/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/defaults
ln -s ../../../share/%{name}/browser/extensions $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/extensions
ln -s ../../../share/%{name}/browser/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/defaults
ln -s ../../../share/%{name}/browser/extensions $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/extensions
sed 's,@LIBDIR@,%{_libdir},' %{SOURCE4} > $RPM_BUILD_ROOT%{_bindir}/firefox
chmod 755 $RPM_BUILD_ROOT%{_bindir}/firefox
sed 's,@LIBDIR@,%{_libdir},' %{SOURCE4} > $RPM_BUILD_ROOT%{_bindir}/firefox
chmod 755 $RPM_BUILD_ROOT%{_bindir}/firefox
%{_libdir}/%{name}/chrome.manifest
%{_libdir}/%{name}/browser/blocklist.xml
%{_libdir}/%{name}/browser/chrome.manifest
%{_libdir}/%{name}/chrome.manifest
%{_libdir}/%{name}/browser/blocklist.xml
%{_libdir}/%{name}/browser/chrome.manifest
%{_libdir}/%{name}/browser/omni.ja
%{_libdir}/%{name}/browser/features/activity-stream@mozilla.org.xpi
%{_libdir}/%{name}/browser/features/aushelper@mozilla.org.xpi
%{_libdir}/%{name}/browser/features/firefox@getpocket.com.xpi
%{_libdir}/%{name}/browser/omni.ja
%{_libdir}/%{name}/browser/features/activity-stream@mozilla.org.xpi
%{_libdir}/%{name}/browser/features/aushelper@mozilla.org.xpi
%{_libdir}/%{name}/browser/features/firefox@getpocket.com.xpi
%{_libdir}/%{name}/browser/features/formautofill@mozilla.org.xpi
%{_libdir}/%{name}/browser/features/onboarding@mozilla.org.xpi
%{_libdir}/%{name}/browser/features/screenshots@mozilla.org.xpi
%{_libdir}/%{name}/browser/features/webcompat@mozilla.org.xpi
%{_libdir}/%{name}/browser/features/formautofill@mozilla.org.xpi
%{_libdir}/%{name}/browser/features/onboarding@mozilla.org.xpi
%{_libdir}/%{name}/browser/features/screenshots@mozilla.org.xpi
%{_libdir}/%{name}/browser/features/webcompat@mozilla.org.xpi