diff --git a/.gitignore b/.gitignore index 9afdbbe..3ca893c 100644 --- a/.gitignore +++ b/.gitignore @@ -265,3 +265,5 @@ firefox-3.6.4.source.tar.bz2 /firefox-langpacks-57.0b12-20171030.tar.xz /firefox-57.0b14.source.tar.xz /firefox-langpacks-57.0b14-20171106.tar.xz +/firefox-57.0.source.tar.xz +/firefox-langpacks-57.0-20171109.tar.xz diff --git a/firefox.spec b/firefox.spec index 2ce4939..ba572a5 100644 --- a/firefox.spec +++ b/firefox.spec @@ -3,59 +3,59 @@ ExcludeArch: armv7hl %endif # Use system nspr/nss? -%define system_nss 1 +%global system_nss 1 # Use system hunspell? %if 0%{?fedora} > 25 -%define system_hunspell 1 +%global system_hunspell 1 %else -%define system_hunspell 0 +%global system_hunspell 0 %endif # Use system sqlite? %if 0%{?fedora} > 27 -%define system_sqlite 1 +%global system_sqlite 1 %else -%define system_sqlite 0 +%global system_sqlite 0 %endif -%define system_ffi 1 +%global system_ffi 1 # Use system cairo? -%define system_cairo 0 +%global system_cairo 0 # Use system libvpx? -%define system_libvpx 1 +%global system_libvpx 1 # Use system libicu? %if 0%{?fedora} > 27 -%define system_libicu 0 +%global system_libicu 0 %else -%define system_libicu 0 +%global system_libicu 0 %endif # Big endian platforms %ifarch ppc64 s390x # Javascript Intl API is not supported on big endian platforms right now: # https://bugzilla.mozilla.org/show_bug.cgi?id=1322212 -%define big_endian 1 +%global big_endian 1 %endif # Hardened build? -%define hardened_build 1 +%global hardened_build 1 -%define system_jpeg 1 +%global system_jpeg 1 %ifarch %{ix86} x86_64 -%define run_tests 0 +%global run_tests 0 %else -%define run_tests 0 +%global run_tests 0 %endif # Build as a debug package? -%define debug_build 0 +%global debug_build 0 -%define default_bookmarks_file %{_datadir}/bookmarks/default-bookmarks.html -%define firefox_app_id \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} +%global default_bookmarks_file %{_datadir}/bookmarks/default-bookmarks.html +%global firefox_app_id \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} # Minimal required versions %global cairo_version 1.13.1 %global freetype_version 2.1.9 @@ -81,21 +81,19 @@ ExcludeArch: armv7hl %global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) %endif -%define pre_version b14 - %global mozappdir %{_libdir}/%{name} %global mozappdirdev %{_libdir}/%{name}-devel-%{version} %global langpackdir %{mozappdir}/langpacks %global tarballdir %{name}-%{version}%{?pre_version} -%define official_branding 1 -%define build_langpacks 1 +%global official_branding 1 +%global build_langpacks 1 -%define enable_mozilla_crashreporter 0 +%global enable_mozilla_crashreporter 0 %if !%{debug_build} %ifarch %{ix86} x86_64 %if 0%{?fedora} < 27 -%define enable_mozilla_crashreporter 1 +%global enable_mozilla_crashreporter 1 %endif %endif %endif @@ -103,13 +101,12 @@ ExcludeArch: armv7hl Summary: Mozilla Firefox Web browser Name: firefox Version: 57.0 -Release: 0.9%{?pre_tag}%{?dist} +Release: 1%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ -Group: Applications/Internet Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz %if %{build_langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20171106.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20171109.tar.xz %endif Source10: firefox-mozconfig Source12: firefox-redhat-default-prefs.js @@ -274,25 +271,21 @@ compliance, performance and portability. %global crashreporter_pkg_name mozilla-crashreporter-%{name}-debuginfo %package -n %{crashreporter_pkg_name} Summary: Debugging symbols used by Mozilla's crash reporter servers -Group: Development/Debug %description -n %{crashreporter_pkg_name} This package provides debug information for Firefox, for use by Mozilla's crash reporter servers. If you are trying to locally debug %{name}, you want to install %{name}-debuginfo instead. %files -n %{crashreporter_pkg_name} -f debugcrashreporter.list -%defattr(-,root,root) %endif %if %{run_tests} %global testsuite_pkg_name mozilla-%{name}-testresults %package -n %{testsuite_pkg_name} Summary: Results of testsuite -Group: Development/Debug %description -n %{testsuite_pkg_name} This package contains results of tests executed during build. %files -n %{testsuite_pkg_name} /test_results -%defattr(-,root,root) %endif #--------------------------------------------------------------------- @@ -402,19 +395,19 @@ echo "ac_add_options --disable-system-hunspell" >> .mozconfig echo "ac_add_options --enable-debug" >> .mozconfig echo "ac_add_options --disable-optimize" >> .mozconfig %else -%define optimize_flags "none" +%global optimize_flags "none" # Fedora 26 (gcc7) needs to disable default build flags (mozbz#1342344) %if 0%{?fedora} > 25 %ifnarch s390 s390x -%define optimize_flags "-g -O2" +%global optimize_flags "-g -O2" %endif %endif %ifarch armv7hl # ARMv7 need that (rhbz#1426850) -%define optimize_flags "-g -O2 -fno-schedule-insns" +%global optimize_flags "-g -O2 -fno-schedule-insns" %endif %ifarch ppc64le aarch64 -%define optimize_flags "-g -O2" +%global optimize_flags "-g -O2" %endif %if %{optimize_flags} != "none" echo 'ac_add_options --enable-optimize=%{?optimize_flags}' >> .mozconfig @@ -497,7 +490,7 @@ find ./ -name config.guess -exec cp /usr/lib/rpm/config.guess {} ';' # # Disable C++ exceptions since Mozilla code is not exception-safe # -MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | %{__sed} -e 's/-Wall//') +MOZ_OPT_FLAGS=$(echo "%{optflags}" | %{__sed} -e 's/-Wall//') #rhbz#1037063 # -Werror=format-security causes build failures when -Wno-format is explicitly given # for some sources @@ -593,32 +586,32 @@ rm -f objdir/dist/bin/pk12util pref("general.useragent.locale", "chrome://global/locale/intl.properties"); EOF -DESTDIR=$RPM_BUILD_ROOT make -C objdir install +DESTDIR=%{buildroot} make -C objdir install -%{__mkdir_p} $RPM_BUILD_ROOT{%{_libdir},%{_bindir},%{_datadir}/applications} +%{__mkdir_p} %{buildroot}{%{_libdir},%{_bindir},%{_datadir}/applications} -desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE20} +desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE20} # set up the firefox start script -%{__rm} -rf $RPM_BUILD_ROOT%{_bindir}/firefox -%{__cat} %{SOURCE21} > $RPM_BUILD_ROOT%{_bindir}/firefox -%{__chmod} 755 $RPM_BUILD_ROOT%{_bindir}/firefox +%{__rm} -rf %{buildroot}%{_bindir}/firefox +%{__cat} %{SOURCE21} > %{buildroot}%{_bindir}/firefox +%{__chmod} 755 %{buildroot}%{_bindir}/firefox -%{__install} -p -D -m 644 %{SOURCE23} $RPM_BUILD_ROOT%{_mandir}/man1/firefox.1 +%{__install} -p -D -m 644 %{SOURCE23} %{buildroot}%{_mandir}/man1/firefox.1 -%{__rm} -f $RPM_BUILD_ROOT/%{mozappdir}/firefox-config -%{__rm} -f $RPM_BUILD_ROOT/%{mozappdir}/update-settings.ini +%{__rm} -f %{buildroot}/%{mozappdir}/firefox-config +%{__rm} -f %{buildroot}/%{mozappdir}/update-settings.ini for s in 16 22 24 32 48 256; do - %{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps + %{__mkdir_p} %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps %{__cp} -p browser/branding/official/default${s}.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/firefox.png + %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps/firefox.png done # Install hight contrast icon -%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/symbolic/apps +%{__mkdir_p} %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps %{__cp} -p %{SOURCE25} \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/symbolic/apps + %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps # Register as an application to be visible in the software center # @@ -627,8 +620,8 @@ done # # See http://www.freedesktop.org/software/appstream/docs/ for more details. # -mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata -cat > $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml < %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml <