MozillaFirefox/MozillaFirefox.spec
branchfirefox67
changeset 1096 4c248180e576
parent 1094 a25638dad81d
child 1097 840132a4a9b3
equal deleted inserted replaced
1095:9c008b241362 1096:4c248180e576
    17 #
    17 #
    18 
    18 
    19 
    19 
    20 # changed with every update
    20 # changed with every update
    21 %define major          67
    21 %define major          67
    22 %define mainver        %major.0
    22 %define mainver        %major.0.4
    23 %define orig_version   67.0
    23 %define orig_version   67.0.4
    24 %define orig_suffix    %{nil}
    24 %define orig_suffix    %{nil}
    25 %define update_channel release
    25 %define update_channel release
    26 %define branding       1
    26 %define branding       1
    27 %define releasedate    20190516215225
    27 %define releasedate    20190619235627
    28 %define source_prefix  firefox-%{orig_version}
    28 %define source_prefix  firefox-%{orig_version}
    29 
    29 
    30 # always build with GCC as SUSE Security Team requires that
    30 # always build with GCC as SUSE Security Team requires that
    31 %define clang_build 0
    31 %define clang_build 0
    32 
    32 
    60 Name:           %{pkgname}
    60 Name:           %{pkgname}
    61 BuildRequires:  Mesa-devel
    61 BuildRequires:  Mesa-devel
    62 BuildRequires:  alsa-devel
    62 BuildRequires:  alsa-devel
    63 BuildRequires:  autoconf213
    63 BuildRequires:  autoconf213
    64 BuildRequires:  dbus-1-glib-devel
    64 BuildRequires:  dbus-1-glib-devel
       
    65 BuildRequires:  dejavu-fonts
    65 BuildRequires:  fdupes
    66 BuildRequires:  fdupes
    66 BuildRequires:  memory-constraints
    67 BuildRequires:  memory-constraints
    67 %if 0%{?suse_version} <= 1320
    68 %if 0%{?suse_version} <= 1320
    68 BuildRequires:  gcc7-c++
    69 BuildRequires:  gcc7-c++
    69 %else
    70 %else
    88 BuildRequires:  rust-cbindgen >= 0.8.2
    89 BuildRequires:  rust-cbindgen >= 0.8.2
    89 BuildRequires:  startup-notification-devel
    90 BuildRequires:  startup-notification-devel
    90 BuildRequires:  unzip
    91 BuildRequires:  unzip
    91 BuildRequires:  update-desktop-files
    92 BuildRequires:  update-desktop-files
    92 BuildRequires:  xorg-x11-libXt-devel
    93 BuildRequires:  xorg-x11-libXt-devel
       
    94 BuildRequires:  xvfb-run
    93 BuildRequires:  yasm
    95 BuildRequires:  yasm
    94 BuildRequires:  zip
    96 BuildRequires:  zip
    95 %if 0%{?suse_version} < 1550
    97 %if 0%{?suse_version} < 1550
    96 BuildRequires:  pkgconfig(gconf-2.0)
    98 BuildRequires:  pkgconfig(gconf-2.0)
    97 %endif
    99 %endif
   166 Patch11:        mozilla-fix-aarch64-libopus.patch
   168 Patch11:        mozilla-fix-aarch64-libopus.patch
   167 Patch12:        mozilla-disable-wasm-emulate-arm-unaligned-fp-access.patch
   169 Patch12:        mozilla-disable-wasm-emulate-arm-unaligned-fp-access.patch
   168 # Firefox/browser
   170 # Firefox/browser
   169 Patch101:       firefox-kde.patch
   171 Patch101:       firefox-kde.patch
   170 Patch102:       firefox-branded-icons.patch
   172 Patch102:       firefox-branded-icons.patch
       
   173 Patch103:       firefox-add-kde.js-in-order-to-survive-PGO-build.patch
   171 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
   174 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
   172 Requires(post):   coreutils shared-mime-info desktop-file-utils
   175 Requires(post):   coreutils shared-mime-info desktop-file-utils
   173 Requires(postun): shared-mime-info desktop-file-utils
   176 Requires(postun): shared-mime-info desktop-file-utils
   174 %if %branding
   177 %if %branding
   175 Requires:       %{name}-branding > 44.0
   178 Requires:       %{name}-branding > 44.0
   274 %patch11 -p1
   277 %patch11 -p1
   275 %patch12 -p1
   278 %patch12 -p1
   276 # Firefox
   279 # Firefox
   277 %patch101 -p1
   280 %patch101 -p1
   278 %patch102 -p1
   281 %patch102 -p1
       
   282 %patch103 -p1
   279 
   283 
   280 %build
   284 %build
   281 # no need to add build time to binaries
   285 # no need to add build time to binaries
   282 modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/MozillaFirefox.changes")"
   286 modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/MozillaFirefox.changes")"
   283 DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
   287 DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
   386 %endif
   390 %endif
   387 %ifarch x86_64
   391 %ifarch x86_64
   388 # LTO needs newer toolchain stack only (at least GCC 8.2.1 (r268506)
   392 # LTO needs newer toolchain stack only (at least GCC 8.2.1 (r268506)
   389 %if 0%{?suse_version} > 1500
   393 %if 0%{?suse_version} > 1500
   390 ac_add_options --enable-lto
   394 ac_add_options --enable-lto
       
   395 ac_add_options MOZ_PGO=1
   391 %endif
   396 %endif
   392 %endif
   397 %endif
   393 EOF
   398 EOF
   394 ./mach build
   399 xvfb-run --server-args="-screen 0 1920x1080x24" ./mach build
   395 
   400 
   396 %install
   401 %install
   397 cd $RPM_BUILD_DIR/obj
   402 cd $RPM_BUILD_DIR/obj
   398 source %{SOURCE5}
   403 source %{SOURCE5}
   399 export MOZ_SOURCE_STAMP=$REV
   404 export MOZ_SOURCE_STAMP=$REV