60 Name: %{pkgname} |
63 Name: %{pkgname} |
61 BuildRequires: Mesa-devel |
64 BuildRequires: Mesa-devel |
62 BuildRequires: alsa-devel |
65 BuildRequires: alsa-devel |
63 BuildRequires: autoconf213 |
66 BuildRequires: autoconf213 |
64 BuildRequires: dbus-1-glib-devel |
67 BuildRequires: dbus-1-glib-devel |
|
68 BuildRequires: dejavu-fonts |
65 BuildRequires: fdupes |
69 BuildRequires: fdupes |
66 BuildRequires: memory-constraints |
70 BuildRequires: memory-constraints |
67 %if 0%{?suse_version} <= 1320 |
71 %if 0%{?suse_version} <= 1320 |
68 BuildRequires: gcc7-c++ |
72 BuildRequires: gcc7-c++ |
69 %else |
73 %else |
70 BuildRequires: gcc-c++ |
74 BuildRequires: gcc-c++ |
71 %endif |
75 %endif |
72 BuildRequires: cargo >= 1.30 |
76 BuildRequires: cargo >= 1.36 |
73 BuildRequires: libXcomposite-devel |
77 BuildRequires: libXcomposite-devel |
74 BuildRequires: libcurl-devel |
78 BuildRequires: libcurl-devel |
75 BuildRequires: libidl-devel |
79 BuildRequires: libidl-devel |
76 BuildRequires: libiw-devel |
80 BuildRequires: libiw-devel |
77 BuildRequires: libnotify-devel |
81 BuildRequires: libnotify-devel |
78 BuildRequires: libproxy-devel |
82 BuildRequires: libproxy-devel |
79 BuildRequires: makeinfo |
83 BuildRequires: makeinfo |
80 BuildRequires: mozilla-nspr-devel >= 4.20 |
84 BuildRequires: mozilla-nspr-devel >= 4.22 |
81 BuildRequires: mozilla-nss-devel >= 3.41 |
85 BuildRequires: mozilla-nss-devel >= 3.46.1 |
82 BuildRequires: nodejs >= 8.11 |
86 BuildRequires: nasm >= 2.13 |
|
87 BuildRequires: nodejs8 >= 8.11 |
83 BuildRequires: python-devel |
88 BuildRequires: python-devel |
84 BuildRequires: python2-xml |
89 BuildRequires: python2-xml |
85 BuildRequires: python3 >= 3.5 |
90 BuildRequires: python3 >= 3.5 |
86 BuildRequires: rust >= 1.30 |
91 BuildRequires: rust >= 1.36 |
87 BuildRequires: rust-cbindgen >= 0.6.7 |
92 BuildRequires: rust-cbindgen >= 0.9.1 |
88 BuildRequires: startup-notification-devel |
93 BuildRequires: startup-notification-devel |
89 BuildRequires: unzip |
94 BuildRequires: unzip |
90 BuildRequires: update-desktop-files |
95 BuildRequires: update-desktop-files |
91 BuildRequires: xorg-x11-libXt-devel |
96 BuildRequires: xorg-x11-libXt-devel |
|
97 %if 0%{?do_profiling} |
|
98 BuildRequires: xvfb-run |
|
99 %endif |
92 BuildRequires: yasm |
100 BuildRequires: yasm |
93 BuildRequires: zip |
101 BuildRequires: zip |
94 %if 0%{?suse_version} < 1550 |
102 %if 0%{?suse_version} < 1550 |
95 BuildRequires: pkgconfig(gconf-2.0) |
103 BuildRequires: pkgconfig(gconf-2.0) >= 1.2.1 |
96 %endif |
104 %endif |
97 BuildRequires: pkgconfig(gdk-x11-2.0) |
105 BuildRequires: pkgconfig(gdk-x11-2.0) |
98 BuildRequires: pkgconfig(glib-2.0) >= 2.22 |
106 BuildRequires: pkgconfig(glib-2.0) >= 2.22 |
99 BuildRequires: pkgconfig(gobject-2.0) |
107 BuildRequires: pkgconfig(gobject-2.0) |
100 BuildRequires: pkgconfig(gtk+-2.0) >= 2.18.0 |
108 BuildRequires: pkgconfig(gtk+-2.0) >= 2.18.0 |
129 Provides: mozilla-kde4-version = %{kde_helper_version} |
137 Provides: mozilla-kde4-version = %{kde_helper_version} |
130 Summary: Mozilla %{appname} Web Browser |
138 Summary: Mozilla %{appname} Web Browser |
131 License: MPL-2.0 |
139 License: MPL-2.0 |
132 Group: Productivity/Networking/Web/Browsers |
140 Group: Productivity/Networking/Web/Browsers |
133 Url: http://www.mozilla.org/ |
141 Url: http://www.mozilla.org/ |
134 Source: http://ftp.mozilla.org/pub/firefox/releases/%{version}/source/firefox-%{orig_version}%{orig_suffix}.source.tar.xz |
142 %if !%{with only_print_mozconfig} |
|
143 Source: http://ftp.mozilla.org/pub/%{srcname}/releases/%{version}%{orig_suffix}/source/%{srcname}-%{orig_version}%{orig_suffix}.source.tar.xz |
135 Source1: MozillaFirefox.desktop |
144 Source1: MozillaFirefox.desktop |
136 Source2: MozillaFirefox-rpmlintrc |
145 Source2: MozillaFirefox-rpmlintrc |
137 Source3: mozilla.sh.in |
146 Source3: mozilla.sh.in |
|
147 Source4: tar_stamps |
138 Source5: source-stamp.txt |
148 Source5: source-stamp.txt |
139 Source6: kde.js |
|
140 Source7: l10n-%{orig_version}%{orig_suffix}.tar.xz |
149 Source7: l10n-%{orig_version}%{orig_suffix}.tar.xz |
141 Source8: firefox-mimeinfo.xml |
150 Source8: firefox-mimeinfo.xml |
142 Source9: firefox.js |
151 Source9: firefox.js |
143 Source10: compare-locales.tar.xz |
152 Source10: compare-locales.tar.xz |
144 Source11: firefox.1 |
153 Source11: firefox.1 |
145 Source12: mozilla-get-app-id |
154 Source12: mozilla-get-app-id |
146 Source13: spellcheck.js |
155 Source13: spellcheck.js |
147 Source14: create-tar.sh |
156 Source14: https://github.com/openSUSE/firefox-scripts/raw/master/create-tar.sh |
148 Source15: firefox-appdata.xml |
157 Source15: firefox-appdata.xml |
149 Source16: MozillaFirefox.changes |
158 Source16: %{name}.changes |
150 # Set up API keys, see http://www.chromium.org/developers/how-tos/api-keys |
159 # Set up API keys, see http://www.chromium.org/developers/how-tos/api-keys |
151 # Note: these are for the openSUSE Firefox builds ONLY. For your own distribution, |
160 # Note: these are for the openSUSE Firefox builds ONLY. For your own distribution, |
152 # please get your own set of keys. |
161 # please get your own set of keys. |
153 Source18: mozilla-api-key |
162 Source18: mozilla-api-key |
154 Source19: google-api-key |
163 Source19: google-api-key |
155 Source20: http://ftp.mozilla.org/pub/firefox/releases/%{version}/source/firefox-%{orig_version}%{orig_suffix}.source.tar.xz.asc |
164 Source20: https://ftp.mozilla.org/pub/%{srcname}/releases/%{version}%{orig_suffix}/source/%{srcname}-%{orig_version}%{orig_suffix}.source.tar.xz.asc |
156 Source21: mozilla.keyring |
165 Source21: https://ftp.mozilla.org/pub/%{srcname}/releases/%{version}%{orig_suffix}/KEY#/mozilla.keyring |
157 # Gecko/Toolkit |
166 # Gecko/Toolkit |
158 Patch1: mozilla-nongnome-proxies.patch |
167 Patch1: mozilla-nongnome-proxies.patch |
159 Patch2: mozilla-kde.patch |
168 Patch2: mozilla-kde.patch |
160 Patch3: mozilla-ntlm-full-path.patch |
169 Patch3: mozilla-ntlm-full-path.patch |
161 Patch4: mozilla-openaes-decl.patch |
170 Patch4: mozilla-openaes-decl.patch |
162 Patch7: mozilla-aarch64-startup-crash.patch |
171 Patch5: mozilla-aarch64-startup-crash.patch |
163 Patch8: mozilla-bmo256180.patch |
172 Patch6: mozilla-bmo1463035.patch |
164 Patch9: mozilla-bmo1463035.patch |
173 Patch7: mozilla-cubeb-noreturn.patch |
165 Patch10: mozilla-cubeb-noreturn.patch |
174 Patch8: mozilla-fix-aarch64-libopus.patch |
|
175 Patch9: mozilla-disable-wasm-emulate-arm-unaligned-fp-access.patch |
|
176 Patch10: mozilla-s390-context.patch |
|
177 Patch11: mozilla-s390-bigendian.patch |
|
178 Patch12: mozilla-reduce-rust-debuginfo.patch |
|
179 Patch13: mozilla-ppc-altivec_static_inline.patch |
|
180 Patch14: mozilla-bmo1005535.patch |
|
181 Patch15: mozilla-bmo1568145.patch |
|
182 Patch16: mozilla-bmo1504834-part1.patch |
|
183 Patch17: mozilla-bmo1504834-part2.patch |
|
184 Patch18: mozilla-bmo1504834-part3.patch |
|
185 Patch19: mozilla-bmo1511604.patch |
|
186 Patch20: mozilla-bmo1554971.patch |
|
187 Patch21: mozilla-bmo1512162.patch |
|
188 Patch22: mozilla-fix-top-level-asm.patch |
166 # Firefox/browser |
189 # Firefox/browser |
167 Patch101: firefox-kde.patch |
190 Patch101: firefox-kde.patch |
168 Patch102: firefox-branded-icons.patch |
191 Patch102: firefox-branded-icons.patch |
|
192 %endif # only_print_mozconfig |
169 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
193 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
170 Requires(post): coreutils shared-mime-info desktop-file-utils |
194 Requires(post): coreutils shared-mime-info desktop-file-utils |
171 Requires(postun): shared-mime-info desktop-file-utils |
195 Requires(postun): shared-mime-info desktop-file-utils |
172 %if %branding |
196 Requires: %{name}-branding >= 68 |
173 Requires: %{name}-branding > 44.0 |
|
174 %endif |
|
175 Requires: mozilla-nspr >= %(rpm -q --queryformat '%%{VERSION}' mozilla-nspr) |
197 Requires: mozilla-nspr >= %(rpm -q --queryformat '%%{VERSION}' mozilla-nspr) |
176 Requires: mozilla-nss >= %(rpm -q --queryformat '%%{VERSION}' mozilla-nss) |
198 Requires: mozilla-nss >= %(rpm -q --queryformat '%%{VERSION}' mozilla-nss) |
177 Recommends: libcanberra0 |
199 Recommends: libcanberra0 |
178 Recommends: libpulse0 |
200 Recommends: libpulse0 |
179 # addon leads to startup crash (bnc#908892) |
201 # addon leads to startup crash (bnc#908892) |
180 Obsoletes: tracker-miner-firefox < 0.15 |
202 Obsoletes: tracker-miner-firefox < 0.15 |
|
203 %if 0%{?devpkg} == 0 |
|
204 Obsoletes: %{name}-devel < %{version} |
|
205 %endif |
181 # libproxy's mozjs pacrunner crashes FF (bnc#759123) |
206 # libproxy's mozjs pacrunner crashes FF (bnc#759123) |
182 %if 0%{?suse_version} < 1220 |
207 %if 0%{?suse_version} < 1220 |
183 Obsoletes: libproxy1-pacrunner-mozjs <= 0.4.7 |
208 Obsoletes: libproxy1-pacrunner-mozjs <= 0.4.7 |
184 %endif |
209 %endif |
185 ##BuildArch: i686 x86_64 aarch64 ppc64le |
210 ##BuildArch: i686 x86_64 aarch64 ppc64le |
187 %description |
212 %description |
188 Mozilla Firefox is a standalone web browser, designed for standards |
213 Mozilla Firefox is a standalone web browser, designed for standards |
189 compliance and performance. Its functionality can be enhanced via a |
214 compliance and performance. Its functionality can be enhanced via a |
190 plethora of extensions. |
215 plethora of extensions. |
191 |
216 |
|
217 %if 0%{?devpkg} |
192 %package devel |
218 %package devel |
193 Summary: Devel package for %{appname} |
219 Summary: Devel package for %{appname} |
194 Group: Development/Tools/Other |
220 Group: Development/Tools/Other |
195 Provides: firefox-devel = %{version}-%{release} |
221 Provides: firefox-devel = %{version}-%{release} |
196 Requires: %{name} = %{version} |
222 Requires: %{name} = %{version} |
197 Requires: perl(Archive::Zip) |
223 Requires: perl(Archive::Zip) |
198 Requires: perl(XML::Simple) |
224 Requires: perl(XML::Simple) |
199 |
225 |
200 %description devel |
226 %description devel |
201 Development files for %{appname} to make packaging of addons easier. |
227 Development files for %{appname} to make packaging of addons easier. |
|
228 %endif |
202 |
229 |
203 %if %localize |
230 %if %localize |
204 %package translations-common |
231 %package translations-common |
205 Summary: Common translations for %{appname} |
232 Summary: Common translations for %{appname} |
206 Group: System/Localization |
233 Group: System/Localization |
207 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) |
234 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) |
208 Requires: %{name} = %{version} |
235 Requires: %{name} = %{version} |
209 Obsoletes: %{name}-translations < %{version}-%{release} |
236 Obsoletes: %{name}-translations < %{version}-%{release} |
210 |
237 |
211 %description translations-common |
238 %description translations-common |
212 This package contains several common languages for the user interface |
239 This package contains several common languages for the user interface |
213 of %{appname}. |
240 of %{appname}. |
214 |
241 |
215 %package translations-other |
242 %package translations-other |
216 Summary: Extra translations for %{appname} |
243 Summary: Extra translations for %{appname} |
217 Group: System/Localization |
244 Group: System/Localization |
218 Provides: locale(%{name}:ach;af;an;as;ast;az;bg;bn_BD;bn_IN;br;bs;cak;cy;dsb;en_ZA;eo;es_MX;et;eu;fa;ff;fy_NL;ga_IE;gd;gl;gn;gu_IN;he;hi_IN;hr;hsb;hy_AM;id;is;ka;kab;kk;km;kn;lij;lt;lv;mai;mk;ml;mr;ms;ne-NP;nn_NO;oc;or;pa_IN;rm;ro;si;sk;sl;son;sq;sr;ta;te;th;tr;uk;uz;vi;xh) |
245 Provides: locale(%{name}:ach;af;an;ast;az;be;bg;bn;br;bs;cak;cy;dsb;en_CA;eo;es_MX;et;eu;fa;ff;fy_NL;ga_IE;gd;gl;gn;gu_IN;he;hi_IN;hr;hsb;hy_AM;ia;id;is;ka;kab;kk;km;kn;lij;lt;lv;mk;mr;ms;my;ne_NP;nn_NO;oc;pa_IN;rm;ro;si;sk;sl;son;sq;sr;ta;te;th;tr;uk;ur;uz;vi;xh) |
219 Requires: %{name} = %{version} |
246 Requires: %{name} = %{version} |
220 Obsoletes: %{name}-translations < %{version}-%{release} |
247 Obsoletes: %{name}-translations < %{version}-%{release} |
221 |
248 |
222 %description translations-other |
249 %description translations-other |
223 This package contains rarely used languages for the user interface |
250 This package contains rarely used languages for the user interface |
224 of %{appname}. |
251 of %{appname}. |
225 %endif |
252 %endif |
226 |
253 |
227 %if %branding |
|
228 %package branding-upstream |
254 %package branding-upstream |
229 Summary: Upstream branding for %{appname} |
255 Summary: Upstream branding for %{appname} |
230 Group: Productivity/Networking/Web/Browsers |
256 Group: Productivity/Networking/Web/Browsers |
231 Provides: %{name}-branding = %{version} |
257 Provides: %{name}-branding = %{version} |
232 Conflicts: otherproviders(%{name}-branding) |
258 Conflicts: otherproviders(%{name}-branding) |
253 %description buildsymbols |
278 %description buildsymbols |
254 This subpackage contains the Breakpad created and compatible debugging |
279 This subpackage contains the Breakpad created and compatible debugging |
255 symbols meant for upload to Mozilla's crash collector database. |
280 symbols meant for upload to Mozilla's crash collector database. |
256 %endif |
281 %endif |
257 |
282 |
|
283 %if !%{with only_print_mozconfig} |
258 %prep |
284 %prep |
259 %if %localize |
285 %if %localize |
260 %setup -q -n %{source_prefix} -b 7 -b 10 |
286 |
261 %else |
287 # If generated incorrectly, the tarball will be ~270B in |
262 %setup -q -n %{source_prefix} |
288 # size, so 1MB seems like good enough limit to check. |
263 %endif |
289 MINSIZE=1048576 |
264 cd $RPM_BUILD_DIR/%{source_prefix} |
290 if (( $(stat -Lc%s "%{SOURCE7}") < MINSIZE)); then |
|
291 echo "Translations tarball %{SOURCE7} not generated properly." |
|
292 exit 1 |
|
293 fi |
|
294 |
|
295 %setup -q -n %{srcname}-%{orig_version} -b 7 -b 10 |
|
296 %else |
|
297 %setup -q -n %{srcname}-%{orig_version} |
|
298 %endif |
|
299 cd $RPM_BUILD_DIR/%{srcname}-%{orig_version} |
265 %patch1 -p1 |
300 %patch1 -p1 |
266 %patch2 -p1 |
301 %patch2 -p1 |
267 %patch3 -p1 |
302 %patch3 -p1 |
268 %patch4 -p1 |
303 %patch4 -p1 |
|
304 %patch5 -p1 |
|
305 %patch6 -p1 |
269 %patch7 -p1 |
306 %patch7 -p1 |
270 %patch8 -p1 |
307 %patch8 -p1 |
271 %patch9 -p1 |
308 %patch9 -p1 |
272 %patch10 -p1 |
309 %patch10 -p1 |
|
310 %ifarch s390x ppc64 |
|
311 %patch11 -p1 |
|
312 %endif |
|
313 %patch12 -p1 |
|
314 %patch13 -p1 |
|
315 %patch14 -p1 |
|
316 %patch15 -p1 |
|
317 %patch16 -p1 |
|
318 %patch17 -p1 |
|
319 %patch18 -p1 |
|
320 %patch19 -p1 |
|
321 %patch20 -p1 |
|
322 %patch21 -p1 |
|
323 %patch22 -p1 |
273 # Firefox |
324 # Firefox |
274 %patch101 -p1 |
325 %patch101 -p1 |
275 %patch102 -p1 |
326 %patch102 -p1 |
|
327 %endif # only_print_mozconfig |
276 |
328 |
277 %build |
329 %build |
|
330 %if !%{with only_print_mozconfig} |
278 # no need to add build time to binaries |
331 # no need to add build time to binaries |
279 modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/MozillaFirefox.changes")" |
332 modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")" |
280 DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\"" |
333 DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\"" |
281 TIME="\"$(date -d "${modified}" "+%%R")\"" |
334 TIME="\"$(date -d "${modified}" "+%%R")\"" |
282 find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} + |
335 find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} + |
283 # |
336 # |
284 kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3) |
337 kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3) |
285 if test "$kdehelperversion" != %{kde_helper_version}; then |
338 if test "$kdehelperversion" != %{kde_helper_version}; then |
286 echo fix kde helper version in the .spec file |
339 echo fix kde helper version in the .spec file |
287 exit 1 |
340 exit 1 |
288 fi |
341 fi |
289 source %{SOURCE5} |
342 source %{SOURCE5} |
|
343 %endif # only_print_mozconfig |
|
344 |
|
345 export CARGO_HOME=${RPM_BUILD_DIR}/%{srcname}-%{orig_version}/.cargo |
290 export MOZ_SOURCE_CHANGESET=$REV |
346 export MOZ_SOURCE_CHANGESET=$REV |
291 export SOURCE_REPO=$REPO |
347 export SOURCE_REPO=$REPO |
292 export source_repo=$REPO |
348 export source_repo=$REPO |
293 export MOZ_SOURCE_REPO=$REPO |
349 export MOZ_SOURCE_REPO=$REPO |
294 export MOZ_BUILD_DATE=%{releasedate} |
350 export MOZ_BUILD_DATE=%{releasedate} |
378 %endif |
445 %endif |
379 %endif |
446 %endif |
380 %ifarch aarch64 %arm s390x |
447 %ifarch aarch64 %arm s390x |
381 ac_add_options --disable-webrtc |
448 ac_add_options --disable-webrtc |
382 %endif |
449 %endif |
|
450 # mitigation/workaround for bmo#1512162 |
|
451 %ifarch s390x |
|
452 ac_add_options --enable-optimize="-O1" |
|
453 %endif |
383 %ifarch x86_64 |
454 %ifarch x86_64 |
384 # LTO needs newer toolchain stack only (at least GCC 8.2.1 (r268506) |
455 # LTO needs newer toolchain stack only (at least GCC 8.2.1 (r268506) |
385 %if 0%{?suse_version} > 1500 |
456 %if 0%{?suse_version} > 1500 |
386 ac_add_options --enable-lto |
457 ac_add_options --enable-lto |
|
458 %if 0%{?do_profiling} |
|
459 ac_add_options MOZ_PGO=1 |
|
460 %endif |
387 %endif |
461 %endif |
388 %endif |
462 %endif |
389 EOF |
463 EOF |
390 ./mach build |
464 %if !%{with only_print_mozconfig} |
|
465 %ifarch ppc64 s390x s390 |
|
466 # NOTE: Currently, system-icu is too old, so we can't build with that, |
|
467 # but have to generate the .dat-file freshly. This seems to be a |
|
468 # less fragile approach anyways. |
|
469 # ac_add_options --with-system-icu |
|
470 echo "Generate big endian version of config/external/icu/data/icud58l.dat" |
|
471 ./mach python intl/icu_sources_data.py . |
|
472 ls -l config/external/icu/data |
|
473 rm -f config/external/icu/data/icudt*l.dat |
|
474 %endif |
|
475 %if 0%{?do_profiling} |
|
476 xvfb-run --server-args="-screen 0 1920x1080x24" \ |
|
477 %endif |
|
478 ./mach build -v |
|
479 %endif # only_print_mozconfig |
391 |
480 |
392 %install |
481 %install |
393 cd $RPM_BUILD_DIR/obj |
482 cd $RPM_BUILD_DIR/obj |
394 source %{SOURCE5} |
483 source %{SOURCE5} |
395 export MOZ_SOURCE_STAMP=$REV |
484 export MOZ_SOURCE_STAMP=$REV |
401 make -C browser/installer STRIP=/bin/true MOZ_PKG_FATAL_WARNINGS=0 |
490 make -C browser/installer STRIP=/bin/true MOZ_PKG_FATAL_WARNINGS=0 |
402 #DEBUG (break the build if searchplugins are missing / temporary) |
491 #DEBUG (break the build if searchplugins are missing / temporary) |
403 grep amazondotcom dist/firefox/browser/omni.ja |
492 grep amazondotcom dist/firefox/browser/omni.ja |
404 # copy tree into RPM_BUILD_ROOT |
493 # copy tree into RPM_BUILD_ROOT |
405 mkdir -p %{buildroot}%{progdir} |
494 mkdir -p %{buildroot}%{progdir} |
406 cp -rf $RPM_BUILD_DIR/obj/dist/firefox/* %{buildroot}%{progdir} |
495 cp -rf $RPM_BUILD_DIR/obj/dist/%{srcname}/* %{buildroot}%{progdir} |
407 mkdir -p %{buildroot}%{progdir}/distribution/extensions |
496 mkdir -p %{buildroot}%{progdir}/distribution/extensions |
408 mkdir -p %{buildroot}%{progdir}/browser/defaults/preferences/ |
497 mkdir -p %{buildroot}%{progdir}/browser/defaults/preferences/ |
|
498 # renaming executables (for regular vs. ESR) |
|
499 %if "%{srcname}" != "%{progname}" |
|
500 mv %{buildroot}%{progdir}/%{srcname} %{buildroot}%{progdir}/%{progname} |
|
501 mv %{buildroot}%{progdir}/%{srcname}-bin %{buildroot}%{progdir}/%{progname}-bin |
|
502 %endif |
409 # install gre prefs |
503 # install gre prefs |
410 install -m 644 %{SOURCE13} %{buildroot}%{progdir}/defaults/pref/ |
504 install -m 644 %{SOURCE13} %{buildroot}%{progdir}/defaults/pref/ |
411 # install browser prefs |
505 # install browser prefs |
412 install -m 644 %{SOURCE6} %{buildroot}%{progdir}/browser/defaults/preferences/kde.js |
|
413 install -m 644 %{SOURCE9} %{buildroot}%{progdir}/browser/defaults/preferences/firefox.js |
506 install -m 644 %{SOURCE9} %{buildroot}%{progdir}/browser/defaults/preferences/firefox.js |
414 # install additional locales |
507 # build additional locales |
415 %if %localize |
508 %if %localize |
416 mkdir -p %{buildroot}%{progdir}/browser/extensions |
509 mkdir -p %{buildroot}%{progdir}/browser/extensions |
417 truncate -s 0 %{_tmppath}/translations.{common,other} |
510 truncate -s 0 %{_tmppath}/translations.{common,other} |
418 sed -r '/^(ja-JP-mac|en-US|)$/d;s/ .*$//' $RPM_BUILD_DIR/%{source_prefix}/browser/locales/shipped-locales \ |
511 sed -r '/^(ja-JP-mac|en-US|)$/d;s/ .*$//' $RPM_BUILD_DIR/%{srcname}-%{orig_version}/browser/locales/shipped-locales \ |
419 | xargs -P 8 -n 1 -I {} /bin/sh -c ' |
512 | xargs -n 1 -I {} /bin/sh -c ' |
420 locale=$1 |
513 locale=$1 |
421 pushd $RPM_BUILD_DIR/compare-locales |
514 pushd $RPM_BUILD_DIR/compare-locales |
422 PYTHONPATH=lib \ |
515 PYTHONPATH=lib \ |
423 scripts/compare-locales -m ../l10n-merged/$locale \ |
516 scripts/compare-locales -m ../l10n-merged/$locale \ |
424 ../%{source_prefix}/browser/locales/l10n.ini ../l10n $locale |
517 ../%{srcname}-%{orig_version}/browser/locales/l10n.ini ../l10n $locale |
425 popd |
518 popd |
426 LOCALE_MERGEDIR=$RPM_BUILD_DIR/l10n-merged/$locale \ |
519 LOCALE_MERGEDIR=$RPM_BUILD_DIR/l10n-merged/$locale \ |
427 make -C browser/locales langpack-$locale |
520 make -C browser/locales langpack-$locale |
428 cp -rL dist/xpi-stage/locale-$locale \ |
521 cp -rL dist/xpi-stage/locale-$locale \ |
429 %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org |
522 %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org |
430 # remove prefs, profile defaults, and hyphenation from langpack |
523 # remove prefs, profile defaults, and hyphenation from langpack |
431 rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults |
524 rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults |
432 rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation |
525 rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation |
433 # check against the fixed common list and sort into the right filelist |
526 # check against the fixed common list and sort into the right filelist |
434 _matched=0 |
527 _matched=0 |
435 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 |
528 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 |
436 [ "$_match" = "$locale" ] && _matched=1 |
529 [ "$_match" = "$locale" ] && _matched=1 |
437 done |
530 done |
438 [ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other |
531 [ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other |
439 echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org \ |
532 echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org \ |
440 >> %{_tmppath}/translations.$_l10ntarget |
533 >> %{_tmppath}/translations.$_l10ntarget |