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 46 |
21 %define major 47 |
22 %define mainver %major.0.1 |
22 %define mainver %major.0 |
23 %define update_channel release |
23 %define update_channel release |
24 %define releasedate 2016050300 |
24 %define releasedate 20160606000000 |
|
25 |
|
26 # PIE, full relro (x86_64 for now) |
|
27 %define build_hardened 1 |
25 |
28 |
26 # general build definitions |
29 # general build definitions |
27 %if "%{update_channel}" != "aurora" |
30 %if "%{update_channel}" != "aurora" |
28 %define progname firefox |
31 %define progname firefox |
29 %define pkgname MozillaFirefox |
32 %define pkgname MozillaFirefox |
39 %define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} |
42 %define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} |
40 %define _use_internal_dependency_generator 0 |
43 %define _use_internal_dependency_generator 0 |
41 %define __find_requires sh %{SOURCE4} |
44 %define __find_requires sh %{SOURCE4} |
42 %global provfind sh -c "grep -v '.so' | %__find_provides" |
45 %global provfind sh -c "grep -v '.so' | %__find_provides" |
43 %global __find_provides %provfind |
46 %global __find_provides %provfind |
44 %if 0%{?suse_version} > 1310 |
|
45 %define gstreamer_ver 1.0 |
|
46 %define gstreamer 1 |
|
47 %else |
|
48 %define gstreamer_ver 0.10 |
|
49 %endif |
|
50 # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys |
47 # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys |
51 # Note: these are for the openSUSE Firefox builds ONLY. For your own distribution, |
48 # Note: these are for the openSUSE Firefox builds ONLY. For your own distribution, |
52 # please get your own set of keys. |
49 # please get your own set of keys. |
53 %define _google_api_key AIzaSyD1hTe85_a14kr1Ks8T3Ce75rvbR1_Dx7Q |
50 %define _google_api_key AIzaSyD1hTe85_a14kr1Ks8T3Ce75rvbR1_Dx7Q |
54 %if %update_channel == "aurora" |
51 %if %update_channel == "aurora" |
76 BuildRequires: libiw-devel |
73 BuildRequires: libiw-devel |
77 BuildRequires: libnotify-devel |
74 BuildRequires: libnotify-devel |
78 BuildRequires: libproxy-devel |
75 BuildRequires: libproxy-devel |
79 BuildRequires: makeinfo |
76 BuildRequires: makeinfo |
80 BuildRequires: mozilla-nspr-devel >= 4.12 |
77 BuildRequires: mozilla-nspr-devel >= 4.12 |
81 BuildRequires: mozilla-nss-devel >= 3.22.3 |
78 BuildRequires: mozilla-nss-devel >= 3.23 |
82 BuildRequires: nss-shared-helper-devel |
79 BuildRequires: nss-shared-helper-devel |
83 BuildRequires: python-devel |
80 BuildRequires: python-devel |
84 BuildRequires: startup-notification-devel |
81 BuildRequires: startup-notification-devel |
85 BuildRequires: unzip |
82 BuildRequires: unzip |
86 BuildRequires: update-desktop-files |
83 BuildRequires: update-desktop-files |
87 BuildRequires: xorg-x11-libXt-devel |
84 BuildRequires: xorg-x11-libXt-devel |
88 BuildRequires: yasm |
85 BuildRequires: yasm |
89 BuildRequires: zip |
86 BuildRequires: zip |
90 BuildRequires: pkgconfig(gstreamer-%gstreamer_ver) |
|
91 BuildRequires: pkgconfig(gstreamer-app-%gstreamer_ver) |
|
92 BuildRequires: pkgconfig(gstreamer-plugins-base-%gstreamer_ver) |
|
93 BuildRequires: pkgconfig(libpulse) |
87 BuildRequires: pkgconfig(libpulse) |
94 %if 0%{?firefox_use_gtk3} |
88 %if 0%{?firefox_use_gtk3} |
95 BuildRequires: pkgconfig(glib-2.0) |
89 BuildRequires: pkgconfig(glib-2.0) |
96 BuildRequires: pkgconfig(gobject-2.0) |
90 BuildRequires: pkgconfig(gobject-2.0) |
97 BuildRequires: pkgconfig(gtk+-3.0) >= 3.4.0 |
91 BuildRequires: pkgconfig(gtk+-3.0) >= 3.4.0 |
98 BuildRequires: pkgconfig(gtk+-unix-print-3.0) |
92 BuildRequires: pkgconfig(gtk+-unix-print-3.0) |
99 %endif |
93 %endif |
100 # libavcodec is already used if available for H.264 but |
94 # libavcodec is required for H.264 support but the |
101 # explicitely loaded by FF. For proper H.264 support the |
95 # openSUSE version is currently not able to play H.264 |
102 # openSUSE delivered version is not sufficient but currently |
96 # therefore the Packman version is required |
103 # prevents even the use of the GStreamer method |
97 # minimum version of libavcodec is 53 |
104 # https://bugzilla.mozilla.org/show_bug.cgi?id=1234157 |
|
105 # to get H.264 working correctly libavcodec from packman |
|
106 # is required. As of today the following recommends will |
|
107 # pull in libavcodec52 from packman since it's the only |
|
108 # package providing libavcodec but it's not loaded from |
|
109 # Firefox as the minimal version is 53 |
|
110 #Recommends: libavcodec |
98 #Recommends: libavcodec |
111 %if 0%{?gstreamer} == 1 |
|
112 Requires: libgstreamer-1_0-0 |
|
113 Recommends: gstreamer-fluendo-mp3 |
|
114 Recommends: gstreamer-plugins-libav |
|
115 %else |
|
116 Requires: libgstreamer-0_10-0 |
|
117 Recommends: gstreamer-0_10-fluendo-mp3 |
|
118 Recommends: gstreamer-0_10-plugins-ffmpeg |
|
119 %endif |
|
120 Version: %{mainver} |
99 Version: %{mainver} |
121 Release: 0 |
100 Release: 0 |
122 %if "%{name}" == "MozillaFirefox" |
101 %if "%{name}" == "MozillaFirefox" |
123 Provides: firefox = %{mainver} |
102 Provides: firefox = %{mainver} |
124 Provides: firefox = %{version}-%{release} |
103 Provides: firefox = %{version}-%{release} |
160 Patch2: mozilla-shared-nss-db.patch |
139 Patch2: mozilla-shared-nss-db.patch |
161 Patch3: mozilla-kde.patch |
140 Patch3: mozilla-kde.patch |
162 Patch4: mozilla-preferences.patch |
141 Patch4: mozilla-preferences.patch |
163 Patch5: mozilla-language.patch |
142 Patch5: mozilla-language.patch |
164 Patch6: mozilla-ntlm-full-path.patch |
143 Patch6: mozilla-ntlm-full-path.patch |
165 Patch7: mozilla-repo.patch |
|
166 Patch8: mozilla-openaes-decl.patch |
144 Patch8: mozilla-openaes-decl.patch |
167 Patch10: mozilla-no-stdcxx-check.patch |
145 Patch10: mozilla-no-stdcxx-check.patch |
168 Patch11: mozilla-libproxy.patch |
146 Patch11: mozilla-reduce-files-per-UnifiedBindings.patch |
169 Patch12: mozilla-reduce-files-per-UnifiedBindings.patch |
147 Patch12: mozilla-gtk3_20.patch |
170 Patch13: mozilla-gtk3_20.patch |
148 Patch13: mozilla-check_return.patch |
171 Patch14: mozilla-check_return.patch |
149 Patch14: mozilla-gcc6.patch |
|
150 Patch15: mozilla-exclude-nametablecpp.patch |
172 # Firefox/browser |
151 # Firefox/browser |
173 Patch101: firefox-kde.patch |
152 Patch101: firefox-kde.patch |
174 Patch102: firefox-no-default-ualocale.patch |
153 Patch102: firefox-no-default-ualocale.patch |
175 Patch103: firefox-branded-icons.patch |
154 Patch103: firefox-branded-icons.patch |
176 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
155 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
299 if test "$kdehelperversion" != %{kde_helper_version}; then |
278 if test "$kdehelperversion" != %{kde_helper_version}; then |
300 echo fix kde helper version in the .spec file |
279 echo fix kde helper version in the .spec file |
301 exit 1 |
280 exit 1 |
302 fi |
281 fi |
303 source %{SOURCE5} |
282 source %{SOURCE5} |
304 export MOZ_SOURCE_STAMP=$REV |
283 export MOZ_SOURCE_CHANGESET=$REV |
305 export SOURCE_REPO=$REPO |
284 export SOURCE_REPO=$REPO |
306 export source_repo=$REPO |
285 export source_repo=$REPO |
307 export MOZ_SOURCE_REPO=$REPO |
286 export MOZ_SOURCE_REPO=$REPO |
308 export MOZ_BUILD_DATE=%{releasedate} |
287 export MOZ_BUILD_DATE=%{releasedate} |
309 export MOZILLA_OFFICIAL=1 |
288 export MOZILLA_OFFICIAL=1 |
315 export CFLAGS="${CFLAGS/-g / }" |
294 export CFLAGS="${CFLAGS/-g / }" |
316 %endif |
295 %endif |
317 %ifarch %arm %ix86 |
296 %ifarch %arm %ix86 |
318 # Limit RAM usage during link |
297 # Limit RAM usage during link |
319 export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" |
298 export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" |
|
299 %endif |
|
300 %if 0%{?build_hardened} |
|
301 %ifarch x86_64 |
|
302 export LDFLAGS="${LDFLAGS} -Wl,-z,relro,-z,now" |
|
303 %endif |
320 %endif |
304 %endif |
321 %ifarch ppc64 ppc64le |
305 %ifarch ppc64 ppc64le |
322 export CFLAGS="$CFLAGS -mminimal-toc" |
306 export CFLAGS="$CFLAGS -mminimal-toc" |
323 %endif |
307 %endif |
324 export CXXFLAGS="$CFLAGS" |
308 export CXXFLAGS="$CFLAGS" |
338 %if 0%{?firefox_use_gtk3} |
322 %if 0%{?firefox_use_gtk3} |
339 ac_add_options --enable-default-toolkit=cairo-gtk3 |
323 ac_add_options --enable-default-toolkit=cairo-gtk3 |
340 %else |
324 %else |
341 ac_add_options --enable-default-toolkit=cairo-gtk2 |
325 ac_add_options --enable-default-toolkit=cairo-gtk2 |
342 %endif |
326 %endif |
|
327 %if 0%{?build_hardened} |
|
328 ac_add_options --enable-pie |
|
329 %endif |
343 %ifarch %ix86 %arm |
330 %ifarch %ix86 %arm |
344 %if 0%{?suse_version} > 1230 |
331 %if 0%{?suse_version} > 1230 |
345 ac_add_options --disable-optimize |
332 ac_add_options --disable-optimize |
346 %endif |
333 %endif |
347 %endif |
334 %endif |
348 %ifnarch ppc ppc64 ppc64le aarch64 |
335 %ifarch ppc ppc64 ppc64le aarch64 %arm |
349 ac_add_options --enable-elf-hack |
336 ac_add_options --disable-elf-hack |
350 %endif |
337 %endif |
351 ac_add_options --with-system-nspr |
338 ac_add_options --with-system-nspr |
352 ac_add_options --with-system-nss |
339 ac_add_options --with-system-nss |
353 %if %{localize} |
340 %if %{localize} |
354 ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n |
341 ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n |
355 %endif |
342 %endif |
356 #ac_add_options --with-system-jpeg # libjpeg-turbo is used internally |
343 #ac_add_options --with-system-jpeg # libjpeg-turbo is used internally |
357 #ac_add_options --with-system-png # doesn't work because of missing APNG support |
344 #ac_add_options --with-system-png # doesn't work because of missing APNG support |
358 ac_add_options --with-system-zlib |
345 ac_add_options --with-system-zlib |
359 ac_add_options --disable-installer |
|
360 ac_add_options --disable-updater |
346 ac_add_options --disable-updater |
361 ac_add_options --disable-tests |
347 ac_add_options --disable-tests |
362 ac_add_options --disable-debug |
348 ac_add_options --disable-debug |
363 ac_add_options --enable-startup-notification |
349 ac_add_options --enable-startup-notification |
364 #ac_add_options --enable-chrome-format=jar |
350 #ac_add_options --enable-chrome-format=jar |
365 ac_add_options --enable-update-channel=%{update_channel} |
351 ac_add_options --enable-update-channel=%{update_channel} |
366 %if 0%{?gstreamer} == 1 |
|
367 ac_add_options --enable-gstreamer=1.0 |
|
368 %endif |
|
369 %if %branding |
352 %if %branding |
370 ac_add_options --enable-official-branding |
353 ac_add_options --enable-official-branding |
371 %endif |
354 %endif |
372 ac_add_options --enable-libproxy |
355 ac_add_options --enable-libproxy |
373 %if ! %crashreporter |
356 %if ! %crashreporter |
374 ac_add_options --disable-crashreporter |
357 ac_add_options --disable-crashreporter |
375 %endif |
358 %endif |
376 %ifarch %arm |
359 %ifarch %arm |
377 ac_add_options --disable-elf-hack |
|
378 ac_add_options --with-fpu=vfpv3-d16 |
360 ac_add_options --with-fpu=vfpv3-d16 |
379 ac_add_options --with-float-abi=hard |
361 ac_add_options --with-float-abi=hard |
380 ac_add_options --with-arch=armv7-a |
362 ac_add_options --with-arch=armv7-a |
381 %endif |
363 %endif |
382 %ifarch %arm aarch64 s390x |
364 %ifarch %arm aarch64 s390x |