/[packages]/cauldron/firefox/current/SPECS/firefox.spec
ViewVC logotype

Contents of /cauldron/firefox/current/SPECS/firefox.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 117223 - (show annotations) (download)
Fri Jul 1 20:26:18 2011 UTC (11 years, 3 months ago) by ahmad
File size: 13713 byte(s)
- Only suggest nspluginwrapper for x86_64 package:
  o firefox doesn't need a plugin wrapper nowadays that it has a native
    out-of-process-plugin technology
  o nspluginwrapper is only useful for the x86_64 package, to enable using
    32bit-only plugins (e.g. Adobe nppdf or flash player)

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

  ViewVC Help
Powered by ViewVC 1.1.28