]> git.pld-linux.org Git - packages/firefox.git/blame_incremental - mozilla-firefox.spec
- updated to 10.0.2
[packages/firefox.git] / mozilla-firefox.spec
... / ...
CommitLineData
1# NOTE: PLD distributes iceweasel instead
2#
3# TODO:
4# - (12:22:58) patrys: can you also move _libdir/mozilla-firefox to just _libdir/firefox?
5# (12:23:25) patrys: it's not like we ship official firefox
6# - fix wrapper script to allow playing with profiles (must not use -remote)
7#
8# Conditional build:
9%bcond_with tests # enable tests (whatever they check)
10%bcond_without gnomeui # disable gnomeui support
11%bcond_without gnome # synonym for gnomeui (gconf, libnotify and gio are still enabled)
12%bcond_without kerberos # disable krb5 support
13%bcond_without xulrunner # system xulrunner
14
15%if %{without gnome}
16%undefine with_gnomeui
17%endif
18
19%if %{without xulrunner}
20# The actual sqlite version (see RHBZ#480989):
21%define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR)
22%endif
23
24Summary: Firefox Community Edition web browser
25Summary(pl.UTF-8): Firefox Community Edition - przeglądarka WWW
26Name: mozilla-firefox
27Version: 10.0.2
28Release: 1
29License: MPL 1.1 or GPL v2+ or LGPL v2.1+
30Group: X11/Applications/Networking
31Source0: http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/%{version}/source/firefox-%{version}.source.tar.bz2
32# Source0-md5: 5ce038d591964f72c534fa33b75a62f5
33Source1: %{name}.desktop
34Source2: %{name}.sh
35Patch0: %{name}-install.patch
36Patch1: %{name}-gcc3.patch
37Patch2: %{name}-agent.patch
38Patch3: %{name}-agent-ac.patch
39Patch4: %{name}-ti-agent.patch
40Patch5: %{name}-branding.patch
41Patch6: %{name}-prefs.patch
42Patch7: %{name}-nss_cflags.patch
43Patch8: %{name}-no-subshell.patch
44URL: http://www.mozilla.org/projects/firefox/
45BuildRequires: GConf2-devel >= 1.2.1
46BuildRequires: OpenGL-devel
47BuildRequires: alsa-lib-devel
48BuildRequires: automake
49BuildRequires: bzip2-devel
50BuildRequires: cairo-devel >= 1.10.2-5
51BuildRequires: dbus-glib-devel >= 0.60
52BuildRequires: glib2-devel >= 1:2.18
53BuildRequires: gtk+2-devel >= 2:2.14
54%{?with_kerberos:BuildRequires: heimdal-devel >= 0.7.1}
55BuildRequires: hunspell-devel
56BuildRequires: libIDL-devel >= 0.8.0
57BuildRequires: libdnet-devel
58BuildRequires: libevent-devel >= 1.4.7
59%{?with_gnomeui:BuildRequires: libgnomeui-devel >= 2.2.0}
60BuildRequires: libiw-devel
61BuildRequires: libjpeg-devel >= 6b
62BuildRequires: libnotify-devel >= 0.4
63BuildRequires: libpng(APNG)-devel >= 0.10
64BuildRequires: libpng-devel >= 1.4.1
65BuildRequires: libstdc++-devel
66BuildRequires: libvpx-devel >= 1.0.0
67BuildRequires: nspr-devel >= 1:4.8.9
68BuildRequires: nss-devel >= 1:3.13.1
69BuildRequires: pango-devel >= 1:1.14.0
70BuildRequires: perl-modules >= 5.004
71BuildRequires: pkgconfig
72BuildRequires: pkgconfig(libffi) >= 3.0.9
73BuildRequires: python-modules
74BuildRequires: rpm >= 4.4.9-56
75BuildRequires: rpmbuild(macros) >= 1.601
76BuildRequires: sqlite3-devel >= 3.7.7.1
77BuildRequires: startup-notification-devel >= 0.8
78BuildRequires: xorg-lib-libXScrnSaver-devel
79BuildRequires: xorg-lib-libXext-devel
80BuildRequires: xorg-lib-libXinerama-devel
81BuildRequires: xorg-lib-libXt-devel
82%if %{with xulrunner}
83BuildRequires: xulrunner-devel >= 2:%{version}
84%endif
85BuildRequires: zip
86BuildRequires: zlib-devel >= 1.2.3
87Requires(post): mktemp >= 1.5-18
88%if %{with xulrunner}
89%requires_eq_to xulrunner xulrunner-devel
90%else
91Requires: browser-plugins >= 2.0
92Requires: cairo >= 1.10.2-5
93Requires: dbus-glib >= 0.60
94Requires: glib2 >= 1:2.18
95Requires: gtk+2 >= 2:2.14
96Requires: libpng >= 1.4.1
97Requires: libpng(APNG) >= 0.10
98Requires: myspell-common
99Requires: nspr >= 1:4.8.9
100Requires: nss >= 1:3.13.1
101Requires: pango >= 1:1.14.0
102Requires: sqlite3 >= %{sqlite_build_version}
103Requires: startup-notification >= 0.8
104%endif
105Provides: wwwbrowser
106Obsoletes: mozilla-firebird
107Obsoletes: mozilla-firefox-lang-en < 2.0.0.8-3
108Obsoletes: mozilla-firefox-libs
109BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
110
111# don't satisfy other packages (don't use %{name} here)
112%define _noautoprovfiles %{_libdir}/mozilla-firefox
113# and as we don't provide them, don't require either
114%define _noautoreq libmozjs.so libxpcom.so libxul.so %{!?with_xulrunner:libmozalloc.so}
115
116%if "%{cc_version}" >= "3.4"
117%define specflags -fno-strict-aliasing -fno-tree-vrp -fno-stack-protector
118%else
119%define specflags -fno-strict-aliasing
120%endif
121
122%description
123Firefox Community Edition is an open-source web browser, designed for
124standards compliance, performance and portability.
125
126%description -l pl.UTF-8
127Firefox Community Edition jest przeglądarką WWW rozpowszechnianą
128zgodnie z ideami ruchu otwartego oprogramowania oraz tworzoną z myślą
129o zgodności ze standardami, wydajnością i przenośnością.
130
131%prep
132%setup -qc
133mv -f mozilla-release mozilla
134cd mozilla
135
136# libvpx fix
137grep -q VPX_CODEC_USE_INPUT_PARTITION configure.in && sed -i 's#VPX_CODEC_USE_INPUT_PARTITION#VPX_CODEC_USE_INPUT_FRAGMENTS#' configure || exit 1
138
139%patch0 -p1
140
141%if "%{cc_version}" < "3.4"
142%patch1 -p2
143%endif
144
145%if "%{pld_release}" == "th"
146%patch2 -p1
147%endif
148
149%if "%{pld_release}" == "ac"
150%patch3 -p1
151%endif
152
153%if "%{pld_release}" == "ti"
154%patch4 -p1
155%endif
156
157%patch5 -p1
158%patch6 -p1
159%patch7 -p1
160%patch8 -p2
161
162# config/rules.mk is patched by us and js/src/config/rules.mk
163# is supposed to be exact copy
164cp -a config/rules.mk js/src/config/rules.mk
165
166%build
167cd mozilla
168cp -f %{_datadir}/automake/config.* build/autoconf
169
170cat << EOF > .mozconfig
171. \$topsrcdir/browser/config/mozconfig
172
173mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu}
174
175# Options for 'configure' (same as command-line options).
176ac_add_options --prefix=%{_prefix}
177ac_add_options --exec-prefix=%{_exec_prefix}
178ac_add_options --bindir=%{_bindir}
179ac_add_options --sbindir=%{_sbindir}
180ac_add_options --sysconfdir=%{_sysconfdir}
181ac_add_options --datadir=%{_datadir}
182ac_add_options --includedir=%{_includedir}
183ac_add_options --libdir=%{_libdir}
184ac_add_options --libexecdir=%{_libexecdir}
185ac_add_options --localstatedir=%{_localstatedir}
186ac_add_options --sharedstatedir=%{_sharedstatedir}
187ac_add_options --mandir=%{_mandir}
188ac_add_options --infodir=%{_infodir}
189%if %{?debug:1}0
190ac_add_options --disable-optimize
191ac_add_options --enable-debug
192ac_add_options --enable-debug-modules
193ac_add_options --enable-debugger-info-modules
194ac_add_options --enable-crash-on-assert
195%else
196ac_add_options --disable-debug
197ac_add_options --disable-debug-modules
198ac_add_options --disable-logging
199ac_add_options --enable-optimize="%{rpmcflags} -Os"
200%endif
201ac_add_options --disable-strip
202ac_add_options --disable-strip-libs
203%if %{with tests}
204ac_add_options --enable-tests
205%else
206ac_add_options --disable-tests
207%endif
208%if %{with gnomeui}
209ac_add_options --enable-gnomeui
210%else
211ac_add_options --disable-gnomeui
212%endif
213ac_add_options --disable-gnomevfs
214ac_add_options --disable-crashreporter
215ac_add_options --disable-installer
216ac_add_options --disable-javaxpcom
217ac_add_options --disable-updater
218ac_add_options --enable-gio
219ac_add_options --enable-libxul
220ac_add_options --enable-pango
221ac_add_options --enable-shared-js
222ac_add_options --enable-startup-notification
223ac_add_options --enable-system-cairo
224ac_add_options --enable-system-hunspell
225ac_add_options --enable-system-sqlite
226ac_add_options --with-distribution-id=org.pld-linux
227%if %{with xulrunner}
228ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul)
229%endif
230ac_add_options --with-pthreads
231ac_add_options --with-system-bz2
232ac_add_options --with-system-ffi
233ac_add_options --with-system-jpeg
234ac_add_options --with-system-libevent
235ac_add_options --with-system-libvpx
236ac_add_options --with-system-nspr
237ac_add_options --with-system-nss
238ac_add_options --with-system-png
239ac_add_options --with-system-zlib
240ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
241EOF
242
243%{__make} -f client.mk build \
244 STRIP="/bin/true" \
245 CC="%{__cc}" \
246 CXX="%{__cxx}"
247
248%install
249rm -rf $RPM_BUILD_ROOT
250cd mozilla
251install -d \
252 $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}} \
253 $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}} \
254 $RPM_BUILD_ROOT%{_datadir}/%{name}
255
256%browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins
257
258%{__make} -C obj-%{_target_cpu}/browser/installer stage-package \
259 DESTDIR=$RPM_BUILD_ROOT \
260 MOZ_PKG_DIR=%{_libdir}/%{name} \
261 PKG_SKIP_STRIP=1
262
263install -d \
264 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins
265
266%if %{with xulrunner}
267# >= 5.0 seems to require this
268ln -s ../xulrunner $RPM_BUILD_ROOT%{_libdir}/%{name}/xulrunner
269%endif
270
271# move arch independant ones to datadir
272mv $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome
273mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults
274mv $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions
275mv $RPM_BUILD_ROOT%{_libdir}/%{name}/icons $RPM_BUILD_ROOT%{_datadir}/%{name}/icons
276mv $RPM_BUILD_ROOT%{_libdir}/%{name}/modules $RPM_BUILD_ROOT%{_datadir}/%{name}/modules
277mv $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins $RPM_BUILD_ROOT%{_datadir}/%{name}/searchplugins
278%if %{without xulrunner}
279mv $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs.js $RPM_BUILD_ROOT%{_datadir}/%{name}/greprefs.js
280mv $RPM_BUILD_ROOT%{_libdir}/%{name}/res $RPM_BUILD_ROOT%{_datadir}/%{name}/res
281%endif
282
283ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome
284ln -s ../../share/%{name}/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults
285ln -s ../../share/%{name}/extensions $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions
286ln -s ../../share/%{name}/modules $RPM_BUILD_ROOT%{_libdir}/%{name}/modules
287ln -s ../../share/%{name}/icons $RPM_BUILD_ROOT%{_libdir}/%{name}/icons
288ln -s ../../share/%{name}/searchplugins $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins
289%if %{without xulrunner}
290ln -s ../../share/%{name}/greprefs.js $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs.js
291ln -s ../../share/%{name}/res $RPM_BUILD_ROOT%{_libdir}/%{name}/res
292%endif
293
294%if %{without xulrunner}
295%{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
296ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
297%endif
298
299sed 's,@LIBDIR@,%{_libdir},' %{SOURCE2} > $RPM_BUILD_ROOT%{_bindir}/mozilla-firefox
300chmod 755 $RPM_BUILD_ROOT%{_bindir}/mozilla-firefox
301ln -s mozilla-firefox $RPM_BUILD_ROOT%{_bindir}/firefox
302
303cp -a browser/branding/unofficial/content/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/mozilla-firefox.png
304cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
305
306# files created by firefox -register
307touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat
308touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat
309
310%if %{with xulrunner}
311%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/run-mozilla.sh
312%endif
313
314cat << 'EOF' > $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate
315#!/bin/sh
316umask 022
317rm -f %{_libdir}/%{name}/components/{compreg,xpti}.dat
318
319# it attempts to touch files in $HOME/.mozilla
320# beware if you run this with sudo!!!
321export HOME=$(mktemp -d)
322# also TMPDIR could be pointing to sudo user's homedir
323unset TMPDIR TMP || :
324
325%{_libdir}/%{name}/firefox -register
326
327rm -rf $HOME
328EOF
329chmod 755 $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate
330
331%clean
332rm -rf $RPM_BUILD_ROOT
333
334%pretrans
335if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
336 mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
337fi
338for d in chrome defaults extensions greprefs.js icons res searchplugins; do
339 if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then
340 install -d %{_datadir}/%{name}
341 mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d
342 fi
343done
344exit 0
345
346%post
347%{_sbindir}/%{name}-chrome+xpcom-generate
348%update_browser_plugins
349
350%postun
351if [ "$1" = 0 ]; then
352 %update_browser_plugins
353fi
354
355%files
356%defattr(644,root,root,755)
357%attr(755,root,root) %{_bindir}/%{name}
358%attr(755,root,root) %{_bindir}/firefox
359%attr(755,root,root) %{_sbindir}/%{name}-chrome+xpcom-generate
360
361# browser plugins v2
362%{_browserpluginsconfdir}/browsers.d/%{name}.*
363%config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
364
365%dir %{_libdir}/%{name}
366%if %{without xulrunner}
367%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so
368%attr(755,root,root) %{_libdir}/%{name}/libxpcom.so
369%attr(755,root,root) %{_libdir}/%{name}/libxul.so
370%endif
371%{_libdir}/%{name}/blocklist.xml
372
373%if %{with crashreporter}
374%{_libdir}/%{name}/crashreporter
375%{_libdir}/%{name}/crashreporter-override.ini
376%{_libdir}/%{name}/crashreporter.ini
377%{_libdir}/%{name}/Throbber-small.gif
378%endif
379
380# config?
381%{_libdir}/%{name}/application.ini
382%{_libdir}/%{name}/chrome.manifest
383
384%dir %{_libdir}/%{name}/components
385
386%{_libdir}/%{name}/components/FeedConverter.js
387%{_libdir}/%{name}/components/FeedWriter.js
388%{_libdir}/%{name}/components/PlacesProtocolHandler.js
389%{_libdir}/%{name}/components/Weave.js
390%{_libdir}/%{name}/components/WebContentConverter.js
391%{_libdir}/%{name}/components/browser.xpt
392%{_libdir}/%{name}/components/fuelApplication.js
393%{_libdir}/%{name}/components/nsBrowserContentHandler.js
394%{_libdir}/%{name}/components/nsBrowserGlue.js
395%{_libdir}/%{name}/components/nsPrivateBrowsingService.js
396%{_libdir}/%{name}/components/nsSafebrowsingApplication.js
397%{_libdir}/%{name}/components/nsSessionStartup.js
398%{_libdir}/%{name}/components/nsSessionStore.js
399%{_libdir}/%{name}/components/nsSetDefaultBrowser.js
400%{_libdir}/%{name}/components/nsSidebar.js
401
402%{_libdir}/%{name}/components/components.manifest
403%{_libdir}/%{name}/components/interfaces.manifest
404
405%if %{without xulrunner}
406%{_libdir}/%{name}/platform.ini
407%{_libdir}/%{name}/components/ConsoleAPI.js
408%{_libdir}/%{name}/components/FeedProcessor.js
409%{_libdir}/%{name}/components/GPSDGeolocationProvider.js
410%{_libdir}/%{name}/components/NetworkGeolocationProvider.js
411%{_libdir}/%{name}/components/PlacesCategoriesStarter.js
412%{_libdir}/%{name}/components/TelemetryPing.js
413%{_libdir}/%{name}/components/addonManager.js
414%{_libdir}/%{name}/components/amContentHandler.js
415%{_libdir}/%{name}/components/amWebInstallListener.js
416%{_libdir}/%{name}/components/contentAreaDropListener.js
417%{_libdir}/%{name}/components/contentSecurityPolicy.js
418%{_libdir}/%{name}/components/crypto-SDR.js
419%{_libdir}/%{name}/components/jsconsole-clhandler.js
420%{_libdir}/%{name}/components/nsBadCertHandler.js
421%{_libdir}/%{name}/components/nsBlocklistService.js
422%{_libdir}/%{name}/components/nsContentDispatchChooser.js
423%{_libdir}/%{name}/components/nsContentPrefService.js
424%{_libdir}/%{name}/components/nsDefaultCLH.js
425%{_libdir}/%{name}/components/nsDownloadManagerUI.js
426%{_libdir}/%{name}/components/nsFilePicker.js
427%{_libdir}/%{name}/components/nsFormAutoComplete.js
428%{_libdir}/%{name}/components/nsFormHistory.js
429%{_libdir}/%{name}/components/nsHandlerService.js
430%{_libdir}/%{name}/components/nsHelperAppDlg.js
431%{_libdir}/%{name}/components/nsINIProcessor.js
432%{_libdir}/%{name}/components/nsInputListAutoComplete.js
433%{_libdir}/%{name}/components/nsLivemarkService.js
434%{_libdir}/%{name}/components/nsLoginInfo.js
435%{_libdir}/%{name}/components/nsLoginManager.js
436%{_libdir}/%{name}/components/nsLoginManagerPrompter.js
437%{_libdir}/%{name}/components/nsPlacesAutoComplete.js
438%{_libdir}/%{name}/components/nsPlacesExpiration.js
439%{_libdir}/%{name}/components/nsPrompter.js
440%{_libdir}/%{name}/components/nsProxyAutoConfig.js
441%{_libdir}/%{name}/components/nsSearchService.js
442%{_libdir}/%{name}/components/nsSearchSuggestions.js
443%{_libdir}/%{name}/components/nsTaggingService.js
444%{_libdir}/%{name}/components/nsTryToClose.js
445%{_libdir}/%{name}/components/nsURLFormatter.js
446%{_libdir}/%{name}/components/nsUpdateTimerManager.js
447%{_libdir}/%{name}/components/nsUrlClassifierHashCompleter.js
448%{_libdir}/%{name}/components/nsUrlClassifierLib.js
449%{_libdir}/%{name}/components/nsUrlClassifierListManager.js
450%{_libdir}/%{name}/components/nsWebHandlerApp.js
451%{_libdir}/%{name}/components/storage-Legacy.js
452%{_libdir}/%{name}/components/storage-mozStorage.js
453%{_libdir}/%{name}/components/txEXSLTRegExFunctions.js
454%endif
455
456%attr(755,root,root) %{_libdir}/%{name}/components/libbrowsercomps.so
457%if %{without xulrunner}
458%attr(755,root,root) %{_libdir}/%{name}/components/libdbusservice.so
459%endif
460
461%if %{without xulrunner}
462%attr(755,root,root) %{_libdir}/%{name}/components/libmozgnome.so
463%endif
464
465%attr(755,root,root) %{_libdir}/%{name}/firefox
466%dir %{_libdir}/%{name}/plugins
467%if %{without xulrunner}
468%attr(755,root,root) %{_libdir}/%{name}/run-mozilla.sh
469%attr(755,root,root) %{_libdir}/%{name}/firefox-bin
470%attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client
471%attr(755,root,root) %{_libdir}/%{name}/plugin-container
472%endif
473
474%{_pixmapsdir}/mozilla-firefox.png
475%{_desktopdir}/mozilla-firefox.desktop
476
477# symlinks
478%{_libdir}/%{name}/chrome
479%{_libdir}/%{name}/defaults
480%{_libdir}/%{name}/extensions
481%{_libdir}/%{name}/icons
482%{_libdir}/%{name}/modules
483%{_libdir}/%{name}/searchplugins
484%if %{with xulrunner}
485%{_libdir}/%{name}/xulrunner
486%else
487%{_libdir}/%{name}/dictionaries
488%{_libdir}/%{name}/greprefs.js
489%{_libdir}/%{name}/res
490%endif
491
492%dir %{_datadir}/%{name}
493%{_datadir}/%{name}/chrome
494%{_datadir}/%{name}/defaults
495%{_datadir}/%{name}/icons
496%{_datadir}/%{name}/modules
497%{_datadir}/%{name}/searchplugins
498%if %{without xulrunner}
499%{_datadir}/%{name}/greprefs.js
500%{_datadir}/%{name}/res
501%endif
502
503%dir %{_datadir}/%{name}/extensions
504# -dom-inspector subpackage?
505#%{_datadir}/%{name}/extensions/inspector@mozilla.org
506# the signature of the default theme
507%{_datadir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
508
509# files created by firefox -register
510%ghost %{_libdir}/%{name}/components/compreg.dat
511%ghost %{_libdir}/%{name}/components/xpti.dat
This page took 0.028044 seconds and 4 git commands to generate.