1 # |
1 # |
2 # spec file for package MozillaFirefox |
2 # spec file for package MozillaFirefox |
3 # |
3 # |
4 # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. |
4 # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. |
5 # 2006-2019 Wolfgang Rosenauer |
5 # 2006-2019 Wolfgang Rosenauer <wr@rosenauer.org> |
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 |
16 # Please submit bugfixes or comments via https://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 67 |
21 %define major 68 |
22 %define mainver %major.0.4 |
22 %define mainver %major.0 |
23 %define orig_version 67.0.4 |
23 %define orig_version 68.0 |
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 20190619235627 |
27 %define releasedate 20190705220548 |
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 |
68 %if 0%{?suse_version} <= 1320 |
68 %if 0%{?suse_version} <= 1320 |
69 BuildRequires: gcc7-c++ |
69 BuildRequires: gcc7-c++ |
70 %else |
70 %else |
71 BuildRequires: gcc-c++ |
71 BuildRequires: gcc-c++ |
72 %endif |
72 %endif |
73 BuildRequires: cargo >= 1.32 |
73 BuildRequires: cargo >= 1.34 |
74 BuildRequires: libXcomposite-devel |
74 BuildRequires: libXcomposite-devel |
75 BuildRequires: libcurl-devel |
75 BuildRequires: libcurl-devel |
76 BuildRequires: libidl-devel |
76 BuildRequires: libidl-devel |
77 BuildRequires: libiw-devel |
77 BuildRequires: libiw-devel |
78 BuildRequires: libnotify-devel |
78 BuildRequires: libnotify-devel |
79 BuildRequires: libproxy-devel |
79 BuildRequires: libproxy-devel |
80 BuildRequires: makeinfo |
80 BuildRequires: makeinfo |
81 BuildRequires: mozilla-nspr-devel >= 4.21 |
81 BuildRequires: mozilla-nspr-devel >= 4.21 |
82 BuildRequires: mozilla-nss-devel >= 3.43 |
82 BuildRequires: mozilla-nss-devel >= 3.44.1 |
83 BuildRequires: nasm >= 2.13 |
83 BuildRequires: nasm >= 2.13 |
84 BuildRequires: nodejs >= 8.11 |
84 BuildRequires: nodejs >= 8.11 |
85 BuildRequires: python-devel |
85 BuildRequires: python-devel |
86 BuildRequires: python2-xml |
86 BuildRequires: python2-xml |
87 BuildRequires: python3 >= 3.5 |
87 BuildRequires: python3 >= 3.5 |
88 BuildRequires: rust >= 1.32 |
88 BuildRequires: rust >= 1.34 |
89 BuildRequires: rust-cbindgen >= 0.8.2 |
89 BuildRequires: rust-cbindgen >= 0.8.7 |
90 BuildRequires: startup-notification-devel |
90 BuildRequires: startup-notification-devel |
91 BuildRequires: unzip |
91 BuildRequires: unzip |
92 BuildRequires: update-desktop-files |
92 BuildRequires: update-desktop-files |
93 BuildRequires: xorg-x11-libXt-devel |
93 BuildRequires: xorg-x11-libXt-devel |
94 BuildRequires: xvfb-run |
94 BuildRequires: xvfb-run |
95 BuildRequires: yasm |
95 BuildRequires: yasm |
96 BuildRequires: zip |
96 BuildRequires: zip |
97 %if 0%{?suse_version} < 1550 |
97 %if 0%{?suse_version} < 1550 |
98 BuildRequires: pkgconfig(gconf-2.0) |
98 BuildRequires: pkgconfig(gconf-2.0) >= 1.2.1 |
99 %endif |
99 %endif |
100 BuildRequires: pkgconfig(gdk-x11-2.0) |
100 BuildRequires: pkgconfig(gdk-x11-2.0) |
101 BuildRequires: pkgconfig(glib-2.0) >= 2.22 |
101 BuildRequires: pkgconfig(glib-2.0) >= 2.22 |
102 BuildRequires: pkgconfig(gobject-2.0) |
102 BuildRequires: pkgconfig(gobject-2.0) |
103 BuildRequires: pkgconfig(gtk+-2.0) >= 2.18.0 |
103 BuildRequires: pkgconfig(gtk+-2.0) >= 2.18.0 |
136 Url: http://www.mozilla.org/ |
136 Url: http://www.mozilla.org/ |
137 Source: http://ftp.mozilla.org/pub/firefox/releases/%{version}/source/firefox-%{orig_version}%{orig_suffix}.source.tar.xz |
137 Source: http://ftp.mozilla.org/pub/firefox/releases/%{version}/source/firefox-%{orig_version}%{orig_suffix}.source.tar.xz |
138 Source1: MozillaFirefox.desktop |
138 Source1: MozillaFirefox.desktop |
139 Source2: MozillaFirefox-rpmlintrc |
139 Source2: MozillaFirefox-rpmlintrc |
140 Source3: mozilla.sh.in |
140 Source3: mozilla.sh.in |
|
141 Source4: tar_stamps |
141 Source5: source-stamp.txt |
142 Source5: source-stamp.txt |
142 Source6: kde.js |
143 Source6: kde.js |
143 Source7: l10n-%{orig_version}%{orig_suffix}.tar.xz |
144 Source7: l10n-%{orig_version}%{orig_suffix}.tar.xz |
144 Source8: firefox-mimeinfo.xml |
145 Source8: firefox-mimeinfo.xml |
145 Source9: firefox.js |
146 Source9: firefox.js |
146 Source10: compare-locales.tar.xz |
147 Source10: compare-locales.tar.xz |
147 Source11: firefox.1 |
148 Source11: firefox.1 |
148 Source12: mozilla-get-app-id |
149 Source12: mozilla-get-app-id |
149 Source13: spellcheck.js |
150 Source13: spellcheck.js |
150 Source14: create-tar.sh |
151 Source14: https://github.com/openSUSE/firefox-scripts/raw/master/create-tar.sh |
151 Source15: firefox-appdata.xml |
152 Source15: firefox-appdata.xml |
152 Source16: MozillaFirefox.changes |
153 Source16: MozillaFirefox.changes |
153 # Set up API keys, see http://www.chromium.org/developers/how-tos/api-keys |
154 # Set up API keys, see http://www.chromium.org/developers/how-tos/api-keys |
154 # Note: these are for the openSUSE Firefox builds ONLY. For your own distribution, |
155 # Note: these are for the openSUSE Firefox builds ONLY. For your own distribution, |
155 # please get your own set of keys. |
156 # please get your own set of keys. |
156 Source18: mozilla-api-key |
157 Source18: mozilla-api-key |
157 Source19: google-api-key |
158 Source19: google-api-key |
158 Source20: http://ftp.mozilla.org/pub/firefox/releases/%{version}/source/firefox-%{orig_version}%{orig_suffix}.source.tar.xz.asc |
159 Source20: https://ftp.mozilla.org/pub/%{progname}/releases/%{version}/source/%{progname}-%{orig_version}%{orig_suffix}.source.tar.xz.asc |
159 Source21: mozilla.keyring |
160 Source21: mozilla.keyring |
160 # Gecko/Toolkit |
161 # Gecko/Toolkit |
161 Patch1: mozilla-nongnome-proxies.patch |
162 Patch1: mozilla-nongnome-proxies.patch |
162 Patch2: mozilla-kde.patch |
163 Patch2: mozilla-kde.patch |
163 Patch3: mozilla-ntlm-full-path.patch |
164 Patch3: mozilla-ntlm-full-path.patch |
164 Patch4: mozilla-openaes-decl.patch |
165 Patch4: mozilla-openaes-decl.patch |
165 Patch7: mozilla-aarch64-startup-crash.patch |
166 Patch5: mozilla-aarch64-startup-crash.patch |
166 Patch9: mozilla-bmo1463035.patch |
167 Patch6: mozilla-bmo1463035.patch |
167 Patch10: mozilla-cubeb-noreturn.patch |
168 Patch7: mozilla-cubeb-noreturn.patch |
168 Patch11: mozilla-fix-aarch64-libopus.patch |
169 Patch8: mozilla-fix-aarch64-libopus.patch |
169 Patch12: mozilla-disable-wasm-emulate-arm-unaligned-fp-access.patch |
170 Patch9: mozilla-disable-wasm-emulate-arm-unaligned-fp-access.patch |
|
171 Patch10: mozilla-gcc-internal-compiler-error.patch |
|
172 Patch11: mozilla-s390-context.patch |
|
173 Patch12: mozilla-s390-bigendian.patch |
|
174 Patch13: mozilla-reduce-rust-debuginfo.patch |
|
175 Patch14: mozilla-ppc-altivec_static_inline.patch |
|
176 Patch15: mozilla-bmo1005535.patch |
170 # Firefox/browser |
177 # Firefox/browser |
171 Patch101: firefox-kde.patch |
178 Patch101: firefox-kde.patch |
172 Patch102: firefox-branded-icons.patch |
179 Patch102: firefox-branded-icons.patch |
173 Patch103: firefox-add-kde.js-in-order-to-survive-PGO-build.patch |
180 Patch103: firefox-add-kde.js-in-order-to-survive-PGO-build.patch |
174 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
181 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
207 |
214 |
208 %if %localize |
215 %if %localize |
209 %package translations-common |
216 %package translations-common |
210 Summary: Common translations for %{appname} |
217 Summary: Common translations for %{appname} |
211 Group: System/Localization |
218 Group: System/Localization |
212 Provides: locale(%{name}:ar;ca;cs;da;de;en_GB;el;es_AR;es_CL;es_ES;fi;fr;hu;it;ja;ko;nb_NO;nl;pl;pt_BR;pt_PT;ru;sv_SE;zh_CN;zh_TW) |
219 Provides: locale(%{name}:ar;ca;cs;da;de;el;en_GB;es_AR;es_CL;es_ES;fi;fr;hu;it;ja;ko;nb_NO;nl;pl;pt_BR;pt_PT;ru;sv_SE;zh_CN;zh_TW) |
213 Requires: %{name} = %{version} |
220 Requires: %{name} = %{version} |
214 Obsoletes: %{name}-translations < %{version}-%{release} |
221 Obsoletes: %{name}-translations < %{version}-%{release} |
215 |
222 |
216 %description translations-common |
223 %description translations-common |
217 This package contains several common languages for the user interface |
224 This package contains several common languages for the user interface |
260 symbols meant for upload to Mozilla's crash collector database. |
267 symbols meant for upload to Mozilla's crash collector database. |
261 %endif |
268 %endif |
262 |
269 |
263 %prep |
270 %prep |
264 %if %localize |
271 %if %localize |
|
272 |
|
273 # If generated incorrectly, the tarball will be ~270B in |
|
274 # size, so 1MB seems like good enough limit to check. |
|
275 MINSIZE=1048576 |
|
276 if (( $(stat -c%s "%{SOURCE7}") < MINSIZE)); then |
|
277 echo "Translations tarball %{SOURCE7} not generated properly." |
|
278 exit 1 |
|
279 fi |
|
280 |
265 %setup -q -n %{source_prefix} -b 7 -b 10 |
281 %setup -q -n %{source_prefix} -b 7 -b 10 |
266 %else |
282 %else |
267 %setup -q -n %{source_prefix} |
283 %setup -q -n %{source_prefix} |
268 %endif |
284 %endif |
269 cd $RPM_BUILD_DIR/%{source_prefix} |
285 cd $RPM_BUILD_DIR/%{source_prefix} |
270 %patch1 -p1 |
286 %patch1 -p1 |
271 %patch2 -p1 |
287 %patch2 -p1 |
272 %patch3 -p1 |
288 %patch3 -p1 |
273 %patch4 -p1 |
289 %patch4 -p1 |
|
290 %patch5 -p1 |
|
291 %patch6 -p1 |
274 %patch7 -p1 |
292 %patch7 -p1 |
|
293 %patch8 -p1 |
275 %patch9 -p1 |
294 %patch9 -p1 |
276 %patch10 -p1 |
295 %patch10 -p1 |
277 %patch11 -p1 |
296 %patch11 -p1 |
|
297 %ifarch s390x |
278 %patch12 -p1 |
298 %patch12 -p1 |
|
299 %endif |
|
300 %patch13 -p1 |
|
301 %patch14 -p1 |
|
302 %patch15 -p1 |
279 # Firefox |
303 # Firefox |
280 %patch101 -p1 |
304 %patch101 -p1 |
281 %patch102 -p1 |
305 %patch102 -p1 |
282 %patch103 -p1 |
306 %patch103 -p1 |
283 |
307 |
284 %build |
308 %build |
285 # no need to add build time to binaries |
309 # no need to add build time to binaries |
286 modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/MozillaFirefox.changes")" |
310 modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")" |
287 DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\"" |
311 DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\"" |
288 TIME="\"$(date -d "${modified}" "+%%R")\"" |
312 TIME="\"$(date -d "${modified}" "+%%R")\"" |
289 find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} + |
313 find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} + |
290 # |
314 # |
291 kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3) |
315 kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3) |
439 # remove prefs, profile defaults, and hyphenation from langpack |
463 # remove prefs, profile defaults, and hyphenation from langpack |
440 rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults |
464 rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults |
441 rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation |
465 rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation |
442 # check against the fixed common list and sort into the right filelist |
466 # check against the fixed common list and sort into the right filelist |
443 _matched=0 |
467 _matched=0 |
444 for _match in ar ca cs da de en-GB el es-AR es-CL es-ES fi fr hu it ja ko nb-NO nl pl pt-BR pt-PT ru sv-SE zh-CN zh-TW; do |
468 for _match in ar ca cs da de el en-GB es-AR es-CL es-ES fi fr hu it ja ko nb-NO nl pl pt-BR pt-PT ru sv-SE zh-CN zh-TW; do |
445 [ "$_match" = "$locale" ] && _matched=1 |
469 [ "$_match" = "$locale" ] && _matched=1 |
446 done |
470 done |
447 [ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other |
471 [ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other |
448 echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org \ |
472 echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org \ |
449 >> %{_tmppath}/translations.$_l10ntarget |
473 >> %{_tmppath}/translations.$_l10ntarget |