16 # Please submit bugfixes or comments via http://bugs.opensuse.org/ |
16 # Please submit bugfixes or comments via http://bugs.opensuse.org/ |
17 # |
17 # |
18 |
18 |
19 |
19 |
20 # changed with every update |
20 # changed with every update |
21 %define major 52 |
21 %define major 53 |
22 %define mainver %major.99 |
22 %define mainver %major.99 |
23 %define update_channel beta |
23 %define update_channel beta |
24 %define releasedate 20170404000000 |
24 %define branding 1 |
|
25 %define releasedate 20170602000000 |
25 |
26 |
26 # PIE, full relro (x86_64 for now) |
27 # PIE, full relro (x86_64 for now) |
27 %define build_hardened 1 |
28 %define build_hardened 1 |
28 |
29 |
29 %if 0%{?suse_version} > 1320 |
30 %if 0%{?suse_version} > 1320 |
31 %define firefox_use_rust 1 |
32 %define firefox_use_rust 1 |
32 %endif |
33 %endif |
33 %endif |
34 %endif |
34 |
35 |
35 # general build definitions |
36 # general build definitions |
36 %if "%{update_channel}" != "aurora" |
|
37 %define progname firefox |
37 %define progname firefox |
38 %define pkgname MozillaFirefox |
38 %define pkgname MozillaFirefox |
39 %define appname Firefox |
39 %define appname Firefox |
40 %else |
|
41 %define progname firefox-dev |
|
42 %define pkgname firefox-dev-edition |
|
43 %define appname Firefox Developer Edition |
|
44 %endif |
|
45 %define progdir %{_prefix}/%_lib/%{progname} |
40 %define progdir %{_prefix}/%_lib/%{progname} |
46 %define gnome_dir %{_prefix} |
41 %define gnome_dir %{_prefix} |
47 %define desktop_file_name %{progname} |
42 %define desktop_file_name %{progname} |
48 %define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} |
43 %define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} |
49 %define _use_internal_dependency_generator 0 |
44 %define _use_internal_dependency_generator 0 |
52 %global __find_provides %provfind |
47 %global __find_provides %provfind |
53 # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys |
48 # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys |
54 # Note: these are for the openSUSE Firefox builds ONLY. For your own distribution, |
49 # Note: these are for the openSUSE Firefox builds ONLY. For your own distribution, |
55 # please get your own set of keys. |
50 # please get your own set of keys. |
56 %define _google_api_key AIzaSyD1hTe85_a14kr1Ks8T3Ce75rvbR1_Dx7Q |
51 %define _google_api_key AIzaSyD1hTe85_a14kr1Ks8T3Ce75rvbR1_Dx7Q |
57 %if %update_channel == "aurora" |
|
58 %define branding 0 |
|
59 %else |
|
60 %define branding 1 |
|
61 %endif |
|
62 %define localize 1 |
52 %define localize 1 |
63 %ifarch %ix86 x86_64 |
53 %ifarch %ix86 x86_64 |
64 %define crashreporter 1 |
54 %define crashreporter 1 |
65 %else |
55 %else |
66 %define crashreporter 0 |
56 %define crashreporter 0 |
115 %if "%{name}" == "MozillaFirefox" |
105 %if "%{name}" == "MozillaFirefox" |
116 Provides: firefox = %{mainver} |
106 Provides: firefox = %{mainver} |
117 Provides: firefox = %{version}-%{release} |
107 Provides: firefox = %{version}-%{release} |
118 %endif |
108 %endif |
119 Provides: web_browser |
109 Provides: web_browser |
120 %if "%{update_channel}" != "aurora" |
|
121 Provides: appdata() |
110 Provides: appdata() |
122 Provides: appdata(firefox.appdata.xml) |
111 Provides: appdata(firefox.appdata.xml) |
123 %endif |
|
124 # this is needed to match this package with the kde4 helper package without the main package |
112 # this is needed to match this package with the kde4 helper package without the main package |
125 # having a hard requirement on the kde4 package |
113 # having a hard requirement on the kde4 package |
126 %define kde_helper_version 6 |
114 %define kde_helper_version 6 |
127 Provides: mozilla-kde4-version = %{kde_helper_version} |
115 Provides: mozilla-kde4-version = %{kde_helper_version} |
128 Summary: Mozilla %{appname} Web Browser |
116 Summary: Mozilla %{appname} Web Browser |
145 Source13: spellcheck.js |
133 Source13: spellcheck.js |
146 Source14: create-tar.sh |
134 Source14: create-tar.sh |
147 Source15: firefox-appdata.xml |
135 Source15: firefox-appdata.xml |
148 Source16: MozillaFirefox.changes |
136 Source16: MozillaFirefox.changes |
149 Source17: l10n_changesets.txt |
137 Source17: l10n_changesets.txt |
|
138 Source18: mozilla-api-key |
150 # Gecko/Toolkit |
139 # Gecko/Toolkit |
151 Patch1: mozilla-nongnome-proxies.patch |
140 Patch1: mozilla-nongnome-proxies.patch |
152 Patch2: mozilla-shared-nss-db.patch |
141 Patch2: mozilla-shared-nss-db.patch |
153 Patch3: mozilla-kde.patch |
142 Patch3: mozilla-kde.patch |
154 Patch4: mozilla-preferences.patch |
|
155 Patch5: mozilla-language.patch |
143 Patch5: mozilla-language.patch |
156 Patch6: mozilla-ntlm-full-path.patch |
144 Patch6: mozilla-ntlm-full-path.patch |
157 Patch7: mozilla-openaes-decl.patch |
145 Patch7: mozilla-openaes-decl.patch |
158 Patch8: mozilla-no-stdcxx-check.patch |
146 Patch8: mozilla-no-stdcxx-check.patch |
159 Patch9: mozilla-reduce-files-per-UnifiedBindings.patch |
147 Patch9: mozilla-reduce-files-per-UnifiedBindings.patch |
177 Obsoletes: tracker-miner-firefox < 0.15 |
165 Obsoletes: tracker-miner-firefox < 0.15 |
178 # libproxy's mozjs pacrunner crashes FF (bnc#759123) |
166 # libproxy's mozjs pacrunner crashes FF (bnc#759123) |
179 %if 0%{?suse_version} < 1220 |
167 %if 0%{?suse_version} < 1220 |
180 Obsoletes: libproxy1-pacrunner-mozjs <= 0.4.7 |
168 Obsoletes: libproxy1-pacrunner-mozjs <= 0.4.7 |
181 %endif |
169 %endif |
|
170 ##BuildArch: i686 x86_64 aarch64 ppc64le |
182 |
171 |
183 %description |
172 %description |
184 Mozilla Firefox is a standalone web browser, designed for standards |
173 Mozilla Firefox is a standalone web browser, designed for standards |
185 compliance and performance. Its functionality can be enhanced via a |
174 compliance and performance. Its functionality can be enhanced via a |
186 plethora of extensions. |
175 plethora of extensions. |
297 export MOZ_GOOGLE_API_KEY=%{_google_api_key} |
287 export MOZ_GOOGLE_API_KEY=%{_google_api_key} |
298 %if 0%{?suse_version} <= 1320 |
288 %if 0%{?suse_version} <= 1320 |
299 export CC=gcc-5 |
289 export CC=gcc-5 |
300 %endif |
290 %endif |
301 export CFLAGS="%{optflags} -fno-strict-aliasing" |
291 export CFLAGS="%{optflags} -fno-strict-aliasing" |
302 # boo#986541: add -fno-delete-null-pointer-checks and -fno-inline-small-functions for gcc6 |
292 # boo#986541: add -fno-delete-null-pointer-checks for gcc6 |
303 %if 0%{?suse_version} > 1320 |
293 %if 0%{?suse_version} > 1320 |
304 export CFLAGS="$CFLAGS -fno-delete-null-pointer-checks -fno-inline-small-functions" |
294 export CFLAGS="$CFLAGS -fno-delete-null-pointer-checks" |
305 %endif |
295 %endif |
306 %ifarch %arm |
296 %ifarch %arm |
307 export CFLAGS="${CFLAGS/-g / }" |
297 export CFLAGS="${CFLAGS/-g / }" |
308 %endif |
298 %endif |
309 %ifarch %arm %ix86 |
299 %ifarch %arm %ix86 |
336 %endif |
326 %endif |
337 ac_add_options --enable-default-toolkit=cairo-gtk3 |
327 ac_add_options --enable-default-toolkit=cairo-gtk3 |
338 %if 0%{?build_hardened} |
328 %if 0%{?build_hardened} |
339 ac_add_options --enable-pie |
329 ac_add_options --enable-pie |
340 %endif |
330 %endif |
|
331 # gcc7 (boo#104105) |
|
332 %if 0%{?suse_version} > 1320 |
|
333 ac_add_options --enable-optimize="-g -O2" |
|
334 %endif |
341 %ifarch %ix86 %arm |
335 %ifarch %ix86 %arm |
342 %if 0%{?suse_version} > 1230 |
336 %if 0%{?suse_version} > 1230 |
343 ac_add_options --disable-optimize |
337 ac_add_options --disable-optimize |
344 %endif |
338 %endif |
345 %endif |
339 %endif |
359 ac_add_options --enable-alsa |
353 ac_add_options --enable-alsa |
360 ac_add_options --disable-debug |
354 ac_add_options --disable-debug |
361 ac_add_options --enable-startup-notification |
355 ac_add_options --enable-startup-notification |
362 #ac_add_options --enable-chrome-format=jar |
356 #ac_add_options --enable-chrome-format=jar |
363 ac_add_options --enable-update-channel=%{update_channel} |
357 ac_add_options --enable-update-channel=%{update_channel} |
|
358 ac_add_options --with-mozilla-api-keyfile=%{SOURCE18} |
364 %if %branding |
359 %if %branding |
365 ac_add_options --enable-official-branding |
360 ac_add_options --enable-official-branding |
366 %endif |
361 %endif |
367 ac_add_options --enable-libproxy |
362 ac_add_options --enable-libproxy |
368 %if ! %crashreporter |
363 %if ! %crashreporter |
463 %suse_update_desktop_file %{desktop_file_name} Network WebBrowser GTK |
458 %suse_update_desktop_file %{desktop_file_name} Network WebBrowser GTK |
464 # additional mime-types |
459 # additional mime-types |
465 mkdir -p %{buildroot}%{_datadir}/mime/packages |
460 mkdir -p %{buildroot}%{_datadir}/mime/packages |
466 cp %{SOURCE8} %{buildroot}%{_datadir}/mime/packages/%{progname}.xml |
461 cp %{SOURCE8} %{buildroot}%{_datadir}/mime/packages/%{progname}.xml |
467 # appdata |
462 # appdata |
468 %if "%{update_channel}" != "aurora" |
|
469 mkdir -p %{buildroot}%{_datadir}/appdata |
463 mkdir -p %{buildroot}%{_datadir}/appdata |
470 cp %{SOURCE15} %{buildroot}%{_datadir}/appdata/%{desktop_file_name}.appdata.xml |
464 cp %{SOURCE15} %{buildroot}%{_datadir}/appdata/%{desktop_file_name}.appdata.xml |
471 %endif |
|
472 # install man-page |
465 # install man-page |
473 mkdir -p %{buildroot}%{_mandir}/man1/ |
466 mkdir -p %{buildroot}%{_mandir}/man1/ |
474 cp %{SOURCE11} %{buildroot}%{_mandir}/man1/%{progname}.1 |
467 cp %{SOURCE11} %{buildroot}%{_mandir}/man1/%{progname}.1 |
475 ########## |
468 ########## |
476 # ADDONS |
469 # ADDONS |
611 %dir %{_libdir}/mozilla/extensions |
604 %dir %{_libdir}/mozilla/extensions |
612 %dir %{_libdir}/mozilla/extensions/%{firefox_appid} |
605 %dir %{_libdir}/mozilla/extensions/%{firefox_appid} |
613 %{gnome_dir}/share/icons/hicolor/ |
606 %{gnome_dir}/share/icons/hicolor/ |
614 %{_bindir}/%{progname} |
607 %{_bindir}/%{progname} |
615 %doc %{_mandir}/man1/%{progname}.1.gz |
608 %doc %{_mandir}/man1/%{progname}.1.gz |
616 %if "%{update_channel}" != "aurora" |
|
617 %{_datadir}/appdata/ |
609 %{_datadir}/appdata/ |
618 %endif |
|
619 |
610 |
620 %files devel |
611 %files devel |
621 %defattr(-,root,root) |
612 %defattr(-,root,root) |
622 %{_bindir}/mozilla-get-app-id |
613 %{_bindir}/mozilla-get-app-id |
623 %config %{_sysconfdir}/rpm/macros.%{progname} |
614 %config %{_sysconfdir}/rpm/macros.%{progname} |