MozillaFirefox/MozillaFirefox.spec
changeset 1088 84cdfb476431
parent 1087 5fab52cd743d
child 1113 8e9195853a32
equal deleted inserted replaced
1074:4b99400f6d17 1088:84cdfb476431
     1 #
     1 #
     2 # spec file for package MozillaFirefox
     2 # spec file for package MozillaFirefox
     3 #
     3 #
     4 # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
     4 # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
     5 #               2006-2018 Wolfgang Rosenauer
     5 #               2006-2019 Wolfgang Rosenauer
     6 #
     6 #
     7 # All modifications and additions to the file contributed by third parties
     7 # All modifications and additions to the file contributed by third parties
     8 # remain the property of their copyright owners, unless otherwise agreed
     8 # remain the property of their copyright owners, unless otherwise agreed
     9 # upon. The license for this file, and modifications and additions to the
     9 # upon. The license for this file, and modifications and additions to the
    10 # file, is the same license as for the pristine package itself (unless the
    10 # file, is the same license as for the pristine package itself (unless the
    11 # license for the pristine package is not an Open Source License, in which
    11 # license for the pristine package is not an Open Source License, in which
    12 # case the license is the MIT License). An "Open Source License" is a
    12 # case the license is the MIT License). An "Open Source License" is a
    13 # license that conforms to the Open Source Definition (Version 1.9)
    13 # license that conforms to the Open Source Definition (Version 1.9)
    14 # published by the Open Source Initiative.
    14 # published by the Open Source Initiative.
    15 
    15 
    16 # Please submit bugfixes or comments via http://bugs.opensuse.org/
    16 # Please submit bugfixes or comments via https://bugs.opensuse.org/
    17 #
    17 #
    18 
    18 
    19 
    19 
    20 # changed with every update
    20 # changed with every update
    21 %define major          62
    21 %define major          65
    22 %define mainver        %major.99
    22 %define mainver        %major.0.1
    23 %define orig_version   63.0
    23 %define orig_version   65.0.1
    24 %define orig_suffix    b14
    24 %define orig_suffix    %{nil}
    25 %define update_channel beta
    25 %define update_channel beta
    26 %define branding       1
    26 %define branding       1
    27 %define releasedate    20181011200118
    27 %define releasedate    20190211233335
    28 %define source_prefix  firefox-%{orig_version}
    28 %define source_prefix  firefox-%{orig_version}
    29 
    29 
    30 # PIE, full relro (x86_64 for now)
    30 # always build with GCC as SUSE Security Team requires that
       
    31 %define clang_build 0
       
    32 
       
    33 # PIE, full relro
    31 %define build_hardened 1
    34 %define build_hardened 1
    32 
    35 
    33 # Firefox only supports i686
    36 # Firefox only supports i686
    34 %ifarch %ix86
    37 %ifarch %ix86
    35 ExclusiveArch:  i586 i686
    38 ExclusiveArch:  i586 i686
    64 %if 0%{?suse_version} <= 1320
    67 %if 0%{?suse_version} <= 1320
    65 BuildRequires:  gcc7-c++
    68 BuildRequires:  gcc7-c++
    66 %else
    69 %else
    67 BuildRequires:  gcc-c++
    70 BuildRequires:  gcc-c++
    68 %endif
    71 %endif
    69 BuildRequires:  cargo
    72 BuildRequires:  cargo >= 1.30
    70 BuildRequires:  libXcomposite-devel
    73 BuildRequires:  libXcomposite-devel
    71 BuildRequires:  libcurl-devel
    74 BuildRequires:  libcurl-devel
    72 BuildRequires:  libidl-devel
    75 BuildRequires:  libidl-devel
    73 BuildRequires:  libiw-devel
    76 BuildRequires:  libiw-devel
    74 BuildRequires:  libnotify-devel
    77 BuildRequires:  libnotify-devel
    75 BuildRequires:  libproxy-devel
    78 BuildRequires:  libproxy-devel
    76 BuildRequires:  makeinfo
    79 BuildRequires:  makeinfo
    77 BuildRequires:  mozilla-nspr-devel >= 4.20
    80 BuildRequires:  mozilla-nspr-devel >= 4.20
    78 BuildRequires:  mozilla-nss-devel >= 3.39
    81 BuildRequires:  mozilla-nss-devel >= 3.41
       
    82 BuildRequires:  nodejs >= 8.11
    79 BuildRequires:  python-devel
    83 BuildRequires:  python-devel
    80 BuildRequires:  python2-xml
    84 BuildRequires:  python2-xml
    81 BuildRequires:  python3 >= 3.5
    85 BuildRequires:  python3 >= 3.5
    82 BuildRequires:  rust >= 1.28
    86 BuildRequires:  rust >= 1.30
    83 BuildRequires:  rust-std
    87 BuildRequires:  rust-cbindgen >= 0.6.7
    84 BuildRequires:  startup-notification-devel
    88 BuildRequires:  startup-notification-devel
    85 BuildRequires:  unzip
    89 BuildRequires:  unzip
    86 BuildRequires:  update-desktop-files
    90 BuildRequires:  update-desktop-files
    87 BuildRequires:  xorg-x11-libXt-devel
    91 BuildRequires:  xorg-x11-libXt-devel
    88 BuildRequires:  yasm
    92 BuildRequires:  yasm
   153 # Gecko/Toolkit
   157 # Gecko/Toolkit
   154 Patch1:         mozilla-nongnome-proxies.patch
   158 Patch1:         mozilla-nongnome-proxies.patch
   155 Patch2:         mozilla-kde.patch
   159 Patch2:         mozilla-kde.patch
   156 Patch3:         mozilla-ntlm-full-path.patch
   160 Patch3:         mozilla-ntlm-full-path.patch
   157 Patch4:         mozilla-openaes-decl.patch
   161 Patch4:         mozilla-openaes-decl.patch
   158 Patch6:         mozilla-reduce-files-per-UnifiedBindings.patch
       
   159 Patch7:         mozilla-aarch64-startup-crash.patch
   162 Patch7:         mozilla-aarch64-startup-crash.patch
   160 Patch8:         mozilla-bmo256180.patch
   163 Patch8:         mozilla-bmo256180.patch
       
   164 Patch9:         mozilla-bmo1463035.patch
       
   165 Patch10:        mozilla-cubeb-noreturn.patch
   161 # Firefox/browser
   166 # Firefox/browser
   162 Patch101:       firefox-kde.patch
   167 Patch101:       firefox-kde.patch
   163 Patch102:       firefox-branded-icons.patch
   168 Patch102:       firefox-branded-icons.patch
   164 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
   169 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
   165 Requires(post):   coreutils shared-mime-info desktop-file-utils
   170 Requires(post):   coreutils shared-mime-info desktop-file-utils
   259 cd $RPM_BUILD_DIR/%{source_prefix}
   264 cd $RPM_BUILD_DIR/%{source_prefix}
   260 %patch1 -p1
   265 %patch1 -p1
   261 %patch2 -p1
   266 %patch2 -p1
   262 %patch3 -p1
   267 %patch3 -p1
   263 %patch4 -p1
   268 %patch4 -p1
   264 %ifarch %ix86
       
   265 %patch6 -p1
       
   266 %endif
       
   267 %patch7 -p1
   269 %patch7 -p1
   268 %patch8 -p1
   270 %patch8 -p1
       
   271 %patch9 -p1
       
   272 %patch10 -p1
   269 # Firefox
   273 # Firefox
   270 %patch101 -p1
   274 %patch101 -p1
   271 %patch102 -p1
   275 %patch102 -p1
   272 
   276 
   273 %build
   277 %build
   291 export MOZILLA_OFFICIAL=1
   295 export MOZILLA_OFFICIAL=1
   292 export BUILD_OFFICIAL=1
   296 export BUILD_OFFICIAL=1
   293 export MOZ_TELEMETRY_REPORTING=1
   297 export MOZ_TELEMETRY_REPORTING=1
   294 %if 0%{?suse_version} <= 1320
   298 %if 0%{?suse_version} <= 1320
   295 export CC=gcc-7
   299 export CC=gcc-7
   296 %endif
   300 %else
   297 export CFLAGS="%{optflags} -fno-strict-aliasing"
   301 %if 0%{?clang_build} == 0
   298 # boo#986541: add -fno-delete-null-pointer-checks for gcc6
   302 export CC=gcc
   299 %if 0%{?suse_version} > 1320
   303 export CXX=g++
   300 export CFLAGS="$CFLAGS -fno-delete-null-pointer-checks"
   304 %endif
   301 %endif
       
   302 %ifarch %arm
       
   303 export CFLAGS="${CFLAGS/-g / }"
       
   304 %endif
   305 %endif
   305 %ifarch %arm %ix86
   306 %ifarch %arm %ix86
   306 # Limit RAM usage during link
   307 # Limit RAM usage during link
   307 export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
   308 export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
   308 %endif
   309 %endif
   309 %if 0%{?build_hardened}
   310 %if 0%{?build_hardened}
   310 %ifarch x86_64
   311 export LDFLAGS="${LDFLAGS} -fPIC -Wl,-z,relro,-z,now"
   311 export LDFLAGS="${LDFLAGS} -Wl,-z,relro,-z,now"
       
   312 %endif
       
   313 %endif
   312 %endif
   314 %ifarch ppc64 ppc64le
   313 %ifarch ppc64 ppc64le
       
   314 %if 0%{?clang_build} == 0
   315 export CFLAGS="$CFLAGS -mminimal-toc"
   315 export CFLAGS="$CFLAGS -mminimal-toc"
   316 %endif
   316 %endif
       
   317 %endif
   317 export CXXFLAGS="$CFLAGS"
   318 export CXXFLAGS="$CFLAGS"
   318 %ifarch %{arm}
       
   319 export RUSTFLAGS="-Cdebuginfo=0"
       
   320 %endif
       
   321 export MOZCONFIG=$RPM_BUILD_DIR/mozconfig
   319 export MOZCONFIG=$RPM_BUILD_DIR/mozconfig
   322 %limit_build -m 1500
   320 %limit_build -m 1500
   323 cat << EOF > $MOZCONFIG
   321 cat << EOF > $MOZCONFIG
   324 mk_add_options MOZILLA_OFFICIAL=1
   322 mk_add_options MOZILLA_OFFICIAL=1
   325 mk_add_options BUILD_OFFICIAL=1
   323 mk_add_options BUILD_OFFICIAL=1
   332 ac_add_options --enable-release
   330 ac_add_options --enable-release
   333 ac_add_options --enable-default-toolkit=cairo-gtk3
   331 ac_add_options --enable-default-toolkit=cairo-gtk3
   334 %if 0%{?suse_version} >= 1550
   332 %if 0%{?suse_version} >= 1550
   335 ac_add_options --disable-gconf
   333 ac_add_options --disable-gconf
   336 %endif
   334 %endif
   337 %if 0%{?build_hardened}
       
   338 ac_add_options --enable-pie
       
   339 %endif
       
   340 # gcc7 (boo#104105)
       
   341 %if 0%{?suse_version} > 1320
       
   342 ac_add_options --enable-optimize="-g -O2"
       
   343 %endif
       
   344 %ifarch %arm
       
   345 %if 0%{?suse_version} > 1230
       
   346 ac_add_options --disable-optimize
       
   347 %endif
       
   348 %endif
       
   349 # bmo#1441155 - Disable the generation of Rust debug symbols on Linux32
   335 # bmo#1441155 - Disable the generation of Rust debug symbols on Linux32
   350 %ifarch %ix86
   336 %ifarch %ix86 %arm
   351 ac_add_options --disable-debug-symbols
   337 ac_add_options --disable-debug-symbols
   352 %endif
   338 %else
   353 %ifarch %arm
   339 ac_add_options --enable-debug-symbols
       
   340 %endif
       
   341 %if 0%{?suse_version} > 1549
       
   342 %ifnarch aarch64 ppc64 ppc64le
   354 ac_add_options --disable-elf-hack
   343 ac_add_options --disable-elf-hack
       
   344 %endif
   355 %endif
   345 %endif
   356 ac_add_options --with-system-nspr
   346 ac_add_options --with-system-nspr
   357 ac_add_options --with-system-nss
   347 ac_add_options --with-system-nss
   358 %if %{localize}
   348 %if %{localize}
   359 ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n
   349 ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n
   387 ac_add_options --with-arch=armv7-a
   377 ac_add_options --with-arch=armv7-a
   388 %endif
   378 %endif
   389 %endif
   379 %endif
   390 %ifarch aarch64 %arm s390x
   380 %ifarch aarch64 %arm s390x
   391 ac_add_options --disable-webrtc
   381 ac_add_options --disable-webrtc
       
   382 %endif
       
   383 %ifarch x86_64
       
   384 # LTO needs newer toolchain stack only (at least GCC 8.2.1 (r268506)
       
   385 %if 0%{?suse_version} > 1500
       
   386 ac_add_options --enable-lto
       
   387 %endif
   392 %endif
   388 %endif
   393 EOF
   389 EOF
   394 ./mach build
   390 ./mach build
   395 
   391 
   396 %install
   392 %install