15 |
15 |
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 %define major 23 |
20 %define major 24 |
21 %define mainver %major.98 |
21 %define mainver %major.0.99 |
22 %define update_channel aurora |
22 %define update_channel beta |
23 |
23 |
24 %if %suse_version > 1220 |
24 %if %suse_version > 1220 |
25 %define gstreamer_ver 0.10 |
25 %define gstreamer_ver 0.10 |
26 %else |
26 %else |
27 %define gstreamer_ver 0.10 |
27 %define gstreamer_ver 0.10 |
49 BuildRequires: libproxy-devel |
49 BuildRequires: libproxy-devel |
50 %else |
50 %else |
51 BuildRequires: wireless-tools |
51 BuildRequires: wireless-tools |
52 %endif |
52 %endif |
53 BuildRequires: mozilla-nspr-devel >= 4.10 |
53 BuildRequires: mozilla-nspr-devel >= 4.10 |
54 BuildRequires: mozilla-nss-devel >= 3.15 |
54 BuildRequires: mozilla-nss-devel >= 3.15.1 |
55 BuildRequires: nss-shared-helper-devel |
55 BuildRequires: nss-shared-helper-devel |
56 %if %suse_version > 1210 |
56 %if %suse_version > 1210 |
57 BuildRequires: pkgconfig(gstreamer-%gstreamer_ver) |
57 BuildRequires: pkgconfig(gstreamer-%gstreamer_ver) |
58 BuildRequires: pkgconfig(gstreamer-app-%gstreamer_ver) |
58 BuildRequires: pkgconfig(gstreamer-app-%gstreamer_ver) |
59 BuildRequires: pkgconfig(gstreamer-plugins-base-%gstreamer_ver) |
59 BuildRequires: pkgconfig(gstreamer-plugins-base-%gstreamer_ver) |
60 %endif |
60 %endif |
61 Version: %{mainver} |
61 Version: %{mainver} |
62 Release: 0 |
62 Release: 0 |
63 %define releasedate 2013071300 |
63 %define releasedate 2013091200 |
64 Provides: firefox = %{mainver} |
64 Provides: firefox = %{mainver} |
65 Provides: firefox = %{version}-%{release} |
65 Provides: firefox = %{version}-%{release} |
66 Provides: web_browser |
66 Provides: web_browser |
67 Provides: browser(npapi) |
67 Provides: browser(npapi) |
68 # this is needed to match this package with the kde4 helper package without the main package |
68 # this is needed to match this package with the kde4 helper package without the main package |
133 %define desktop_file_name firefox |
133 %define desktop_file_name firefox |
134 %else |
134 %else |
135 %define desktop_file_name %{name} |
135 %define desktop_file_name %{name} |
136 %endif |
136 %endif |
137 ### build options |
137 ### build options |
138 %define branding 0 |
138 %define branding 1 |
139 %define localize 1 |
139 %define localize 1 |
140 %ifarch ppc ppc64 s390 s390x ia64 %arm |
140 %ifarch ppc ppc64 s390 s390x ia64 %arm |
141 %define crashreporter 0 |
141 %define crashreporter 0 |
142 %else |
142 %else |
143 %define crashreporter 1 |
143 %define crashreporter 1 |
163 %if %localize |
163 %if %localize |
164 |
164 |
165 %package translations-common |
165 %package translations-common |
166 Summary: Common translations for Firefox |
166 Summary: Common translations for Firefox |
167 Group: System/Localization |
167 Group: System/Localization |
168 Provides: locale(%{name}:ar;ca;cs;da;de;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) |
168 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) |
169 Requires: %{name} = %{version} |
169 Requires: %{name} = %{version} |
170 Obsoletes: %{name}-translations < %{version}-%{release} |
170 Obsoletes: %{name}-translations < %{version}-%{release} |
171 |
171 |
172 %description translations-common |
172 %description translations-common |
173 This package contains several common languages for the user interface |
173 This package contains several common languages for the user interface |
174 of Firefox. |
174 of Firefox. |
175 |
175 |
176 %package translations-other |
176 %package translations-other |
177 Summary: Extra translations for Firefox |
177 Summary: Extra translations for Firefox |
178 Group: System/Localization |
178 Group: System/Localization |
179 Provides: locale(%{name}:ach;af;ak;as;ast;be;bg;bn_BD;bn_IN;br;bs;csb;cy;el;en_ZA;eo;es_MX;et;eu;fa;ff;fy_NL;ga_IE;gd;gl;gu_IN;he;hi_IN;hr;hy_AM;id;is;kk;km;kn;ku;lg;lij;lt;lv;mai;mk;ml;mr;nn_NO;nso;or;pa_IN;rm;ro;si;sk;sl;son;sq;sr;ta;ta_LK;te;th;tr;uk;vi;zu) |
179 Provides: locale(%{name}:ach;af;ak;as;ast;be;bg;bn_BD;bn_IN;br;bs;csb;cy;en_ZA;eo;es_MX;et;eu;fa;ff;fy_NL;ga_IE;gd;gl;gu_IN;he;hi_IN;hr;hy_AM;id;is;kk;km;kn;ku;lg;lij;lt;lv;mai;mk;ml;mr;nn_NO;nso;or;pa_IN;rm;ro;si;sk;sl;son;sq;sr;ta;ta_LK;te;th;tr;uk;vi;zu) |
180 Requires: %{name} = %{version} |
180 Requires: %{name} = %{version} |
181 Obsoletes: %{name}-translations < %{version}-%{release} |
181 Obsoletes: %{name}-translations < %{version}-%{release} |
182 |
182 |
183 %description translations-other |
183 %description translations-other |
184 This package contains rarely used languages for the user interface |
184 This package contains rarely used languages for the user interface |
298 ac_add_options --disable-tests |
298 ac_add_options --disable-tests |
299 ac_add_options --disable-debug |
299 ac_add_options --disable-debug |
300 ac_add_options --enable-startup-notification |
300 ac_add_options --enable-startup-notification |
301 #ac_add_options --enable-chrome-format=jar |
301 #ac_add_options --enable-chrome-format=jar |
302 ac_add_options --enable-update-channel=%{update_channel} |
302 ac_add_options --enable-update-channel=%{update_channel} |
303 EOF |
|
304 %if %suse_version > 1130 |
303 %if %suse_version > 1130 |
305 cat << EOF >> $MOZCONFIG |
|
306 ac_add_options --disable-gnomevfs |
304 ac_add_options --disable-gnomevfs |
307 ac_add_options --enable-gio |
305 ac_add_options --enable-gio |
308 EOF |
|
309 %endif |
306 %endif |
310 %if %suse_version < 1220 |
307 %if %suse_version < 1220 |
311 cat << EOF >> $MOZCONFIG |
|
312 ac_add_options --disable-gstreamer |
308 ac_add_options --disable-gstreamer |
313 EOF |
|
314 %endif |
309 %endif |
315 %if %branding |
310 %if %branding |
316 cat << EOF >> $MOZCONFIG |
|
317 ac_add_options --enable-official-branding |
311 ac_add_options --enable-official-branding |
318 EOF |
|
319 %endif |
312 %endif |
320 %if %suse_version > 1110 |
313 %if %suse_version > 1110 |
321 cat << EOF >> $MOZCONFIG |
|
322 ac_add_options --enable-libproxy |
314 ac_add_options --enable-libproxy |
323 EOF |
|
324 %endif |
315 %endif |
325 %if ! %crashreporter |
316 %if ! %crashreporter |
326 cat << EOF >> $MOZCONFIG |
|
327 ac_add_options --disable-crashreporter |
317 ac_add_options --disable-crashreporter |
328 EOF |
|
329 %endif |
318 %endif |
330 # Disable neon for arm as it does not build correctly |
319 # Disable neon for arm as it does not build correctly |
331 %ifarch %arm |
320 %ifarch %arm |
332 cat << EOF >> $MOZCONFIG |
|
333 ac_add_options --disable-neon |
321 ac_add_options --disable-neon |
|
322 %endif |
|
323 %ifnarch %ix86 x86_64 |
|
324 ac_add_options --disable-webrtc |
|
325 %endif |
334 EOF |
326 EOF |
335 %endif |
|
336 %ifnarch %ix86 x86_64 |
|
337 cat << EOF >> $MOZCONFIG |
|
338 ac_add_options --disable-webrtc |
|
339 EOF |
|
340 %endif |
|
341 make -f client.mk build |
327 make -f client.mk build |
342 |
328 |
343 %install |
329 %install |
344 cd $RPM_BUILD_DIR/obj |
330 cd $RPM_BUILD_DIR/obj |
345 source %{SOURCE5} |
331 source %{SOURCE5} |
370 %if %localize |
356 %if %localize |
371 rm -f %{_tmppath}/translations.* |
357 rm -f %{_tmppath}/translations.* |
372 touch %{_tmppath}/translations.{common,other} |
358 touch %{_tmppath}/translations.{common,other} |
373 for locale in $(awk '{ print $1; }' ../mozilla/browser/locales/shipped-locales); do |
359 for locale in $(awk '{ print $1; }' ../mozilla/browser/locales/shipped-locales); do |
374 case $locale in |
360 case $locale in |
375 ja-JP-mac|en-US|mn|ta-LK) |
361 ja-JP-mac|en-US) |
376 ;; |
362 ;; |
377 *) |
363 *) |
378 pushd $RPM_BUILD_DIR/compare-locales |
364 pushd $RPM_BUILD_DIR/compare-locales |
379 PYTHONPATH=lib \ |
365 PYTHONPATH=lib \ |
380 scripts/compare-locales -m ../l10n-merged/$locale \ |
366 scripts/compare-locales -m ../l10n-merged/$locale \ |
387 # remove prefs, profile defaults, and hyphenation from langpack |
373 # remove prefs, profile defaults, and hyphenation from langpack |
388 rm -rf $RPM_BUILD_ROOT%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults |
374 rm -rf $RPM_BUILD_ROOT%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults |
389 rm -rf $RPM_BUILD_ROOT%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation |
375 rm -rf $RPM_BUILD_ROOT%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation |
390 # check against the fixed common list and sort into the right filelist |
376 # check against the fixed common list and sort into the right filelist |
391 _matched=0 |
377 _matched=0 |
392 for _match in ar ca cs da de 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 |
378 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 |
393 [ "$_match" = "$locale" ] && _matched=1 |
379 [ "$_match" = "$locale" ] && _matched=1 |
394 done |
380 done |
395 [ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other |
381 [ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other |
396 echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org \ |
382 echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org \ |
397 >> %{_tmppath}/translations.$_l10ntarget |
383 >> %{_tmppath}/translations.$_l10ntarget |