132 Provides: mozilla-kde4-version = %{kde_helper_version} |
134 Provides: mozilla-kde4-version = %{kde_helper_version} |
133 Summary: Mozilla %{appname} Web Browser |
135 Summary: Mozilla %{appname} Web Browser |
134 License: MPL-2.0 |
136 License: MPL-2.0 |
135 Group: Productivity/Networking/Web/Browsers |
137 Group: Productivity/Networking/Web/Browsers |
136 Url: http://www.mozilla.org/ |
138 Url: http://www.mozilla.org/ |
137 Source: http://ftp.mozilla.org/pub/firefox/releases/%{version}/source/firefox-%{orig_version}%{orig_suffix}.source.tar.xz |
139 %if !%{with only_print_mozconfig} |
|
140 Source: http://ftp.mozilla.org/pub/firefox/releases/%{version}%{orig_suffix}/source/firefox-%{orig_version}%{orig_suffix}.source.tar.xz |
138 Source1: MozillaFirefox.desktop |
141 Source1: MozillaFirefox.desktop |
139 Source2: MozillaFirefox-rpmlintrc |
142 Source2: MozillaFirefox-rpmlintrc |
140 Source3: mozilla.sh.in |
143 Source3: mozilla.sh.in |
141 Source4: tar_stamps |
144 Source4: tar_stamps |
142 Source5: source-stamp.txt |
145 Source5: source-stamp.txt |
154 # Set up API keys, see http://www.chromium.org/developers/how-tos/api-keys |
157 # Set up API keys, see http://www.chromium.org/developers/how-tos/api-keys |
155 # Note: these are for the openSUSE Firefox builds ONLY. For your own distribution, |
158 # Note: these are for the openSUSE Firefox builds ONLY. For your own distribution, |
156 # please get your own set of keys. |
159 # please get your own set of keys. |
157 Source18: mozilla-api-key |
160 Source18: mozilla-api-key |
158 Source19: google-api-key |
161 Source19: google-api-key |
159 Source20: https://ftp.mozilla.org/pub/%{progname}/releases/%{version}/source/%{progname}-%{orig_version}%{orig_suffix}.source.tar.xz.asc |
162 Source20: https://ftp.mozilla.org/pub/%{progname}/releases/%{version}%{orig_suffix}/source/%{progname}-%{orig_version}%{orig_suffix}.source.tar.xz.asc |
160 Source21: mozilla.keyring |
163 Source21: https://ftp.mozilla.org/pub/%{progname}/releases/%{version}%{orig_suffix}/KEY#/mozilla.keyring |
161 # Gecko/Toolkit |
164 # Gecko/Toolkit |
162 Patch1: mozilla-nongnome-proxies.patch |
165 Patch1: mozilla-nongnome-proxies.patch |
163 Patch2: mozilla-kde.patch |
166 Patch2: mozilla-kde.patch |
164 Patch3: mozilla-ntlm-full-path.patch |
167 Patch3: mozilla-ntlm-full-path.patch |
165 Patch4: mozilla-openaes-decl.patch |
168 Patch4: mozilla-openaes-decl.patch |
172 Patch11: mozilla-s390-bigendian.patch |
175 Patch11: mozilla-s390-bigendian.patch |
173 Patch12: mozilla-reduce-rust-debuginfo.patch |
176 Patch12: mozilla-reduce-rust-debuginfo.patch |
174 Patch13: mozilla-ppc-altivec_static_inline.patch |
177 Patch13: mozilla-ppc-altivec_static_inline.patch |
175 Patch14: mozilla-bmo1005535.patch |
178 Patch14: mozilla-bmo1005535.patch |
176 Patch15: mozilla-bmo1568145.patch |
179 Patch15: mozilla-bmo1568145.patch |
|
180 Patch16: mozilla-bmo1573381.patch |
|
181 Patch17: mozilla-bmo1504834-part1.patch |
|
182 Patch18: mozilla-bmo1504834-part2.patch |
|
183 Patch19: mozilla-bmo1504834-part3.patch |
|
184 Patch20: mozilla-bmo1511604.patch |
|
185 Patch21: mozilla-bmo1554971.patch |
|
186 Patch22: mozilla-nestegg-big-endian.patch |
177 # Firefox/browser |
187 # Firefox/browser |
178 Patch101: firefox-kde.patch |
188 Patch101: firefox-kde.patch |
179 Patch102: firefox-branded-icons.patch |
189 Patch102: firefox-branded-icons.patch |
180 Patch103: firefox-add-kde.js-in-order-to-survive-PGO-build.patch |
190 Patch103: firefox-add-kde.js-in-order-to-survive-PGO-build.patch |
|
191 %endif # only_print_mozconfig |
181 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
192 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
182 Requires(post): coreutils shared-mime-info desktop-file-utils |
193 Requires(post): coreutils shared-mime-info desktop-file-utils |
183 Requires(postun): shared-mime-info desktop-file-utils |
194 Requires(postun): shared-mime-info desktop-file-utils |
184 %if %branding |
195 %if %branding |
185 Requires: %{name}-branding > 44.0 |
196 Requires: %{name}-branding > 44.0 |
265 %description buildsymbols |
276 %description buildsymbols |
266 This subpackage contains the Breakpad created and compatible debugging |
277 This subpackage contains the Breakpad created and compatible debugging |
267 symbols meant for upload to Mozilla's crash collector database. |
278 symbols meant for upload to Mozilla's crash collector database. |
268 %endif |
279 %endif |
269 |
280 |
|
281 %if !%{with only_print_mozconfig} |
270 %prep |
282 %prep |
271 %if %localize |
283 %if %localize |
272 |
284 |
273 # If generated incorrectly, the tarball will be ~270B in |
285 # If generated incorrectly, the tarball will be ~270B in |
274 # size, so 1MB seems like good enough limit to check. |
286 # size, so 1MB seems like good enough limit to check. |
298 %endif |
310 %endif |
299 %patch12 -p1 |
311 %patch12 -p1 |
300 %patch13 -p1 |
312 %patch13 -p1 |
301 %patch14 -p1 |
313 %patch14 -p1 |
302 %patch15 -p1 |
314 %patch15 -p1 |
|
315 %patch16 -p1 |
|
316 %patch17 -p1 |
|
317 %patch18 -p1 |
|
318 %patch19 -p1 |
|
319 %patch20 -p1 |
|
320 %patch21 -p1 |
|
321 %patch22 -p1 |
303 # Firefox |
322 # Firefox |
304 %patch101 -p1 |
323 %patch101 -p1 |
305 %patch102 -p1 |
324 %patch102 -p1 |
306 %patch103 -p1 |
325 %patch103 -p1 |
|
326 %endif # only_print_mozconfig |
307 |
327 |
308 %build |
328 %build |
|
329 %if !%{with only_print_mozconfig} |
309 # no need to add build time to binaries |
330 # no need to add build time to binaries |
310 modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")" |
331 modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")" |
311 DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\"" |
332 DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\"" |
312 TIME="\"$(date -d "${modified}" "+%%R")\"" |
333 TIME="\"$(date -d "${modified}" "+%%R")\"" |
313 find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} + |
334 find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} + |
316 if test "$kdehelperversion" != %{kde_helper_version}; then |
337 if test "$kdehelperversion" != %{kde_helper_version}; then |
317 echo fix kde helper version in the .spec file |
338 echo fix kde helper version in the .spec file |
318 exit 1 |
339 exit 1 |
319 fi |
340 fi |
320 source %{SOURCE5} |
341 source %{SOURCE5} |
|
342 %endif # only_print_mozconfig |
|
343 |
321 export MOZ_SOURCE_CHANGESET=$REV |
344 export MOZ_SOURCE_CHANGESET=$REV |
322 export SOURCE_REPO=$REPO |
345 export SOURCE_REPO=$REPO |
323 export source_repo=$REPO |
346 export source_repo=$REPO |
324 export MOZ_SOURCE_REPO=$REPO |
347 export MOZ_SOURCE_REPO=$REPO |
325 export MOZ_BUILD_DATE=%{releasedate} |
348 export MOZ_BUILD_DATE=%{releasedate} |
346 export CFLAGS="$CFLAGS -mminimal-toc" |
369 export CFLAGS="$CFLAGS -mminimal-toc" |
347 %endif |
370 %endif |
348 %endif |
371 %endif |
349 export CXXFLAGS="$CFLAGS" |
372 export CXXFLAGS="$CFLAGS" |
350 export MOZCONFIG=$RPM_BUILD_DIR/mozconfig |
373 export MOZCONFIG=$RPM_BUILD_DIR/mozconfig |
|
374 %if %{with only_print_mozconfig} |
|
375 echo "export CC=$CC" |
|
376 echo "export CXX=$CXX" |
|
377 echo "export CFLAGS=\"$CFLAGS\"" |
|
378 echo "export LDFLAGS=\"$LDFLAGS\"" |
|
379 echo "export RUSTFLAGS=\"$RUSTFLAGS\"" |
|
380 echo "" |
|
381 cat << EOF |
|
382 %else |
351 %limit_build -m 2000 |
383 %limit_build -m 2000 |
352 cat << EOF > $MOZCONFIG |
384 cat << EOF > $MOZCONFIG |
|
385 %endif |
353 mk_add_options MOZILLA_OFFICIAL=1 |
386 mk_add_options MOZILLA_OFFICIAL=1 |
354 mk_add_options BUILD_OFFICIAL=1 |
387 mk_add_options BUILD_OFFICIAL=1 |
355 mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs} |
388 mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs} |
356 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj |
389 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj |
357 . \$topsrcdir/browser/config/mozconfig |
390 . \$topsrcdir/browser/config/mozconfig |
422 ac_add_options --enable-lto |
455 ac_add_options --enable-lto |
423 ac_add_options MOZ_PGO=1 |
456 ac_add_options MOZ_PGO=1 |
424 %endif |
457 %endif |
425 %endif |
458 %endif |
426 EOF |
459 EOF |
|
460 %if !%{with only_print_mozconfig} |
|
461 %ifarch ppc64 s390x s390 |
|
462 # NOTE: Currently, system-icu is too old, so we can't build with that, |
|
463 # but have to generate the .dat-file freshly. This seems to be a |
|
464 # less fragile approach anyways. |
|
465 # ac_add_options --with-system-icu |
|
466 echo "Generate big endian version of config/external/icu/data/icud58l.dat" |
|
467 ./mach python intl/icu_sources_data.py . |
|
468 ls -l config/external/icu/data |
|
469 rm -f config/external/icu/data/icudt*l.dat |
|
470 %endif |
427 xvfb-run --server-args="-screen 0 1920x1080x24" ./mach build |
471 xvfb-run --server-args="-screen 0 1920x1080x24" ./mach build |
|
472 %endif # only_print_mozconfig |
428 |
473 |
429 %install |
474 %install |
430 cd $RPM_BUILD_DIR/obj |
475 cd $RPM_BUILD_DIR/obj |
431 source %{SOURCE5} |
476 source %{SOURCE5} |
432 export MOZ_SOURCE_STAMP=$REV |
477 export MOZ_SOURCE_STAMP=$REV |
446 # install gre prefs |
491 # install gre prefs |
447 install -m 644 %{SOURCE13} %{buildroot}%{progdir}/defaults/pref/ |
492 install -m 644 %{SOURCE13} %{buildroot}%{progdir}/defaults/pref/ |
448 # install browser prefs |
493 # install browser prefs |
449 install -m 644 %{SOURCE6} %{buildroot}%{progdir}/browser/defaults/preferences/kde.js |
494 install -m 644 %{SOURCE6} %{buildroot}%{progdir}/browser/defaults/preferences/kde.js |
450 install -m 644 %{SOURCE9} %{buildroot}%{progdir}/browser/defaults/preferences/firefox.js |
495 install -m 644 %{SOURCE9} %{buildroot}%{progdir}/browser/defaults/preferences/firefox.js |
451 # install additional locales |
496 # build additional locales |
452 %if %localize |
497 %if %localize |
453 mkdir -p %{buildroot}%{progdir}/browser/extensions |
498 mkdir -p %{buildroot}%{progdir}/browser/extensions |
454 truncate -s 0 %{_tmppath}/translations.{common,other} |
499 truncate -s 0 %{_tmppath}/translations.{common,other} |
455 sed -r '/^(ja-JP-mac|en-US|)$/d;s/ .*$//' $RPM_BUILD_DIR/%{source_prefix}/browser/locales/shipped-locales \ |
500 sed -r '/^(ja-JP-mac|en-US|)$/d;s/ .*$//' $RPM_BUILD_DIR/%{source_prefix}/browser/locales/shipped-locales \ |
456 | xargs -n 1 -I {} /bin/sh -c ' |
501 | xargs -n 1 -I {} /bin/sh -c ' |