1 |
# |
2 |
# WARNING, READ FIRST: |
3 |
# |
4 |
# PLEASE svn cp SOURCES FROM xulrunner SOURCES INSTEAD |
5 |
# OF COMMITING AGAIN THE TARBALL |
6 |
# |
7 |
# This is a special package that needs special treatment. Due to the amount of |
8 |
# security updates it needs, it's common to ship new upstream versions instead of patching. |
9 |
# That means this package MUST be BUILDABLE for stable official releases. |
10 |
# This also means only STABLE upstream releases, NO betas. |
11 |
# This is a discussed topic. Please, do not flame it again. |
12 |
|
13 |
%define major 4 |
14 |
%define ff_epoch 0 |
15 |
# (tpg) set version HERE !!! |
16 |
%define realver %{major}.0.1 |
17 |
%define xulrunner_version 2.0.1 |
18 |
# (tpg) MOZILLA_FIVE_HOME |
19 |
%define mozillalibdir %{_libdir}/%{name}-%{realver} |
20 |
%define pluginsdir %{_libdir}/mozilla/plugins |
21 |
|
22 |
# libxul.so is provided by libxulrunnner2.0. |
23 |
%define _requires_exceptions libxul.so |
24 |
|
25 |
# this seems fragile, so require the exact version or later (#58754) |
26 |
%define sqlite3_version %(pkg-config --modversion sqlite3 &>/dev/null && pkg-config --modversion sqlite3 2>/dev/null || echo 0) |
27 |
|
28 |
%define _use_syshunspell 1 |
29 |
|
30 |
#define prel 0 |
31 |
%if 0%{?prel} |
32 |
%define release %mkrel -c %prel 1 |
33 |
%else |
34 |
%define release %mkrel 4 |
35 |
%endif |
36 |
|
37 |
Summary: Next generation web browser |
38 |
Name: firefox |
39 |
Version: %{realver} |
40 |
Epoch: %{ff_epoch} |
41 |
Release: %{release} |
42 |
License: MPLv1+ |
43 |
Group: Networking/WWW |
44 |
Url: http://www.mozilla.com/firefox/ |
45 |
%if 0%{?prel} |
46 |
Source0: ftp://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{realver}/source/%{name}-%{realver}%prel.source.tar.bz2 |
47 |
Source1: ftp://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{realver}/source/%{name}-%{realver}%prel.source.tar.bz2.asc |
48 |
%else |
49 |
Source0: ftp://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{realver}/source/%{name}-%{realver}.source.tar.bz2 |
50 |
Source1: ftp://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{realver}/source/%{name}-%{realver}.source.tar.bz2.asc |
51 |
%endif |
52 |
Source4: %{name}.desktop |
53 |
Source5: firefox-searchengines-jamendo.xml |
54 |
Source6: firefox-searchengines-exalead.xml |
55 |
Source8: firefox-searchengines-askcom.xml |
56 |
Source9: kde.js |
57 |
Patch1: mozilla-firefox-3.0.5-lang.patch |
58 |
Patch3: mozilla-firefox-1.5.0.6-systemproxy.patch |
59 |
Patch5: firefox-3.0b3-check-default-browser.patch |
60 |
Patch6: mozilla-firefox-run-mozilla.patch |
61 |
Patch14: mozilla-firefox-1.5-software-update.patch |
62 |
#Patch15: firefox-3.0.1-disable-classic-theme.patch |
63 |
Patch16: firefox-3.5.3-default-mail-handler.patch |
64 |
Patch17: firefox-kde.patch |
65 |
# (OpenSuse) add patch to make firefox always use /usr/bin/firefox when "make firefox |
66 |
# the default web browser" is used fix mdv bug#58784 |
67 |
Patch18: firefox-3.6.3-appname.patch |
68 |
|
69 |
Patch31: xulrunner-bug626035.patch |
70 |
# patch from https://bugzilla.mozilla.org/show_bug.cgi?id=551138 |
71 |
# we'll have to use system libffi on arm because moz folks are using |
72 |
# vfp asm which doesn't exist on non-cortex platforms |
73 |
# src/arm/sysv.S: Assembler messages: |
74 |
# src/arm/sysv.S:266: Error: selected processor does not support ARM mode `flddle d0,[ip]' |
75 |
# src/arm/sysv.S:267: Error: selected processor does not support ARM mode `fldmiadgt ip,{d0-d7}' |
76 |
# src/arm/sysv.S:307: Error: selected processor does not support ARM mode `fstseq s0,[r2]' |
77 |
# src/arm/sysv.S:311: Error: selected processor does not support ARM mode `fstdeq d0,[r2]' |
78 |
# src/arm/sysv.S:316: Error: selected processor does not support ARM mode `fstmiadeq r2,{d0-d3}' |
79 |
# src/arm/sysv.S:400: Error: selected processor does not support ARM mode `fstmfdd sp!,{d0-d7}' |
80 |
# src/arm/sysv.S:438: Error: selected processor does not support ARM mode `flds s0,[sp]' |
81 |
# src/arm/sysv.S:441: Error: selected processor does not support ARM mode `fldd d0,[sp]' |
82 |
# src/arm/sysv.S:450: Error: selected processor does not support ARM mode `fldmiad sp,{d0-d1}' |
83 |
# src/arm/sysv.S:453: Error: selected processor does not support ARM mode `fldmiad sp,{d0-d3}' |
84 |
Patch32: xulrunner_allow_to_use_system_libffi.patch |
85 |
Patch33: xulrunner_configure_neon_check.patch |
86 |
Patch34: xulrunner_nojit.patch |
87 |
Patch35: xulrunner_bug634594.patch |
88 |
BuildRequires: gtk+2-devel |
89 |
BuildRequires: unzip |
90 |
BuildRequires: zip |
91 |
#BuildRequires: libpng-devel >= 1.4.1 |
92 |
BuildRequires: libjpeg-devel |
93 |
BuildRequires: zlib-devel |
94 |
BuildRequires: glib2-devel |
95 |
BuildRequires: libIDL2-devel |
96 |
BuildRequires: makedepend |
97 |
BuildRequires: nss-devel >= 2:3.12.8 |
98 |
BuildRequires: nspr-devel >= 2:4.8.7 |
99 |
BuildRequires: startup-notification-devel |
100 |
BuildRequires: dbus-glib-devel |
101 |
BuildRequires: python |
102 |
Requires: %{mklibname sqlite3_ 0} >= %{sqlite3_version} |
103 |
BuildRequires: libsqlite3-devel >= 3.7.0.1-2 |
104 |
%ifnarch %arm %mips |
105 |
BuildRequires: valgrind |
106 |
BuildRequires: java-rpmbuild |
107 |
BuildRequires: yasm |
108 |
%endif |
109 |
%ifarch %arm |
110 |
BuildRequires: libffi-devel |
111 |
%endif |
112 |
BuildRequires: rootcerts |
113 |
BuildRequires: libxt-devel |
114 |
%if %_use_syshunspell |
115 |
BuildRequires: hunspell-devel |
116 |
%endif |
117 |
BuildRequires: doxygen |
118 |
BuildRequires: libgnome2-devel |
119 |
BuildRequires: libgnomeui2-devel |
120 |
BuildRequires: xulrunner-devel >= %xulrunner_version%{?prel:-0.%prel} |
121 |
BuildRequires: wget |
122 |
BuildRequires: libnotify-devel |
123 |
BuildRequires: cairo-devel >= 1.10 |
124 |
BuildRequires: mesagl-devel |
125 |
BuildRequires: libvpx-devel |
126 |
BuildRequires: autoconf2.1 |
127 |
%if 0%{?prel} |
128 |
Provides: %{name} = %{epoch}:%{realver}-0.%{prel} |
129 |
%else |
130 |
Provides: %{name} = %{epoch}:%{realver} |
131 |
%endif |
132 |
Provides: webclient |
133 |
Requires: indexhtml |
134 |
Requires: xdg-utils |
135 |
Suggests: myspell-en_US |
136 |
%ifarch x86_64 |
137 |
Suggests: nspluginwrapper |
138 |
%endif |
139 |
Requires(post): desktop-file-utils |
140 |
Requires(postun): desktop-file-utils |
141 |
# fixes bug #42096 |
142 |
Requires: mailcap |
143 |
Provides: mozilla-firefox = %{epoch}:%{version}-%{release} |
144 |
Requires: xulrunner = %{xulrunner_version}%{?prel:-0.%prel} |
145 |
Requires: %{mklibname xulrunner %xulrunner_version} |
146 |
Obsoletes: firefox-ext-weave-sync |
147 |
|
148 |
%description |
149 |
The award-winning Web browser is now faster, more secure, and fully customizable |
150 |
to your online life. With Firefox(R), we've added powerful new features that |
151 |
make your online experience even better. It is an 'open source' product which is |
152 |
freely available, and is acquiring a growing proportion of international web |
153 |
browser usage. |
154 |
|
155 |
Firefox claims to offer a more secure web browsing experience than other products, |
156 |
with better protection against spyware and other Internet-based security threats. |
157 |
It includes all the standard features of a modern web browser, like Internet |
158 |
searching, tracking recently visited sites, setting up shortcuts to favourite |
159 |
sites, customising the software behaviour and so on. Firefox also includes |
160 |
features like 'tabbed browsing' (opening several web sites as sections within the |
161 |
same window) and methods for controlling pop-up windows, cookies and downloaded |
162 |
files. |
163 |
|
164 |
%package devel |
165 |
Summary: Development files for %{name} |
166 |
Group: Development/Other |
167 |
|
168 |
%description devel |
169 |
Files and macros mainly for building Firefox extensions. |
170 |
|
171 |
%prep |
172 |
%setup -qn mozilla-2.0 |
173 |
#%patch1 -p1 -b .lang rediff |
174 |
# Temporary disabled. It prevents firefox from running. |
175 |
#%patch3 -p1 |
176 |
%patch5 -p1 -b .defaultbrowser |
177 |
# It was disabled because firefox3 hangs when using soundwrapper |
178 |
#%patch6 -p1 |
179 |
#%patch14 -p1 -b .disable-software-update rediff |
180 |
# (salem) this patch does not work properly on ff3. |
181 |
#%patch15 -p1 -b .disable-classic-theme |
182 |
%patch16 -p1 -b .default-mail-handler |
183 |
## KDE INTEGRATION |
184 |
# copy current files and patch them later to keep them in sync |
185 |
%patch17 -p1 |
186 |
# install kde.js |
187 |
install -m 644 %{SOURCE9} browser/app/profile/kde.js |
188 |
%patch18 -p1 -b .appname |
189 |
# (tpg) remove ff bookmarks, use mdv ones |
190 |
rm -rf browser/locales/en-US/profile/bookmarks.html |
191 |
touch browser/locales/en-US/profile/bookmarks.html |
192 |
|
193 |
# needed to regenerate certdata.c |
194 |
pushd security/nss/lib/ckfw/builtins |
195 |
perl ./certdata.perl < /etc/pki/tls/mozilla/certdata.txt |
196 |
popd |
197 |
|
198 |
%patch31 -p1 |
199 |
%patch32 -p1 |
200 |
%patch33 -p1 |
201 |
%ifarch %arm |
202 |
%if "%{_target_cpu}" != "armv7l" |
203 |
%patch34 -p1 |
204 |
%endif |
205 |
%endif |
206 |
%patch35 -p1 |
207 |
|
208 |
pushd js/src |
209 |
autoconf-2.13 |
210 |
popd |
211 |
autoconf-2.13 |
212 |
|
213 |
%build |
214 |
%setup_compile_flags |
215 |
%serverbuild |
216 |
export PREFIX="%{_prefix}" |
217 |
export LIBDIR="%{_libdir}" |
218 |
export MOZILLA_OFFICIAL=1 |
219 |
export BUILD_OFFICIAL=1 |
220 |
|
221 |
# (tpg) don't use macro here |
222 |
# (fhimpe) javaxpcom does not build correctly with xulrunner (is it |
223 |
# actually needed/useful here when enabled already in xulrunner?) |
224 |
# https://bugzilla.mozilla.org/show_bug.cgi?id=448386 |
225 |
./configure --build=%{_target_platform} \ |
226 |
--prefix=%{_prefix} \ |
227 |
--bindir=%{_bindir} \ |
228 |
--libdir=%{_libdir} \ |
229 |
--includedir=%{_includedir} \ |
230 |
--datadir=%{_datadir} \ |
231 |
--enable-application=browser \ |
232 |
%ifarch %arm |
233 |
%if "%{_target_cpu}" != "armv7l" |
234 |
--disable-methodjit \ |
235 |
--disable-tracejit \ |
236 |
%endif |
237 |
--enable-system-ffi \ |
238 |
%endif |
239 |
--disable-elf-hack \ |
240 |
--with-pthreads \ |
241 |
--with-system-jpeg \ |
242 |
--with-system-zlib \ |
243 |
--with-system-bz2 \ |
244 |
--enable-system-png \ |
245 |
--with-system-nspr \ |
246 |
--with-system-nss \ |
247 |
--disable-ldap \ |
248 |
--disable-calendar \ |
249 |
--disable-mailnews \ |
250 |
--disable-chatzilla \ |
251 |
--disable-composer \ |
252 |
--enable-gio \ |
253 |
--disable-gnomevfs \ |
254 |
--disable-profilesharing \ |
255 |
--disable-toolkit-qt \ |
256 |
--disable-installer \ |
257 |
--disable-updater \ |
258 |
--disable-debug \ |
259 |
--disable-pedantic \ |
260 |
--disable-native-uconv \ |
261 |
--disable-elf-dynstr-gc \ |
262 |
--disable-crashreporter \ |
263 |
--disable-strip \ |
264 |
--enable-crypto \ |
265 |
--enable-gnomeui \ |
266 |
--enable-places \ |
267 |
--enable-storage \ |
268 |
--enable-default-toolkit=cairo-gtk2 \ |
269 |
--enable-official-branding \ |
270 |
--enable-svg \ |
271 |
--enable-svg-renderer=cairo \ |
272 |
--enable-single-profile \ |
273 |
--enable-startup-notification \ |
274 |
--enable-system-cairo \ |
275 |
--enable-system-pixman \ |
276 |
--disable-javaxpcom \ |
277 |
--enable-optimize \ |
278 |
--enable-safe-browsing \ |
279 |
--enable-xinerama \ |
280 |
--enable-canvas \ |
281 |
--enable-pango \ |
282 |
--enable-xtf \ |
283 |
--enable-wave \ |
284 |
--enable-ogg \ |
285 |
--enable-system-libvpx \ |
286 |
--enable-xpcom-fastload \ |
287 |
--enable-dbus \ |
288 |
--enable-image-encoder=all \ |
289 |
--enable-image-decoders=all \ |
290 |
--enable-extensions=default \ |
291 |
%if %_use_syshunspell |
292 |
--enable-system-hunspell \ |
293 |
%endif |
294 |
--enable-install-strip \ |
295 |
--enable-url-classifier \ |
296 |
--enable-smil \ |
297 |
--disable-tree-freetype \ |
298 |
--enable-canvas3d \ |
299 |
--disable-coretext \ |
300 |
--enable-necko-protocols=all \ |
301 |
--disable-necko-wifi \ |
302 |
--disable-tests \ |
303 |
--disable-mochitest \ |
304 |
--with-distribution-id=com.mageia \ |
305 |
--enable-jemalloc \ |
306 |
--enable-system-sqlite \ |
307 |
--with-system-libxul \ |
308 |
--enable-chrome-format=jar \ |
309 |
--with-libxul-sdk=`pkg-config --variable=sdkdir libxul` \ |
310 |
%ifnarch %arm %mips |
311 |
--with-valgrind \ |
312 |
--with-java-include-path=%{java_home}/include \ |
313 |
--with-java-bin-path=%{java_home}/bin \ |
314 |
%endif |
315 |
--with-default-mozilla-five-home="%{mozillalibdir}" |
316 |
|
317 |
%__perl -p -i -e 's|\-0|\-9|g' config/make-jars.pl |
318 |
|
319 |
%make |
320 |
|
321 |
%install |
322 |
rm -rf %{buildroot} |
323 |
|
324 |
%makeinstall_std |
325 |
|
326 |
ln -s firefox %{buildroot}%{_bindir}/mozilla-firefox |
327 |
sed -i "s,@LIBDIR@,%{_libdir}," %{buildroot}%{mozillalibdir}/%{name} |
328 |
|
329 |
# Create an own %_libdir/mozilla/plugins |
330 |
%{__mkdir_p} %{buildroot}%{_libdir}/mozilla/plugins |
331 |
|
332 |
# (tpg) desktop entry |
333 |
%{__mkdir_p} %{buildroot}%{_datadir}/applications |
334 |
install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/applications/%{name}.desktop |
335 |
|
336 |
# (tpg) icons |
337 |
%{__cp} other-licenses/branding/%{name}/default16.png %{buildroot}/%{mozillalibdir}/icons/ |
338 |
for i in 16 22 24 32 48 256; do |
339 |
%{__mkdir_p} %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps |
340 |
%{__cp} other-licenses/branding/%{name}/default$i.png %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps/firefox.png ; |
341 |
done |
342 |
|
343 |
install -D -m644 browser/app/profile/prefs.js %{buildroot}%{mozillalibdir}/defaults/profile/prefs.js |
344 |
cat << EOF >> %{buildroot}%{mozillalibdir}/defaults/profile/prefs.js |
345 |
user_pref("browser.EULA.override", true); |
346 |
user_pref("browser.shell.checkDefaultBrowser", false); |
347 |
user_pref("browser.startup.homepage", "file:///usr/share/indexhtml/index.html"); |
348 |
user_pref("app.update.auto", false); |
349 |
user_pref("app.update.enabled", false); |
350 |
user_pref("app.update.autoInstallEnabled", false); |
351 |
user_pref("browser.showQuitWarning", true); |
352 |
EOF |
353 |
|
354 |
# (ahmad) these ones belonged in prefs.js (see above), remove them until it's |
355 |
# decided what search engines to ship by default |
356 |
#user_pref("browser.search.selectedEngine","Ask.com"); |
357 |
#user_pref("browser.search.order.1","Ask.com"); |
358 |
#user_pref("browser.search.order.2","Exalead"); |
359 |
#user_pref("browser.search.order.3","Google"); |
360 |
#user_pref("browser.search.order.4","Yahoo"); |
361 |
|
362 |
# (ahmad) don't install these until it's decided what search engines to ship by |
363 |
# default |
364 |
# search engines |
365 |
#cp -f %{SOURCE5} %{buildroot}%{mozillalibdir}/searchplugins/jamendo.xml |
366 |
#cp -f %{SOURCE6} %{buildroot}%{mozillalibdir}/searchplugins/exalead.xml |
367 |
#cp -f %{SOURCE8} %{buildroot}%{mozillalibdir}/searchplugins/askcom.xml |
368 |
|
369 |
#sed -i 's/@DISTRO_VALUE@/ffx/' %{buildroot}%{mozillalibdir}/searchplugins/askcom.xml |
370 |
#sed -i 's/@DISTRO_VALUE@//' %{buildroot}%{mozillalibdir}/searchplugins/exalead.xml |
371 |
|
372 |
%find_lang %{name} |
373 |
|
374 |
mkdir -p %{buildroot}%{_sys_macros_dir} |
375 |
cat <<FIN >%{buildroot}%{_sys_macros_dir}/%{name}.macros |
376 |
# Macros from %{name} package |
377 |
%%firefox_major %{major} |
378 |
%%firefox_epoch %{ff_epoch} |
379 |
%%firefox_version %{realver}%{?prel:-0.%prel} |
380 |
%%firefox_mozillapath %{mozillalibdir} |
381 |
%%firefox_xulrunner_version %{xulrunner_version} |
382 |
%%firefox_pluginsdir %{pluginsdir} |
383 |
%%firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} |
384 |
%%firefox_extdir %%(if [ "%%_target_cpu" = "noarch" ]; then echo %%{_datadir}/mozilla/extensions/%%{firefox_appid}; else echo %%{_libdir}/mozilla/extensions/%%{firefox_appid}; fi) |
385 |
FIN |
386 |
|
387 |
%post |
388 |
if [ ! -r /etc/sysconfig/oem ]; then |
389 |
case `grep META_CLASS /etc/sysconfig/system` in |
390 |
*powerpack) bookmark="mozilla-powerpack.html" ;; |
391 |
*desktop) bookmark="mozilla-one.html";; |
392 |
*) bookmark="mozilla-download.html";; |
393 |
esac |
394 |
ln -s -f ../../../../share/mdk/bookmarks/mozilla/$bookmark %{mozillalibdir}/defaults/profile/bookmarks.html |
395 |
fi |
396 |
|
397 |
%clean |
398 |
rm -rf %{buildroot} |
399 |
|
400 |
%files -f %{name}.lang |
401 |
%defattr(-,root,root) |
402 |
%{_bindir}/%{name} |
403 |
%{_bindir}/mozilla-firefox |
404 |
%{_iconsdir}/hicolor/*/apps/*.png |
405 |
%{_datadir}/applications/*.desktop |
406 |
%{_libdir}/%{name}-%{realver}* |
407 |
%dir %{_libdir}/mozilla |
408 |
%dir %{pluginsdir} |
409 |
|
410 |
%files devel |
411 |
%{_sys_macros_dir}/%{name}.macros |