cfe71c
# Set for local builds only
cfe71c
%global disable_toolsets  0
cfe71c
735387
# Use system nspr/nss? FIXME
735387
%global system_nss        1
735387
%define use_bundled_ffi   0
3f6015
%define use_bundled_python 1
cfe71c
%define bundle_gnome_extension 0
735387
735387
# Don't use system hunspell for now
735387
%global system_hunspell   0
735387
%global system_sqlite     0
cfe71c
%global use_llvmts        1
735387
735387
%if 0%{?rhel} > 6
735387
%global system_ffi        1
735387
%else
735387
%global system_ffi        0
cfe71c
%global use_llvmts        0
0bcd21
%endif
735387
%if 0%{?rhel} < 8
735387
%global use_dts           1
0bcd21
%endif
0bcd21
3f6015
%if 0%{?rhel} == 7
3f6015
%define use_bundled_python 0
3f6015
%endif
3f6015
89baa1
%if 0%{?rhel} < 8
735387
%global use_rustts        1
89baa1
%endif
735387
%global dts_version       7
735387
%global rst_version       7
357fed
%global llvm_version      7
357fed
%if 0%{?rhel} == 8
357fed
%global rst_version       1.26
357fed
%global llvm_version      6.0
357fed
%endif
735387
cfe71c
%if 0%{?disable_toolsets}
cfe71c
%global use_rustts        0
cfe71c
%global use_dts           0
cfe71c
%global use_llvmts        0
cfe71c
%endif
cfe71c
735387
# Use system cairo?
735387
%global system_cairo      0
735387
735387
# Use system libvpx?
735387
%global system_libvpx     0
0bcd21
735387
# Use system libicu?
735387
%global system_libicu     0
735387
0bcd21
# Big endian platforms
735387
%ifarch ppc64 s390x
0bcd21
# Javascript Intl API is not supported on big endian platforms right now:
0bcd21
# https://bugzilla.mozilla.org/show_bug.cgi?id=1322212
735387
%global big_endian        1
0bcd21
%endif
0bcd21
735387
# Hardened build?
735387
%global hardened_build    1
0bcd21
735387
%global system_jpeg       1
0bcd21
735387
%ifarch %{ix86} x86_64
735387
%global run_tests         0
735387
%else
735387
%global run_tests         0
735387
%endif
735387
735387
# Build as a debug package?
735387
%global debug_build       0
735387
735387
%global default_bookmarks_file  %{_datadir}/bookmarks/default-bookmarks.html
735387
%global firefox_app_id  \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
735387
# Minimal required versions
735387
%global cairo_version 1.13.1
735387
%global freetype_version 2.1.9
735387
%if %{?system_libvpx}
735387
%global libvpx_version 1.4.0
735387
%endif
735387
735387
%if %{?system_nss}
735387
%global nspr_version 4.19.0
735387
# NSS/NSPR quite often ends in build override, so as requirement the version
735387
# we're building against could bring us some broken dependencies from time to time.
735387
#%global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536)
735387
%global nspr_build_version %{nspr_version}
735387
%global nss_version 3.36.0
735387
#%global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536)
735387
%global nss_build_version %{nss_version}
735387
%endif
0bcd21
0bcd21
%if %{?system_sqlite}
735387
%global sqlite_version 3.8.4.2
0bcd21
# The actual sqlite version (see #480989):
0bcd21
%global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536)
0bcd21
%endif
0bcd21
735387
%define bundled_python_version 2.7.13
735387
%define use_bundled_yasm        1
735387
735387
# GTK3 bundling
735387
%define avoid_bundled_rebuild 0
735387
%if 0%{?rhel} == 6
735387
%define bundle_gtk3             1
735387
# In-tree libffi is able to build on following platforms, we have to bundle it for the rest
735387
%ifnarch x86_64 i686 aarch64
735387
%define use_bundled_ffi         1
735387
%endif
735387
%endif
735387
735387
%define gtk3_nvr 3.22.26-1
735387
%define gtk3_install_path %{mozappdir}/bundled
735387
735387
%if 0%{?bundle_gtk3}
735387
# We could use %%include, but in %%files, %%post and other sections, but in these
735387
# sections it could lead to syntax errors about unclosed %%if. Work around it by
735387
# using the following macro
735387
%define include_file() %{expand:%(cat '%1')}
735387
%endif
735387
735387
735387
%global mozappdir     %{_libdir}/%{name}
735387
%global mozappdirdev  %{_libdir}/%{name}-devel-%{version}
735387
%global langpackdir   %{mozappdir}/distribution/extensions
735387
%global tarballdir    %{name}-%{version}
735387
%global pre_version   esr
735387
735387
%global official_branding       1
735387
%global build_langpacks         1
735387
735387
%global enable_mozilla_crashreporter       0
735387
%if !%{debug_build}
735387
%ifarch %{ix86} x86_64
735387
%global enable_mozilla_crashreporter       0
735387
%endif
735387
%endif
735387
0bcd21
Summary:        Mozilla Firefox Web browser
0bcd21
Name:           firefox
2bef7d
Version:        60.6.0
2bef7d
Release:        3%{?pre_tag}%{?dist}
735387
URL:            https://www.mozilla.org/firefox/
0bcd21
License:        MPLv1.1 or GPLv2+ or LGPLv2+
735387
%if 0%{?rhel} == 7
735387
ExcludeArch:    s390 ppc
735387
%endif
735387
%if 0%{?rhel} == 6
735387
ExclusiveArch:  i686 x86_64 ppc64 s390x
735387
%endif
0bcd21
735387
Source0:        https://hg.mozilla.org/releases/mozilla-release/archive/firefox-%{version}%{?pre_version}.source.tar.xz
0bcd21
%if %{build_langpacks}
2bef7d
Source1:        firefox-langpacks-%{version}%{?pre_version}-20190314.tar.xz
0bcd21
%endif
0bcd21
Source10:       firefox-mozconfig
0bcd21
Source12:       firefox-redhat-default-prefs.js
0bcd21
Source20:       firefox.desktop
735387
Source21:       firefox.sh.in
0bcd21
Source23:       firefox.1
0bcd21
Source24:       mozilla-api-key
735387
Source25:       firefox-symbolic.svg
735387
Source26:       distribution.ini
735387
Source27:       google-api-key
735387
735387
Source200:      gtk3-private-%{gtk3_nvr}.el6.src.rpm
735387
Source201:      gtk3-private-%{gtk3_nvr}-post.inc
735387
Source202:      gtk3-private-%{gtk3_nvr}-postun.inc
735387
Source203:      gtk3-private-%{gtk3_nvr}-posttrans.inc
735387
Source204:      gtk3-private-%{gtk3_nvr}-files.inc
735387
Source205:      gtk3-private-%{gtk3_nvr}-setup-flags-env.inc
735387
Source206:      gtk3-private-%{gtk3_nvr}-requires-provides-filter.inc
0bcd21
Source301:      yasm-1.2.0-3.el5.src.rpm
735387
Source303:      libffi-3.0.13-18.el7_3.src.rpm
0bcd21
735387
#Python 2.7
735387
Source100:      https://www.python.org/ftp/python/%{bundled_python_version}/Python-%{bundled_python_version}.tar.xz
0bcd21
# Build patches
735387
Patch3:         mozilla-build-arm.patch
735387
Patch4:         build-mozconfig-fix.patch
735387
Patch5:         build-gdk-version.patch
735387
Patch6:         build-nss-version.patch
735387
Patch26:        build-icu-big-endian.patch
735387
# Also fixes s390x: https://bugzilla.mozilla.org/show_bug.cgi?id=1376268
735387
Patch29:        build-big-endian.patch
735387
# Always feel lucky for unsupported platforms:
735387
# https://bugzilla.mozilla.org/show_bug.cgi?id=1347128
735387
Patch37:        build-jit-atomic-always-lucky.patch
735387
Patch40:        build-aarch64-skia.patch
735387
Patch41:        build-debug-qcms.patch
735387
Patch43:        xulrunner-24.0-jemalloc-ppc.patch
89baa1
#Patch44:        firefox-disable-dbus-remote.patch
cfe71c
Patch45:        build-disable-elfhack.patch
735387
735387
# Fedora/RHEL specific patches
735387
Patch215:        firefox-enable-addons.patch
735387
Patch219:        rhbz-1173156.patch
735387
Patch224:        mozilla-1170092.patch
735387
Patch225:        mozilla-1005640-accept-lang.patch
735387
#ARM run-time patch
735387
Patch226:        rhbz-1354671.patch
735387
Patch230:        rhbz-1503632-nss.patch
89baa1
Patch231:        firefox-pipewire.patch
0bcd21
0bcd21
# Upstream patches
735387
Patch402:        mozilla-1196777.patch
735387
Patch406:        mozilla-256180.patch
735387
Patch413:        mozilla-1353817.patch
735387
Patch415:        mozilla-1436242.patch
0bcd21
735387
# Debian patches
0bcd21
735387
%if %{?system_nss}
735387
BuildRequires:  pkgconfig(nspr) >= %{nspr_version}
735387
BuildRequires:  pkgconfig(nss) >= %{nss_version}
735387
BuildRequires:  nss-static >= %{nss_version}
735387
%endif
735387
%if %{?system_cairo}
735387
BuildRequires:  pkgconfig(cairo) >= %{cairo_version}
735387
%endif
735387
BuildRequires:  pkgconfig(libpng)
735387
BuildRequires:  xz
735387
BuildRequires:  libXt-devel
0bcd21
BuildRequires:  mesa-libGL-devel
735387
Requires:       liberation-fonts-common
735387
Requires:       liberation-sans-fonts
735387
%if %{?system_jpeg}
735387
BuildRequires:  libjpeg-devel
735387
%endif
0bcd21
BuildRequires:  zip
0bcd21
BuildRequires:  bzip2-devel
735387
BuildRequires:  pkgconfig(zlib)
735387
BuildRequires:  pkgconfig(libIDL-2.0)
735387
BuildRequires:  pkgconfig(gtk+-2.0)
0bcd21
BuildRequires:  krb5-devel
735387
BuildRequires:  pkgconfig(pango)
735387
BuildRequires:  pkgconfig(freetype2) >= %{freetype_version}
735387
BuildRequires:  pkgconfig(xt)
735387
BuildRequires:  pkgconfig(xrender)
735387
%if %{?system_hunspell}
735387
BuildRequires:  hunspell-devel
735387
%endif
735387
BuildRequires:  pkgconfig(libstartup-notification-1.0)
735387
BuildRequires:  pkgconfig(libnotify)
735387
BuildRequires:  pkgconfig(dri)
735387
BuildRequires:  pkgconfig(libcurl)
735387
BuildRequires:  dbus-glib-devel
735387
%if %{?system_libvpx}
735387
BuildRequires:  libvpx-devel >= %{libvpx_version}
735387
%endif
0bcd21
BuildRequires:  autoconf213
735387
BuildRequires:  pkgconfig(libpulse)
735387
BuildRequires:  pkgconfig(gconf-2.0)
735387
735387
%if 0%{?use_dts}
735387
BuildRequires:  devtoolset-%{dts_version}-gcc-c++
735387
BuildRequires:  devtoolset-%{dts_version}-gcc
735387
BuildRequires:  devtoolset-%{dts_version}-binutils
735387
BuildRequires:  devtoolset-%{dts_version}-libatomic-devel
cfe71c
%if 0%{?use_llvmts}
357fed
BuildRequires:  llvm-toolset-%{llvm_version}
357fed
BuildRequires:  llvm-toolset-%{llvm_version}-llvm-devel
0bcd21
%endif
0bcd21
%endif
89baa1
89baa1
%if 0%{?rhel} == 8
89baa1
BuildRequires:  cargo
89baa1
BuildRequires:  rust >= 1.24
89baa1
BuildRequires:  llvm >= %{llvm_version}
89baa1
BuildRequires:  llvm-devel >= %{llvm_version}
89baa1
BuildRequires:  clang >= %{llvm_version}
89baa1
%else
735387
%if 0%{?use_rustts}
735387
BuildRequires:  rust-toolset-%{rst_version}-cargo
cfe71c
BuildRequires:  rust-toolset-%{rst_version}-rust >= 1.24
0bcd21
%endif
cfe71c
%if 0%{?use_llvmts}
357fed
BuildRequires:  llvm-toolset-%{llvm_version}
357fed
BuildRequires:  llvm-toolset-%{llvm_version}-llvm-devel
0bcd21
%endif
89baa1
%endif
89baa1
3f6015
%if 0%{?use_bundled_python}
3f6015
#%if 0%{?rhel} == 6
735387
# Needed for Python in RHEL6
735387
BuildRequires:  openssl-devel
3f6015
#%endif
0bcd21
%endif
735387
89baa1
%if 0%{?rhel} == 8
89baa1
BuildRequires:  pipewire-devel
89baa1
%endif
89baa1
735387
%if 0%{?bundle_gtk3}
735387
BuildRequires:        automake
735387
BuildRequires:        autoconf
735387
BuildRequires:        cups-devel
735387
BuildRequires:        dbus-devel
735387
BuildRequires:        desktop-file-utils
735387
BuildRequires:        expat-devel
735387
BuildRequires:        fontpackages-devel
735387
BuildRequires:        gamin-devel
735387
BuildRequires:        gettext-devel
735387
BuildRequires:        git
735387
BuildRequires:        intltool
735387
BuildRequires:        jasper-devel
735387
BuildRequires:        libepoxy-devel
735387
BuildRequires:        libcroco-devel
735387
BuildRequires:        libffi-devel
735387
BuildRequires:        libpng-devel
735387
BuildRequires:        libtiff-devel
735387
BuildRequires:        libtool
735387
BuildRequires:        libxml2-devel
735387
BuildRequires:        libX11-devel
735387
BuildRequires:        libXcomposite-devel
735387
BuildRequires:        libXcursor-devel
735387
BuildRequires:        libXinerama-devel
735387
BuildRequires:        libXevie-devel
735387
BuildRequires:        libXrandr-devel
735387
BuildRequires:        libXrender-devel
735387
BuildRequires:        libXtst-devel
735387
BuildRequires:        mesa-libGL-devel
735387
BuildRequires:        mesa-libEGL-devel
735387
BuildRequires:        pixman-devel
735387
BuildRequires:        rest-devel
735387
BuildRequires:        readline-devel
3f6015
# TODO: We miss that dependency in our bundled gtk3 package.
3f6015
# As a hotfix we put it here and fix gtk3 in next release.
3f6015
Requires:             mesa-libEGL%{?_isa}
3f6015
Requires:             libcroco%{?_isa}
3f6015
Requires:             mesa-libGL%{?_isa}
3f6015
Requires:             bzip2-libs%{?_isa}
3f6015
Requires:             libXtst%{?_isa}
735387
%else
735387
BuildRequires:        gtk3-devel
735387
BuildRequires:        glib2-devel
0bcd21
%endif
0bcd21
0bcd21
Requires:       mozilla-filesystem
735387
Requires:       p11-kit-trust
735387
%if %{?system_nss}
735387
Requires:       nspr >= %{nspr_build_version}
735387
Requires:       nss >= %{nss_build_version}
735387
%endif
735387
3f6015
%if 0%{?rhel} < 8
3f6015
BuildRequires:  python2-devel
0bcd21
%endif
0bcd21
0bcd21
BuildRequires:  desktop-file-utils
0bcd21
BuildRequires:  system-bookmarks
0bcd21
Requires:       redhat-indexhtml
735387
%if %{?system_sqlite}
735387
BuildRequires:  pkgconfig(sqlite3) >= %{sqlite_version}
735387
Requires:       sqlite >= %{sqlite_build_version}
0bcd21
%endif
0bcd21
0bcd21
735387
%if %{?run_tests}
735387
BuildRequires:  xorg-x11-server-Xvfb
0bcd21
%endif
0bcd21
735387
%if %{?system_ffi}
735387
  %if !%{use_bundled_ffi}0
735387
BuildRequires:  pkgconfig(libffi)
735387
  %endif
0bcd21
%endif
0bcd21
735387
Obsoletes:      mozilla <= 37:1.7.13
735387
Provides:       webclient
0bcd21
0bcd21
%description
0bcd21
Mozilla Firefox is an open-source web browser, designed for standards
0bcd21
compliance, performance and portability.
0bcd21
735387
%if %{enable_mozilla_crashreporter}
735387
%global moz_debug_prefix %{_prefix}/lib/debug
735387
%global moz_debug_dir %{moz_debug_prefix}%{mozappdir}
735387
%global uname_m %(uname -m)
735387
%global symbols_file_name %{name}-%{version}.en-US.%{_os}-%{uname_m}.crashreporter-symbols.zip
735387
%global symbols_file_path %{moz_debug_dir}/%{symbols_file_name}
735387
%global _find_debuginfo_opts -p %{symbols_file_path} -o debugcrashreporter.list
735387
%global crashreporter_pkg_name mozilla-crashreporter-%{name}-debuginfo
735387
%package -n %{crashreporter_pkg_name}
735387
Summary: Debugging symbols used by Mozilla's crash reporter servers
735387
%description -n %{crashreporter_pkg_name}
735387
This package provides debug information for Firefox, for use by
735387
Mozilla's crash reporter servers.  If you are trying to locally
735387
debug %{name}, you want to install %{name}-debuginfo instead.
735387
%files -n %{crashreporter_pkg_name} -f debugcrashreporter.list
735387
%endif
735387
735387
%if %{run_tests}
735387
%global testsuite_pkg_name mozilla-%{name}-testresults
735387
%package -n %{testsuite_pkg_name}
735387
Summary: Results of testsuite
735387
%description -n %{testsuite_pkg_name}
735387
This package contains results of tests executed during build.
735387
%files -n %{testsuite_pkg_name}
735387
/test_results
735387
%endif
735387
0bcd21
#---------------------------------------------------------------------
0bcd21
cfe71c
%if %{?bundle_gnome_extension}
cfe71c
%package        -n firefox-gnome-shell-extension
cfe71c
%global         firefox_gnome_shell_addon_name addon-751081-latest.xpi
cfe71c
Summary:        Support for managing GNOME Shell Extensions through web browsers
cfe71c
Requires:       %{name}%{?_isa} = %{version}-%{release}
cfe71c
cfe71c
License:        GPLv3+
cfe71c
URL:            https://wiki.gnome.org/Projects/GnomeShellIntegrationForChrome
cfe71c
Source2:        https://addons.mozilla.org/firefox/downloads/latest/gnome-shell-integration/platform:2/%{firefox_gnome_shell_addon_name}
cfe71c
cfe71c
Requires:       dbus
cfe71c
Requires:       gnome-icon-theme
cfe71c
Requires:       gnome-shell
cfe71c
Requires:       hicolor-icon-theme
cfe71c
Requires:       mozilla-filesystem
cfe71c
cfe71c
%description -n firefox-gnome-shell-extension
cfe71c
Browser extension for Firefox and native host messaging connector that provides 
cfe71c
integration with GNOME Shell and the corresponding extensions repository 
cfe71c
https://extensions.gnome.org.
cfe71c
cfe71c
%files -n firefox-gnome-shell-extension
cfe71c
%{mozappdir}/distribution/extensions/chrome-gnome-shell@gnome.org.xpi
cfe71c
%endif # bundle_gnome_extension
cfe71c
0bcd21
%prep
735387
%setup -q -T -c -n python -a 100
735387
%setup -q -n %{tarballdir}
735387
# Build patches, can't change backup suffix from default because during build
735387
# there is a compare of config and js/config directories and .orig suffix is
735387
# ignored during this compare.
735387
735387
%patch29 -p1 -b .big-endian
735387
%patch37 -p1 -b .jit-atomic-lucky
735387
%patch40 -p1 -b .aarch64-skia
735387
%if %{?debug_build}
735387
%patch41 -p1 -b .build-debug-qcms
735387
%endif
735387
%patch43 -p1 -b .jemalloc-ppc
735387
# Disable DBus remote on RHEL6 as it does not build here.
89baa1
#%if 0%{?rhel} == 6
89baa1
#%patch44 -p1 -b .disable-dbus-remote
89baa1
#%endif
cfe71c
%if 0%{?rhel} == 8
cfe71c
%patch45 -p1 -b .disable-elfhack
cfe71c
%endif
0bcd21
735387
%patch3  -p1 -b .arm
735387
%patch4  -p1 -b .build-mozconfig-fix
735387
%patch5  -p1 -b .gdk-version
735387
%patch6  -p1 -b .nss-version
735387
735387
# Fedora patches
735387
%patch215 -p1 -b .addons
89baa1
%patch219 -p1 -b .rhbz-1173156
735387
%patch224 -p1 -b .1170092
735387
%patch225 -p1 -b .1005640-accept-lang
89baa1
%if 0%{?rhel} == 8
89baa1
%patch231 -p1 -b .pipewire
89baa1
%endif
735387
735387
# This ensures no migration of certdb to sqlite on the RHEL6 and RHEL7.
735387
# This needs to stay for the future releases
735387
%if 0%{?rhel} < 8
735387
%patch230 -p1 -b .1503632-nss
735387
%endif
0bcd21
735387
#ARM run-time patch
735387
%ifarch aarch64
735387
%patch226 -p1 -b .1354671
0bcd21
%endif
0bcd21
735387
%patch402 -p1 -b .1196777
735387
%patch406 -p1 -b .256180
735387
%patch413 -p1 -b .1353817
735387
%patch415 -p1 -b .1436242
0bcd21
357fed
0bcd21
# Patch for big endian platforms only
0bcd21
%if 0%{?big_endian}
735387
%patch26 -p1 -b .icu
0bcd21
%endif
0bcd21
0bcd21
%{__rm} -f .mozconfig
0bcd21
%{__cp} %{SOURCE10} .mozconfig
735387
%if %{official_branding}
735387
echo "ac_add_options --enable-official-branding" >> .mozconfig
735387
%endif
0bcd21
%{__cp} %{SOURCE24} mozilla-api-key
735387
%{__cp} %{SOURCE27} google-api-key
0bcd21
735387
%if %{?system_nss}
735387
echo "ac_add_options --with-system-nspr" >> .mozconfig
735387
echo "ac_add_options --with-system-nss" >> .mozconfig
735387
%else
735387
echo "ac_add_options --without-system-nspr" >> .mozconfig
735387
echo "ac_add_options --without-system-nss" >> .mozconfig
735387
%endif
0bcd21
735387
%if %{?system_sqlite}
735387
echo "ac_add_options --enable-system-sqlite" >> .mozconfig
735387
%else
735387
echo "ac_add_options --disable-system-sqlite" >> .mozconfig
0bcd21
%endif
0bcd21
735387
%if %{?system_cairo}
735387
echo "ac_add_options --enable-system-cairo" >> .mozconfig
0bcd21
%else
735387
echo "ac_add_options --disable-system-cairo" >> .mozconfig
0bcd21
%endif
0bcd21
735387
%if 0%{?use_bundled_ffi}
735387
echo "ac_add_options --enable-system-ffi" >> .mozconfig
735387
%endif
735387
%if 0%{?system_ffi}
735387
echo "ac_add_options --enable-system-ffi" >> .mozconfig
735387
%endif
735387
735387
%ifarch %{arm}
735387
echo "ac_add_options --disable-elf-hack" >> .mozconfig
735387
%endif
735387
735387
%if %{?system_hunspell}
735387
echo "ac_add_options --enable-system-hunspell" >> .mozconfig
0bcd21
%else
735387
echo "ac_add_options --disable-system-hunspell" >> .mozconfig
0bcd21
%endif
0bcd21
735387
%if %{?debug_build}
735387
echo "ac_add_options --enable-debug" >> .mozconfig
735387
echo "ac_add_options --disable-optimize" >> .mozconfig
735387
%else
735387
%global optimize_flags "none"
735387
%ifnarch s390 s390x
735387
%global optimize_flags "-g -O2"
735387
%endif
735387
%ifarch armv7hl
735387
# ARMv7 need that (rhbz#1426850)
735387
%global optimize_flags "-g -O2 -fno-schedule-insns"
735387
%endif
735387
%ifarch ppc64le aarch64
735387
%global optimize_flags "-g -O2"
735387
%endif
735387
%if %{optimize_flags} != "none"
735387
echo 'ac_add_options --enable-optimize=%{?optimize_flags}' >> .mozconfig
0bcd21
%else
735387
echo 'ac_add_options --enable-optimize' >> .mozconfig
735387
%endif
735387
echo "ac_add_options --disable-debug" >> .mozconfig
0bcd21
%endif
0bcd21
735387
# Second arches fail to start with jemalloc enabled
735387
%ifnarch %{ix86} x86_64
735387
echo "ac_add_options --disable-jemalloc" >> .mozconfig
0bcd21
%endif
0bcd21
735387
%ifnarch %{ix86} x86_64
735387
echo "ac_add_options --disable-webrtc" >> .mozconfig
0bcd21
%endif
0bcd21
735387
%if !%{enable_mozilla_crashreporter}
735387
echo "ac_add_options --disable-crashreporter" >> .mozconfig
0bcd21
%endif
0bcd21
735387
%if %{?run_tests}
735387
echo "ac_add_options --enable-tests" >> .mozconfig
0bcd21
%endif
0bcd21
735387
%if !%{?system_jpeg}
735387
echo "ac_add_options --without-system-jpeg" >> .mozconfig
0bcd21
%else
735387
echo "ac_add_options --with-system-jpeg" >> .mozconfig
0bcd21
%endif
0bcd21
735387
%if %{?system_libvpx}
735387
echo "ac_add_options --with-system-libvpx" >> .mozconfig
0bcd21
%else
735387
echo "ac_add_options --without-system-libvpx" >> .mozconfig
0bcd21
%endif
0bcd21
735387
%if %{?system_libicu}
735387
echo "ac_add_options --with-system-icu" >> .mozconfig
735387
%else
735387
echo "ac_add_options --without-system-icu" >> .mozconfig
735387
%endif
735387
%ifarch s390 s390x
735387
echo "ac_add_options --disable-ion" >> .mozconfig
735387
%endif
0bcd21
735387
%ifarch %{ix86}
735387
echo "ac_add_options --disable-stylo" >> .mozconfig
735387
%endif
735387
%if 0%{?rhel} == 6
735387
echo "ac_add_options --disable-stylo" >> .mozconfig
0bcd21
%endif
0bcd21
735387
# Remove executable bit to make brp-mangle-shebangs happy.
735387
chmod -x third_party/rust/itertools/src/lib.rs
735387
0bcd21
#---------------------------------------------------------------------
0bcd21
0bcd21
%build
0bcd21
735387
#GTK3 >>
735387
%if ! 0%{?avoid_bundled_rebuild}
735387
    rm -rf %{_buildrootdir}/*
735387
%endif
735387
export PATH="%{_buildrootdir}/bin:$PATH"
735387
735387
function install_rpms_to_current_dir() {
735387
    PACKAGE_RPM=$(eval echo $1)
735387
    PACKAGE_DIR=%{_rpmdir}
735387
735387
    if [ ! -f $PACKAGE_DIR/$PACKAGE_RPM ]; then
735387
        # Hack for tps tests
735387
        ARCH_STR=%{_arch}
735387
        %ifarch i386 i686
735387
            ARCH_STR="i?86"
735387
        %endif
735387
        PACKAGE_DIR="$PACKAGE_DIR/$ARCH_STR"
735387
     fi
735387
735387
     for package in $(ls $PACKAGE_DIR/$PACKAGE_RPM)
735387
     do
735387
         echo "$package"
735387
         rpm2cpio "$package" | cpio -idu
735387
     done
735387
}
735387
0bcd21
function build_bundled_package() {
0bcd21
  PACKAGE_RPM=$1
0bcd21
  PACKAGE_FILES=$2
0bcd21
  PACKAGE_SOURCE=$3
0bcd21
  PACKAGE_DIR="%{_topdir}/RPMS"
0bcd21
0bcd21
  PACKAGE_ALREADY_BUILD=0
735387
  %if %{?avoid_bundled_rebuild}
0bcd21
    if ls $PACKAGE_DIR/$PACKAGE_RPM; then
0bcd21
      PACKAGE_ALREADY_BUILD=1
0bcd21
    fi
0bcd21
    if ls $PACKAGE_DIR/%{_arch}/$PACKAGE_RPM; then
0bcd21
      PACKAGE_ALREADY_BUILD=1
0bcd21
    fi
0bcd21
  %endif
0bcd21
  if [ $PACKAGE_ALREADY_BUILD == 0 ]; then
0bcd21
    echo "Rebuilding $PACKAGE_RPM from $PACKAGE_SOURCE"; echo "==============================="
0bcd21
    rpmbuild --nodeps --rebuild $PACKAGE_SOURCE
0bcd21
  fi
0bcd21
0bcd21
  if [ ! -f $PACKAGE_DIR/$PACKAGE_RPM ]; then
0bcd21
    # Hack for tps tests
0bcd21
    ARCH_STR=%{_arch}
0bcd21
    %ifarch i386 i686
0bcd21
    ARCH_STR="i?86"
0bcd21
    %endif
0bcd21
    PACKAGE_DIR="$PACKAGE_DIR/$ARCH_STR"
0bcd21
  fi
0bcd21
  pushd $PACKAGE_DIR
0bcd21
  echo "Installing $PACKAGE_DIR/$PACKAGE_RPM"; echo "==============================="
0bcd21
  rpm2cpio $PACKAGE_DIR/$PACKAGE_RPM | cpio -iduv
0bcd21
  # Clean rpms to avoid including them to package
735387
  %if ! 0%{?avoid_bundled_rebuild}
0bcd21
    rm -f $PACKAGE_FILES
0bcd21
  %endif
0bcd21
0bcd21
  PATH=$PACKAGE_DIR/usr/bin:$PATH
0bcd21
  export PATH
0bcd21
  LD_LIBRARY_PATH=$PACKAGE_DIR/usr/%{_lib}
0bcd21
  export LD_LIBRARY_PATH
0bcd21
  popd
0bcd21
}
0bcd21
0bcd21
# Build and install local yasm if needed
0bcd21
# ======================================
0bcd21
%if %{use_bundled_yasm}
0bcd21
  build_bundled_package 'yasm-1*.rpm' 'yasm-*.rpm' '%{SOURCE301}'
0bcd21
%endif
0bcd21
0bcd21
735387
%if 0%{?bundle_gtk3}
735387
   %if ! 0%{?avoid_bundled_rebuild}
735387
    rpm -ivh %{SOURCE200}
735387
    rpmbuild --nodeps --define '_prefix %{gtk3_install_path}' -ba %{_specdir}/gtk3-private.spec
735387
   %endif
735387
   rm -rf %{_buildrootdir}/*
735387
   pushd %{_buildrootdir}
735387
   install_rpms_to_current_dir gtk3-private-%{gtk3_nvr}*.rpm
735387
   install_rpms_to_current_dir gtk3-private-devel-%{gtk3_nvr}*.rpm
735387
   install_rpms_to_current_dir gtk3-private-rpm-scripts-%{gtk3_nvr}*.rpm
735387
   popd
0bcd21
%endif
0bcd21
735387
# If needed build the bundled python 2.7 and put it in the PATH
3f6015
%if 0%{?use_bundled_python}
735387
    pushd %{_builddir}/python/Python-%{bundled_python_version}
735387
    #if ! 0%{?avoid_bundled_rebuild}
735387
        # Build Python 2.7 and set environment
3f6015
        # Pydebug set optimization to level 0, -O3 crashes on gcc 8 ATM
3f6015
        ./configure --with-pydebug --prefix="%{_buildrootdir}" --exec-prefix="%{_buildrootdir}" --libdir="%{_buildrootdir}/lib"
735387
    #endif
735387
    make %{?_smp_mflags} install V=1
735387
    popd
3f6015
%endif
0bcd21
735387
%if 0%{?bundle_gtk3}
735387
# gtk3-private-3.22.26.el6-1-requires-provides-filter.inc
735387
%include_file %{SOURCE206}
735387
%endif
735387
%if 0%{use_bundled_ffi}
735387
  # Install libraries to the predefined location to later add them to the Firefox libraries
735387
  rpm -ivh %{SOURCE303}
735387
  rpmbuild --nodeps --define '_prefix %{gtk3_install_path}' -ba %{_specdir}/libffi.spec
735387
  pushd %{_buildrootdir}
735387
  install_rpms_to_current_dir 'libffi*.rpm'
0bcd21
  popd
735387
  %filter_from_requires /libffi.so.6/d
735387
%endif
735387
%filter_setup
735387
735387
# GTK3 <<
0bcd21
0bcd21
%if %{?system_sqlite}
735387
# Do not proceed with build if the sqlite require would be broken:
735387
# make sure the minimum requirement is non-empty, ...
735387
sqlite_version=$(expr "%{sqlite_version}" : '\([0-9]*\.\)[0-9]*\.') || exit 1
735387
# ... and that major number of the computed build-time version matches:
735387
case "%{sqlite_build_version}" in
735387
  "$sqlite_version"*) ;;
735387
  *) exit 1 ;;
735387
esac
0bcd21
%endif
0bcd21
735387
# We need to disable exit on error temporarily for the following scripts:
735387
set +e
735387
%if 0%{?use_dts}
735387
source scl_source enable devtoolset-%{dts_version}
735387
%endif
735387
%if 0%{?use_rustts}
735387
source scl_source enable rust-toolset-%{rst_version}
735387
%endif
0bcd21
735387
set -e
735387
# Hack for missing shell when building in brew on RHEL6
735387
%if 0%{?rhel} == 6
0bcd21
export SHELL=/bin/sh
0bcd21
%endif
0bcd21
0bcd21
echo "Generate big endian version of config/external/icu/data/icud58l.dat"
0bcd21
%if 0%{?big_endian}
0bcd21
  ./mach python intl/icu_sources_data.py .
0bcd21
  ls -l config/external/icu/data
0bcd21
  rm -f config/external/icu/data/icudt*l.dat
0bcd21
%endif
0bcd21
735387
# Update the various config.guess to upstream release for aarch64 support
735387
find ./ -name config.guess -exec cp /usr/lib/rpm/config.guess {} ';'
735387
735387
# -fpermissive is needed to build with gcc 4.6+ which has become stricter
735387
#
735387
# Mozilla builds with -Wall with exception of a few warnings which show up
735387
# everywhere in the code; so, don't override that.
735387
#
735387
# Disable C++ exceptions since Mozilla code is not exception-safe
735387
#
735387
MOZ_OPT_FLAGS=$(echo "%{optflags}" | %{__sed} -e 's/-Wall//')
735387
#rhbz#1037063
735387
# -Werror=format-security causes build failures when -Wno-format is explicitly given
735387
# for some sources
735387
# Explicitly force the hardening flags for Firefox so it passes the checksec test;
735387
# See also https://fedoraproject.org/wiki/Changes/Harden_All_Packages
735387
MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security"
735387
%if 0%{?fedora} > 23
735387
# Disable null pointer gcc6 optimization in gcc6 (rhbz#1328045)
735387
MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fno-delete-null-pointer-checks"
735387
%endif
735387
# Use hardened build?
735387
%if %{?hardened_build}
735387
MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fPIC -Wl,-z,relro -Wl,-z,now"
735387
%endif
735387
%if %{?debug_build}
735387
MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//')
735387
%endif
0bcd21
%ifarch s390
0bcd21
MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/')
735387
# If MOZ_DEBUG_FLAGS is empty, firefox's build will default it to "-g" which
735387
# overrides the -g1 from line above and breaks building on s390
735387
# (OOM when linking, rhbz#1238225)
735387
export MOZ_DEBUG_FLAGS=" "
0bcd21
%endif
735387
%ifarch s390 %{arm} ppc aarch64 i686
735387
MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
0bcd21
%endif
735387
%ifarch %{arm}
735387
export RUSTFLAGS="-Cdebuginfo=0"
0bcd21
%endif
735387
export CFLAGS=$MOZ_OPT_FLAGS
0bcd21
export CXXFLAGS=$MOZ_OPT_FLAGS
735387
export LDFLAGS=$MOZ_LINK_FLAGS
0bcd21
0bcd21
export PREFIX='%{_prefix}'
0bcd21
export LIBDIR='%{_libdir}'
0bcd21
0bcd21
MOZ_SMP_FLAGS=-j1
735387
# On x86 architectures, Mozilla can build up to 4 jobs at once in parallel,
735387
# however builds tend to fail on other arches when building in parallel.
735387
%ifarch %{ix86} x86_64 ppc ppc64 ppc64le aarch64
0bcd21
[ -z "$RPM_BUILD_NCPUS" ] && \
0bcd21
     RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"
0bcd21
[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2
0bcd21
[ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4
0bcd21
[ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8
735387
%endif
735387
735387
%if 0%{?bundle_gtk3}
735387
# gtk3-private-setup-flags-env.inc
735387
%include_file %{SOURCE205}
735387
%endif
735387
735387
#make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1"
735387
export MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS"
735387
export MOZ_SERVICES_SYNC="1"
735387
export STRIP=/bin/true
89baa1
%if 0%{?rhel} == 8
89baa1
export LLVM_CONFIG=/usr/bin/llvm-config-64
89baa1
%endif
735387
./mach build -v
735387
735387
# create debuginfo for crash-stats.mozilla.com
735387
%if %{enable_mozilla_crashreporter}
735387
#cd %{moz_objdir}
735387
make -C objdir buildsymbols
735387
%endif
0bcd21
735387
%if %{?run_tests}
735387
%if %{?system_nss}
735387
ln -s /usr/bin/certutil objdir/dist/bin/certutil
735387
ln -s /usr/bin/pk12util objdir/dist/bin/pk12util
0bcd21
735387
%endif
735387
mkdir test_results
735387
./mach --log-no-times check-spidermonkey &> test_results/check-spidermonkey || true
735387
./mach --log-no-times check-spidermonkey &> test_results/check-spidermonkey-2nd-run || true
735387
./mach --log-no-times cppunittest &> test_results/cppunittest || true
735387
xvfb-run ./mach --log-no-times crashtest &> test_results/crashtest || true
735387
./mach --log-no-times gtest &> test_results/gtest || true
735387
xvfb-run ./mach --log-no-times jetpack-test &> test_results/jetpack-test || true
735387
# not working right now ./mach marionette-test &> test_results/marionette-test || true
735387
xvfb-run ./mach --log-no-times mochitest-a11y &> test_results/mochitest-a11y || true
735387
xvfb-run ./mach --log-no-times mochitest-browser &> test_results/mochitest-browser || true
735387
xvfb-run ./mach --log-no-times mochitest-chrome &> test_results/mochitest-chrome || true
735387
xvfb-run ./mach --log-no-times mochitest-devtools &> test_results/mochitest-devtools || true
735387
xvfb-run ./mach --log-no-times mochitest-plain &> test_results/mochitest-plain || true
735387
xvfb-run ./mach --log-no-times reftest &> test_results/reftest || true
735387
xvfb-run ./mach --log-no-times webapprt-test-chrome &> test_results/webapprt-test-chrome || true
735387
xvfb-run ./mach --log-no-times webapprt-test-content &> test_results/webapprt-test-content || true
735387
./mach --log-no-times webidl-parser-test &> test_results/webidl-parser-test || true
735387
xvfb-run ./mach --log-no-times xpcshell-test &> test_results/xpcshell-test || true
735387
%if %{?system_nss}
735387
rm -f  objdir/dist/bin/certutil
735387
rm -f  objdir/dist/bin/pk12util
735387
%endif
0bcd21
735387
%endif
0bcd21
#---------------------------------------------------------------------
0bcd21
0bcd21
%install
735387
%if 0%{?rhel} == 6
0bcd21
export SHELL=/bin/sh
0bcd21
%endif
0bcd21
735387
%if 0%{?bundle_gtk3}
735387
function install_rpms_to_current_dir() {
735387
    PACKAGE_RPM=$(eval echo $1)
735387
    PACKAGE_DIR=%{_rpmdir}
735387
735387
    if [ ! -f $PACKAGE_DIR/$PACKAGE_RPM ]; then
735387
        # Hack for tps tests
735387
        ARCH_STR=%{_arch}
735387
        %ifarch i386 i686
735387
            ARCH_STR="i?86"
735387
        %endif
735387
        PACKAGE_DIR="$PACKAGE_DIR/$ARCH_STR"
735387
     fi
735387
735387
     for package in $(ls $PACKAGE_DIR/$PACKAGE_RPM)
735387
     do
735387
         echo "$package"
735387
         rpm2cpio "$package" | cpio -idu
735387
     done
735387
}
735387
735387
pushd %{buildroot}
735387
# Install gtk3-private again to the buildroot, but without devel subpackage
735387
install_rpms_to_current_dir gtk3-private-%{gtk3_nvr}*.rpm
735387
install_rpms_to_current_dir gtk3-private-rpm-scripts-%{gtk3_nvr}*.rpm
735387
popd
735387
%endif
735387
735387
# Install bundled libffi
735387
%if %{use_bundled_ffi}
735387
  pushd %{buildroot}
735387
  install_rpms_to_current_dir libffi-3*.rpm
735387
  popd
735387
%endif
0bcd21
0bcd21
# set up our default bookmarks
735387
%{__cp} -p %{default_bookmarks_file} objdir/dist/bin/browser/chrome/en-US/locale/browser/bookmarks.html
0bcd21
0bcd21
# Make sure locale works for langpacks
0bcd21
%{__cat} > objdir/dist/bin/browser/defaults/preferences/firefox-l10n.js << EOF
0bcd21
pref("general.useragent.locale", "chrome://global/locale/intl.properties");
0bcd21
EOF
0bcd21
735387
DESTDIR=%{buildroot} make -C objdir install
0bcd21
735387
%{__mkdir_p} %{buildroot}{%{_libdir},%{_bindir},%{_datadir}/applications}
0bcd21
735387
desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE20}
0bcd21
735387
# set up the firefox start script
735387
%{__rm} -rf %{buildroot}%{_bindir}/firefox
735387
%{__cat} %{SOURCE21} > %{buildroot}%{_bindir}/firefox
3f6015
%if 0%{?bundle_gtk3}
89baa1
sed -i -e 's|%RHEL_ENV_VARS%|export XDG_DATA_DIRS="$MOZ_LIB_DIR/firefox/bundled/share:/usr/share:$XDG_DATA_DIRS"\nexport FONTCONFIG_FILE="$MOZ_LIB_DIR/firefox/bundled/etc/fonts/fonts.conf"|' %{buildroot}%{_bindir}/firefox
3f6015
%else
3f6015
sed -i -e 's|%RHEL_ENV_VARS%||' %{buildroot}%{_bindir}/firefox
3f6015
%endif
3f6015
735387
%{__chmod} 755 %{buildroot}%{_bindir}/firefox
0bcd21
735387
%{__install} -p -D -m 644 %{SOURCE23} %{buildroot}%{_mandir}/man1/firefox.1
0bcd21
735387
%{__rm} -f %{buildroot}/%{mozappdir}/firefox-config
735387
%{__rm} -f %{buildroot}/%{mozappdir}/update-settings.ini
0bcd21
0bcd21
for s in 16 22 24 32 48 256; do
735387
    %{__mkdir_p} %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps
0bcd21
    %{__cp} -p browser/branding/official/default${s}.png \
735387
               %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps/firefox.png
0bcd21
done
0bcd21
735387
# Install hight contrast icon
735387
%{__mkdir_p} %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps
735387
%{__cp} -p %{SOURCE25} \
735387
           %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps
735387
735387
# Register as an application to be visible in the software center
735387
#
735387
# NOTE: It would be *awesome* if this file was maintained by the upstream
735387
# project, translated and installed into the right place during `make install`.
735387
#
735387
# See http://www.freedesktop.org/software/appstream/docs/ for more details.
735387
#
735387
%{__mkdir_p} %{buildroot}%{_datadir}/appdata
735387
cat > %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml <
735387
735387
735387
735387
BugReportURL: https://bugzilla.mozilla.org/show_bug.cgi?id=1071061
735387
SentUpstream: 2014-09-22
735387
-->
735387
<application>
735387
  <id type="desktop">firefox.desktop</id>
735387
  <metadata_license>CC0-1.0</metadata_license>
735387
  <description>
735387
    

735387
      Bringing together all kinds of awesomeness to make browsing better for you.
735387
      Get to your favorite sites quickly – even if you don’t remember the URLs.
735387
      Type your term into the location bar (aka the Awesome Bar) and the autocomplete
735387
      function will include possible matches from your browsing history, bookmarked
735387
      sites and open tabs.
735387
    

735387
    
735387
  </description>
735387
  <url type="homepage">http://www.mozilla.org/</url>
735387
  <screenshots>
735387
    <screenshot type="default">https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/firefox/a.png</screenshot>
735387
    <screenshot>https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/firefox/b.png</screenshot>
735387
    <screenshot>https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/firefox/c.png</screenshot>
735387
  </screenshots>
735387
  
735387
  <updatecontact>someone_who_cares@upstream_project.org</updatecontact>
735387
   -->
735387
</application>
735387
EOF
735387
735387
echo > %{name}.lang
0bcd21
%if %{build_langpacks}
0bcd21
# Extract langpacks, make any mods needed, repack the langpack, and install it.
735387
%{__mkdir_p} %{buildroot}%{langpackdir}
735387
%{__tar} xf %{SOURCE1}
0bcd21
for langpack in `ls firefox-langpacks/*.xpi`; do
0bcd21
  language=`basename $langpack .xpi`
0bcd21
  extensionID=langpack-$language@firefox.mozilla.org
0bcd21
  %{__mkdir_p} $extensionID
735387
  unzip -qq $langpack -d $extensionID
0bcd21
  find $extensionID -type f | xargs chmod 644
0bcd21
0bcd21
  cd $extensionID
735387
  zip -qq -r9mX ../${extensionID}.xpi *
0bcd21
  cd -
0bcd21
735387
  %{__install} -m 644 ${extensionID}.xpi %{buildroot}%{langpackdir}
0bcd21
  language=`echo $language | sed -e 's/-/_/g'`
735387
  echo "%%lang($language) %{langpackdir}/${extensionID}.xpi" >> %{name}.lang
0bcd21
done
0bcd21
%{__rm} -rf firefox-langpacks
0bcd21
0bcd21
# Install langpack workaround (see #707100, #821169)
0bcd21
function create_default_langpack() {
735387
language_long=$1
735387
language_short=$2
735387
cd %{buildroot}%{langpackdir}
735387
ln -s langpack-$language_long@firefox.mozilla.org.xpi langpack-$language_short@firefox.mozilla.org.xpi
735387
cd -
735387
echo "%%lang($language_short) %{langpackdir}/langpack-$language_short@firefox.mozilla.org.xpi" >> %{name}.lang
0bcd21
}
0bcd21
0bcd21
# Table of fallbacks for each language
0bcd21
# please file a bug at bugzilla.redhat.com if the assignment is incorrect
0bcd21
create_default_langpack "bn-IN" "bn"
0bcd21
create_default_langpack "es-AR" "es"
0bcd21
create_default_langpack "fy-NL" "fy"
0bcd21
create_default_langpack "ga-IE" "ga"
0bcd21
create_default_langpack "gu-IN" "gu"
0bcd21
create_default_langpack "hi-IN" "hi"
0bcd21
create_default_langpack "hy-AM" "hy"
0bcd21
create_default_langpack "nb-NO" "nb"
0bcd21
create_default_langpack "nn-NO" "nn"
0bcd21
create_default_langpack "pa-IN" "pa"
0bcd21
create_default_langpack "pt-PT" "pt"
0bcd21
create_default_langpack "sv-SE" "sv"
0bcd21
create_default_langpack "zh-TW" "zh"
0bcd21
%endif # build_langpacks
0bcd21
0bcd21
# Keep compatibility with the old preference location.
735387
%{__mkdir_p} %{buildroot}%{mozappdir}/defaults/preferences
735387
%{__mkdir_p} %{buildroot}%{mozappdir}/browser/defaults
0bcd21
ln -s %{mozappdir}/defaults/preferences $RPM_BUILD_ROOT/%{mozappdir}/browser/defaults/preferences
735387
# Default preferences
735387
%{__cp} %{SOURCE12} %{buildroot}%{mozappdir}/defaults/preferences/all-redhat.js
0bcd21
0bcd21
# System config dir
735387
%{__mkdir_p} %{buildroot}/%{_sysconfdir}/%{name}/pref
0bcd21
0bcd21
# System extensions
735387
%{__mkdir_p} %{buildroot}%{_datadir}/mozilla/extensions/%{firefox_app_id}
735387
%{__mkdir_p} %{buildroot}%{_libdir}/mozilla/extensions/%{firefox_app_id}
0bcd21
0bcd21
# Copy over the LICENSE
735387
%{__install} -p -c -m 644 LICENSE %{buildroot}/%{mozappdir}
735387
735387
# Use the system hunspell dictionaries
735387
%{__rm} -rf %{buildroot}%{mozappdir}/dictionaries
735387
ln -s %{_datadir}/myspell %{buildroot}%{mozappdir}/dictionaries
735387
735387
# Enable crash reporter for Firefox application
735387
%if %{enable_mozilla_crashreporter}
735387
sed -i -e "s/\[Crash Reporter\]/[Crash Reporter]\nEnabled=1/" %{buildroot}/%{mozappdir}/application.ini
735387
# Add debuginfo for crash-stats.mozilla.com
735387
%{__mkdir_p} %{buildroot}/%{moz_debug_dir}
735387
%{__cp} objdir/dist/%{symbols_file_name} %{buildroot}/%{moz_debug_dir}
735387
%endif
0bcd21
735387
%if %{run_tests}
735387
# Add debuginfo for crash-stats.mozilla.com
735387
%{__mkdir_p} %{buildroot}/test_results
735387
%{__cp} test_results/* %{buildroot}/test_results
735387
%endif
0bcd21
0bcd21
735387
# Copy over run-mozilla.sh
735387
%{__cp} build/unix/run-mozilla.sh %{buildroot}%{mozappdir}
0bcd21
735387
# Add distribution.ini
735387
%{__mkdir_p} %{buildroot}%{mozappdir}/distribution
735387
%{__cp} %{SOURCE26} %{buildroot}%{mozappdir}/distribution
0bcd21
735387
# Remove copied libraries to speed up build
735387
rm -f %{buildroot}%{mozappdirdev}/sdk/lib/libmozjs.so
735387
rm -f %{buildroot}%{mozappdirdev}/sdk/lib/libmozalloc.so
735387
rm -f %{buildroot}%{mozappdirdev}/sdk/lib/libxul.so
cfe71c
cfe71c
%if %{bundle_gnome_extension}
cfe71c
# Gnome extension
cfe71c
%{__mkdir_p} %{buildroot}%{mozappdir}/distribution/extensions
cfe71c
%{__cp} -p %{SOURCE2} %{buildroot}%{mozappdir}/distribution/extensions/chrome-gnome-shell@gnome.org.xpi
cfe71c
chmod 644 %{buildroot}%{mozappdir}/distribution/extensions/chrome-gnome-shell@gnome.org.xpi
cfe71c
%endif
0bcd21
#---------------------------------------------------------------------
0bcd21
0bcd21
0bcd21
0bcd21
%preun
0bcd21
# is it a final removal?
0bcd21
if [ $1 -eq 0 ]; then
0bcd21
  %{__rm} -rf %{mozappdir}/components
0bcd21
  %{__rm} -rf %{mozappdir}/extensions
0bcd21
  %{__rm} -rf %{mozappdir}/plugins
735387
  %{__rm} -rf %{langpackdir}
0bcd21
fi
0bcd21
735387
%clean
735387
rm -rf %{_srcrpmdir}/gtk3-private-%{gtk3_nvr}*.src.rpm
735387
find %{_rpmdir} -name "gtk3-private-*%{gtk3_nvr}*.rpm" -delete
735387
rm -rf %{_srcrpmdir}/libffi*.src.rpm
735387
find %{_rpmdir} -name "libffi*.rpm" -delete
735387
735387
%post
735387
update-desktop-database &> /dev/null || :
735387
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
735387
%if 0%{?bundle_gtk3}
735387
# gtk3-private-post.inc
735387
%include_file %{SOURCE201}
735387
%endif
735387
735387
%postun
735387
update-desktop-database &> /dev/null || :
735387
if [ $1 -eq 0 ] ; then
735387
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
735387
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
735387
fi
735387
%if 0%{?bundle_gtk3}
735387
# gtk3-private-postun.inc
735387
%include_file %{SOURCE202}
735387
%endif
735387
0bcd21
%posttrans
0bcd21
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
735387
%if 0%{?bundle_gtk3}
735387
# gtk3-private-posttrans.inc
735387
%include_file %{SOURCE203}
735387
%endif
0bcd21
0bcd21
%files -f %{name}.lang
0bcd21
%{_bindir}/firefox
735387
%{mozappdir}/firefox
735387
%{mozappdir}/firefox-bin
0bcd21
%doc %{_mandir}/man1/*
735387
%dir %{_sysconfdir}/%{name}
0bcd21
%dir %{_sysconfdir}/%{name}/*
735387
%dir %{_datadir}/mozilla/extensions/*
735387
%dir %{_libdir}/mozilla/extensions/*
735387
%{_datadir}/appdata/*.appdata.xml
735387
%{_datadir}/applications/*.desktop
0bcd21
%dir %{mozappdir}
0bcd21
%doc %{mozappdir}/LICENSE
0bcd21
%{mozappdir}/browser/chrome
0bcd21
%{mozappdir}/browser/chrome.manifest
735387
%{mozappdir}/defaults/preferences/*
735387
%{mozappdir}/browser/defaults/preferences
735387
%{mozappdir}/browser/features/*.xpi
735387
%{mozappdir}/distribution/distribution.ini
735387
# That's Windows only
735387
%ghost %{mozappdir}/browser/features/aushelper@mozilla.org.xpi
0bcd21
%attr(644, root, root) %{mozappdir}/browser/blocklist.xml
0bcd21
%dir %{mozappdir}/browser/extensions
735387
%{mozappdir}/browser/extensions/*
735387
%if %{build_langpacks}
735387
%dir %{langpackdir}
735387
%endif
0bcd21
%{mozappdir}/browser/omni.ja
735387
%{mozappdir}/chrome.manifest
0bcd21
%{mozappdir}/run-mozilla.sh
0bcd21
%{mozappdir}/application.ini
735387
%{mozappdir}/pingsender
0bcd21
%exclude %{mozappdir}/removed-files
735387
%{_datadir}/icons/hicolor/16x16/apps/firefox.png
735387
%{_datadir}/icons/hicolor/22x22/apps/firefox.png
735387
%{_datadir}/icons/hicolor/24x24/apps/firefox.png
735387
%{_datadir}/icons/hicolor/256x256/apps/firefox.png
735387
%{_datadir}/icons/hicolor/32x32/apps/firefox.png
735387
%{_datadir}/icons/hicolor/48x48/apps/firefox.png
735387
%{_datadir}/icons/hicolor/symbolic/apps/firefox-symbolic.svg
735387
%if %{enable_mozilla_crashreporter}
735387
%{mozappdir}/crashreporter
735387
%{mozappdir}/crashreporter.ini
735387
%{mozappdir}/minidump-analyzer
735387
%{mozappdir}/Throbber-small.gif
735387
%{mozappdir}/browser/crashreporter-override.ini
735387
%endif
0bcd21
%{mozappdir}/*.so
735387
%{mozappdir}/gtk2/*.so
735387
%{mozappdir}/defaults/pref/channel-prefs.js
735387
%{mozappdir}/dependentlibs.list
735387
%{mozappdir}/dictionaries
0bcd21
%{mozappdir}/omni.ja
0bcd21
%{mozappdir}/platform.ini
0bcd21
%{mozappdir}/plugin-container
0bcd21
%{mozappdir}/gmp-clearkey
735387
%{mozappdir}/fonts/EmojiOneMozilla.ttf
735387
%if !%{?system_libicu}
735387
#%{mozappdir}/icudt*.dat
0bcd21
%endif
735387
%if !%{?system_nss}
735387
%{mozappdir}/libfreeblpriv3.chk
735387
%{mozappdir}/libnssdbm3.chk
735387
%{mozappdir}/libsoftokn3.chk
735387
%exclude %{mozappdir}/libnssckbi.so
0bcd21
%endif
735387
%if 0%{use_bundled_ffi}
735387
%{mozappdir}/bundled/%{_lib}/libffi.so*
735387
%exclude %{_datadir}/doc/libffi*
0bcd21
%endif
735387
735387
%if 0%{?bundle_gtk3}
735387
# gtk3-private-files.inc
735387
%include_file %{SOURCE204}
0bcd21
%endif
735387
0bcd21
0bcd21
#---------------------------------------------------------------------
0bcd21
0bcd21
%changelog
2bef7d
* Fri Mar 15 2019 Martin Stransky <stransky@redhat.com> - 60.6.0-3
2bef7d
- Added Google API keys (mozbz#1531176)
2bef7d
2bef7d
* Thu Mar 14 2019 Martin Stransky <stransky@redhat.com> - 60.6.0-2
2bef7d
- Update to 60.6.0 ESR (Build 2)
2bef7d
2bef7d
* Wed Mar 13 2019 Martin Stransky <stransky@redhat.com> - 60.6.0-1
2bef7d
- Update to 60.6.0 ESR (Build 1)
2bef7d
2e71e2
* Wed Feb 13 2019 Jan Horak <jhorak@redhat.com> - 60.5.1-1
2e71e2
- Update to 60.5.1 ESR
2e71e2
2e71e2
* Wed Feb 6 2019 Martin Stransky <stransky@redhat.com> - 60.5.0-3
2e71e2
- Added fix for rhbz#1672424 - Firefox crashes on NFS drives.
2e71e2
89baa1
* Fri Jan 25 2019 Martin Stransky <stransky@redhat.com> - 60.5.0-2
89baa1
- Updated to 60.5.0 ESR build2
89baa1
89baa1
* Tue Jan 22 2019 Martin Stransky <stransky@redhat.com> - 60.5.0-1
89baa1
- Updated to 60.5.0 ESR build1
89baa1
89baa1
* Thu Jan 10 2019 Jan Horak <jhorak@redhat.com> - 60.4.0-3
89baa1
- Fixing fontconfig warnings (rhbz#1601475)
89baa1
89baa1
* Wed Jan  9 2019 Jan Horak <jhorak@redhat.com> - 60.4.0-2
89baa1
- Added pipewire patch from Tomas Popela (rhbz#1664270)
89baa1
cfe71c
* Wed Dec  5 2018 Jan Horak <jhorak@redhat.com> - 60.4.0-1
cfe71c
- Update to 60.4.0 ESR
cfe71c
cfe71c
* Tue Dec  4 2018 Jan Horak <jhorak@redhat.com> - 60.3.0-2
cfe71c
- Added firefox-gnome-shell-extension
cfe71c
cfe71c
* Fri Oct 19 2018 Jan Horak <jhorak@redhat.com> - 60.3.0-1
cfe71c
- Update to 60.3.0 ESR
cfe71c
357fed
* Wed Oct 10 2018 Jan Horak <jhorak@redhat.com> - 60.2.2-2
357fed
- Added patch for rhbz#1633932
357fed
e1b131
* Tue Oct  2 2018 Jan Horak <jhorak@redhat.com> - 60.2.2-1
e1b131
- Update to 60.2.2 ESR
e1b131
a9e0c2
* Mon Sep 24 2018 Jan Horak <jhorak@redhat.com> - 60.2.1-1
a9e0c2
- Update to 60.2.1 ESR
a9e0c2
3f6015
* Fri Aug 31 2018 Jan Horak <jhorak@redhat.com> - 60.2.0-1
3f6015
- Update to 60.2.0 ESR
3f6015
3f6015
* Tue Aug 28 2018 Jan Horak <jhorak@redhat.com> - 60.1.0-9
3f6015
- Do not set user agent (rhbz#1608065)
3f6015
- GTK dialogs are localized now (rhbz#1619373)
3f6015
- JNLP association works again (rhbz#1607457)
3f6015
3f6015
* Thu Aug 16 2018 Jan Horak <jhorak@redhat.com> - 60.1.0-8
3f6015
- Fixed homepage and bookmarks (rhbz#1606778)
3f6015
- Fixed missing file associations in RHEL6 (rhbz#1613565)
3f6015
3f6015
* Thu Jul 12 2018 Jan Horak <jhorak@redhat.com> - 60.1.0-7
3f6015
- Run at-spi-bus if not running already (for the bundled gtk3)
3f6015
3f6015
* Mon Jul  9 2018 Jan Horak <jhorak@redhat.com> - 60.1.0-6
3f6015
- Fix for missing schemes for bundled gtk3
3f6015
3f6015
* Mon Jun 25 2018 Martin Stransky <stransky@redhat.com> - 60.1.0-5
3f6015
- Added mesa-libEGL dependency to gtk3/rhel6
3f6015
735387
* Sun Jun 24 2018 Martin Stransky <stransky@redhat.com> - 60.1.0-4
735387
- Disabled jemalloc on all second arches
735387
735387
* Fri Jun 22 2018 Martin Stransky <stransky@redhat.com> - 60.1.0-3
735387
- Updated to 60.1.0 ESR build2
735387
735387
* Thu Jun 21 2018 Martin Stransky <stransky@redhat.com> - 60.1.0-2
735387
- Disabled jemalloc on second arches
735387
735387
* Wed Jun 20 2018 Martin Stransky <stransky@redhat.com> - 60.1.0-1
735387
- Updated to 60.1.0 ESR
735387
735387
* Wed Jun 13 2018 Jan Horak <jhorak@redhat.com> - 60.0-12
735387
- Fixing bundled libffi issues
735387
- Readded some requirements
735387
735387
* Mon Jun 11 2018 Martin Stransky <stransky@redhat.com> - 60.0-10
735387
- Added fix for mozilla BZ#1436242 - IPC crashes.
f45f38
735387
* Mon Jun 11 2018 Jan Horak <jhorak@redhat.com> - 60.0-9
735387
- Bundling libffi for the sec-arches
735387
- Added openssl-devel for the Python
735387
- Fixing bundled gtk3
797cfb
735387
* Fri May 18 2018 Martin Stransky <stransky@redhat.com> - 60.0-8
735387
- Added fix for mozilla BZ#1458492
95cbe1
735387
* Wed May 16 2018 Martin Stransky <stransky@redhat.com> - 60.0-7
735387
- Added patch from rhbz#1498561 to fix ppc64(le) crashes.
735387
735387
* Wed May 16 2018 Martin Stransky <stransky@redhat.com> - 60.0-6
735387
- Disabled jemalloc on second arches
735387
735387
* Sun May  6 2018 Jan Horak <jhorak@redhat.com> - 60.0-4
735387
- Update to 60.0 ESR
18755a
0df897
* Thu Mar  8 2018 Jan Horak <jhorak@redhat.com> - 52.7.0-1
0df897
- Update to 52.7.0 ESR
6ecfad
735387
* Mon Jan 29 2018 Martin Stransky <stransky@redhat.com> - 52.6.0-2
735387
- Build Firefox for desktop arches only (x86_64 and ppc64le)
d6dbc3
735387
* Thu Jan 18 2018 Martin Stransky <stransky@redhat.com> - 52.6.0-1
735387
- Update to 52.6.0 ESR
d059fa
0bcd21
* Thu Nov  9 2017 Jan Horak <jhorak@redhat.com> - 52.5.0-1
0bcd21
- Update to 52.5.0 ESR
0bcd21
0bcd21
* Mon Sep 25 2017 Jan Horak <jhorak@redhat.com> - 52.4.0-1
0bcd21
- Update to 52.4.0 ESR
0bcd21
0bcd21
* Thu Aug  3 2017 Jan Horak <jhorak@redhat.com> - 52.3.0-3
0bcd21
- Update to 52.3.0 ESR (b2)
0bcd21
- Require correct nss version
0bcd21
0bcd21
* Tue Jun 13 2017 Jan Horak <jhorak@redhat.com> - 52.2.0-1
0bcd21
- Update to 52.2.0 ESR
0bcd21
0bcd21
* Wed May 24 2017 Jan Horak <jhorak@redhat.com> - 52.1.2-1
0bcd21
- Update to 52.1.2 ESR
0bcd21
0bcd21
* Wed May 24 2017 Jan Horak <jhorak@redhat.com> - 52.0-7
0bcd21
- Added fix for accept language (rhbz#1454322)
0bcd21
0bcd21
* Wed Mar 22 2017 Jan Horak <jhorak@redhat.com> - 52.0-6
0bcd21
- Removing patch required for older NSS from RHEL 7.3
0bcd21
- Added patch for rhbz#1414564
0bcd21
0bcd21
* Fri Mar 17 2017 Martin Stransky <stransky@redhat.com> - 52.0-5
0bcd21
- Added fix for mozbz#1348168/CVE-2017-5428
0bcd21
0bcd21
* Mon Mar  6 2017 Jan Horak <jhorak@redhat.com> - 52.0-4
0bcd21
- Update to 52.0 ESR (b4)
0bcd21
0bcd21
* Thu Mar 2 2017 Martin Stransky <stransky@redhat.com> - 52.0-3
0bcd21
- Added fix for rhbz#1423012 - ppc64 gfx crashes
0bcd21
0bcd21
* Wed Mar  1 2017 Jan Horak <jhorak@redhat.com> - 52.0-2
0bcd21
- Enable system nss
0bcd21
0bcd21
* Tue Feb 28 2017 Martin Stransky <stransky@redhat.com> - 52.0-1
0bcd21
- Update to 52.0ESR (B1)
0bcd21
- Build RHEL7 package for Gtk3
0bcd21
0bcd21
* Mon Feb 27 2017 Martin Stransky <stransky@redhat.com> - 52.0-0.13
0bcd21
- Added fix for rhbz#1414535
0bcd21
0bcd21
* Tue Feb 21 2017 Jan Horak <jhorak@redhat.com> - 52.0-0.12
0bcd21
- Update to 52.0b8
0bcd21
0bcd21
* Tue Feb  7 2017 Jan Horak <jhorak@redhat.com> - 52.0-0.11
0bcd21
- Readded addons patch
0bcd21
0bcd21
* Mon Feb  6 2017 Jan Horak <jhorak@redhat.com> - 52.0-0.10
0bcd21
- Update to 52.0b3
0bcd21
0bcd21
* Tue Jan 31 2017 Jan Horak <jhorak@redhat.com> - 52.0-0.9
0bcd21
- Update to 52.0b2
0bcd21
0bcd21
* Fri Jan 27 2017 Jan Horak <jhorak@redhat.com> - 52.0-0.8
0bcd21
- Update to 52.0b1
0bcd21
0bcd21
* Thu Dec  8 2016 Jan Horak <jhorak@redhat.com> - 52.0-0.5
0bcd21
- Firefox Aurora 52 testing build