]> git.pld-linux.org Git - packages/firefox.git/blame - mozilla-firefox.spec
- updated to 3.5rc3
[packages/firefox.git] / mozilla-firefox.spec
CommitLineData
e36ee87a 1#
2# TODO:
3# - handle locales differently (runtime, since it's possible to do)
4# - see ftp://ftp.debian.org/debian/pool/main/m/mozilla-firefox/*diff*
5# for hints how to make locales
6# - (12:22:58) patrys: can you also move _libdir/mozilla-firefox to just _libdir/firefox?
7# (12:23:25) patrys: it's not like we ship official firefox
8# - fix wrapper script to allow playing with profiles (must not use -remote)
9#
10# Conditional build:
11%bcond_with tests # enable tests (whatever they check)
12%bcond_without gnomeui # disable gnomeui support
13%bcond_without gnomevfs # disable GNOME comp. (gconf+libgnome+gnomevfs) and gnomevfs ext.
14%bcond_without gnome # disable all GNOME components (gnome+gnomeui+gnomevfs)
15%bcond_without kerberos # disable krb5 support
16%bcond_with xulrunner # build with system xulrunner
17
18%if %{without gnome}
19%undefine with_gnomeui
20%undefine with_gnomevfs
21%endif
22
85828e5a 23%define subver rc3
4b5cc297 24%define rel 0.1
e36ee87a 25Summary: Firefox Community Edition web browser
26Summary(pl.UTF-8): Firefox Community Edition - przeglądarka WWW
27Name: mozilla-firefox
4b5cc297
ER
28Version: 3.5
29Release: %{subver}.%{rel}
e36ee87a 30License: MPL 1.1 or GPL v2+ or LGPL v2.1+
31Group: X11/Applications/Networking
4b5cc297 32Source0: ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/%{version}%{subver}/source/firefox-%{version}%{subver}-source.tar.bz2
85828e5a 33# Source0-md5: f8a9146a0a3dcc18fb22b72f4e8a9e94
e36ee87a 34Source1: %{name}.desktop
35Source2: %{name}.sh
36Patch0: %{name}-install.patch
37Patch1: %{name}-gcc3.patch
38Patch2: %{name}-agent.patch
39Patch3: %{name}-agent-ac.patch
40Patch4: %{name}-ti-agent.patch
41Patch5: %{name}-branding.patch
42Patch6: %{name}-prefs.patch
43Patch7: %{name}-nss_cflags.patch
44URL: http://www.mozilla.org/projects/firefox/
45%{?with_gnomevfs:BuildRequires: GConf2-devel >= 1.2.1}
46BuildRequires: automake
47BuildRequires: cairo-devel >= 1.6.0
48BuildRequires: dbus-glib-devel >= 0.60
49BuildRequires: glib2-devel
50%{?with_gnomevfs:BuildRequires: gnome-vfs2-devel >= 2.0}
51BuildRequires: gtk+2-devel >= 2:2.10
238e3b56
SP
52BuildRequires: libiw-devel
53BuildRequires: xorg-util-makedepend
54BuildRequires: zlib-devel
e36ee87a 55%if "%{pld_release}" == "ac"
56%{?with_kerberos:BuildRequires: heimdal-devel >= 0.7.1}
57%else
58%{?with_kerberos:BuildRequires: krb5-devel}
59%endif
60BuildRequires: libIDL-devel >= 0.8.0
61%{?with_gnomevfs:BuildRequires: libgnome-devel >= 2.0}
62%{?with_gnomeui:BuildRequires: libgnomeui-devel >= 2.2.0}
63BuildRequires: libjpeg-devel >= 6b
64BuildRequires: libpng(APNG)-devel >= 0.10
65BuildRequires: libpng-devel >= 1.2.7
66BuildRequires: libstdc++-devel
d657bcb8 67BuildRequires: nspr-devel >= 4.8
e36ee87a 68BuildRequires: nss-devel >= 1:3.12-2
69BuildRequires: pango-devel >= 1:1.10.0
70BuildRequires: perl-modules >= 5.004
71BuildRequires: pkgconfig
72BuildRequires: python-modules
e36ee87a 73BuildRequires: rpm >= 4.4.9-56
74BuildRequires: rpmbuild(macros) >= 1.453
fa5a04b2 75BuildRequires: sqlite3-devel >= 3.5.9
e36ee87a 76BuildRequires: startup-notification-devel
77%if "%{pld_release}" == "ac"
78BuildRequires: XFree86-devel
79%else
80BuildRequires: xorg-lib-libXext-devel
81BuildRequires: xorg-lib-libXft-devel >= 2.1
82BuildRequires: xorg-lib-libXinerama-devel
83BuildRequires: xorg-lib-libXp-devel
84BuildRequires: xorg-lib-libXt-devel
85%endif
86%if %{with xulrunner}
87BuildRequires: xulrunner-devel >= 1.9-2
88%endif
89BuildRequires: zip
90BuildRequires: zlib-devel >= 1.2.3
91Requires(post): mktemp >= 1.5-18
92%if %{without xulrunner}
93Requires: browser-plugins >= 2.0
94%endif
95Requires: cairo >= 1.6.0
96Requires: gtk+2 >= 2:2.10
97Requires: libpng(APNG) >= 0.10
98Requires: nspr >= 1:4.7
99Requires: nss >= 1:3.12-2
100Requires: pango >= 1:1.10.0
101Requires: sqlite3 >= 3.5.9
102%if %{with xulrunner}
103%requires_eq_to xulrunner xulrunner-devel
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 libjemalloc.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
fa5a04b2 132%setup -qc
5d28b5e8
SP
133cd mozilla-1.9.1
134#%patch0 -p1
e36ee87a 135
136%if "%{cc_version}" < "3.4"
137%patch1 -p2
138%endif
139
140%if "%{pld_release}" == "th"
141%patch2 -p1
142%endif
143
144%if "%{pld_release}" == "ac"
145%patch3 -p1
146%endif
147
148%if "%{pld_release}" == "ti"
149%patch4 -p1
150%endif
151
72a6f1e1 152%patch5 -p1
fa5a04b2
SP
153%patch6 -p1
154%patch7 -p1
e36ee87a 155
156%build
5d28b5e8 157cd mozilla-1.9.1
e36ee87a 158cp -f %{_datadir}/automake/config.* build/autoconf
159cp -f %{_datadir}/automake/config.* nsprpub/build/autoconf
160
161cat << 'EOF' > .mozconfig
162. $topsrcdir/browser/config/mozconfig
163
164mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu}
165
166# Options for 'configure' (same as command-line options).
167ac_add_options --prefix=%{_prefix}
168ac_add_options --exec-prefix=%{_exec_prefix}
169ac_add_options --bindir=%{_bindir}
170ac_add_options --sbindir=%{_sbindir}
171ac_add_options --sysconfdir=%{_sysconfdir}
172ac_add_options --datadir=%{_datadir}
173ac_add_options --includedir=%{_includedir}
174ac_add_options --libdir=%{_libdir}
175ac_add_options --libexecdir=%{_libexecdir}
176ac_add_options --localstatedir=%{_localstatedir}
177ac_add_options --sharedstatedir=%{_sharedstatedir}
178ac_add_options --mandir=%{_mandir}
179ac_add_options --infodir=%{_infodir}
180%if %{?debug:1}0
181ac_add_options --disable-optimize
182ac_add_options --enable-debug
183ac_add_options --enable-debug-modules
184ac_add_options --enable-debugger-info-modules
185ac_add_options --enable-crash-on-assert
186%else
187ac_add_options --disable-debug
188ac_add_options --disable-debug-modules
189ac_add_options --disable-logging
190ac_add_options --enable-optimize="%{rpmcflags} -Os"
191%endif
192%if %{with tests}
193ac_add_options --enable-tests
194%else
195ac_add_options --disable-tests
196%endif
197%if %{with gnomeui}
198ac_add_options --enable-gnomeui
199%else
200ac_add_options --disable-gnomeui
201%endif
202%if %{with gnomevfs}
203ac_add_options --enable-gnomevfs
204%else
205ac_add_options --disable-gnomevfs
206%endif
207ac_add_options --disable-crashreporter
208ac_add_options --disable-installer
209ac_add_options --disable-javaxpcom
210ac_add_options --disable-updater
211ac_add_options --disable-strip
212ac_add_options --disable-xprint
213ac_add_options --enable-startup-notification
214ac_add_options --enable-svg
215ac_add_options --enable-system-cairo
216ac_add_options --enable-system-sqlite
217ac_add_options --enable-libxul
218ac_add_options --enable-xinerama
219ac_add_options --with-distribution-id=org.pld-linux
220%if %{with xulrunner}
221ac_add_options --with-libxul-sdk=%{_libdir}/xulrunner-sdk
222%endif
223ac_add_options --with-pthreads
224ac_add_options --with-system-jpeg
225ac_add_options --with-system-nspr
226ac_add_options --with-system-nss
227ac_add_options --with-system-png
228ac_add_options --with-system-zlib
229ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
230EOF
231
d657bcb8 232%{__make} -f client.mk build \
e36ee87a 233 STRIP="/bin/true" \
234 CC="%{__cc}" \
235 CXX="%{__cxx}"
236
237%install
238rm -rf $RPM_BUILD_ROOT
a8c31017 239cd mozilla-1.9.1
e36ee87a 240install -d \
241 $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}} \
242 $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}} \
243 $RPM_BUILD_ROOT%{_datadir}/%{name}
244
245%if %{without xulrunner}
246%browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins
247%endif
248
249%{__make} -C obj-%{_target_cpu}/browser/installer stage-package \
250 DESTDIR=$RPM_BUILD_ROOT \
251 MOZ_PKG_APPDIR=%{_libdir}/%{name} \
252 PKG_SKIP_STRIP=1
253
254# move arch independant ones to datadir
255mv $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome
256mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults
257mv $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions
258mv $RPM_BUILD_ROOT%{_libdir}/%{name}/icons $RPM_BUILD_ROOT%{_datadir}/%{name}/icons
259mv $RPM_BUILD_ROOT%{_libdir}/%{name}/modules $RPM_BUILD_ROOT%{_datadir}/%{name}/modules
260mv $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins $RPM_BUILD_ROOT%{_datadir}/%{name}/searchplugins
261%if %{without xulrunner}
262mv $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs $RPM_BUILD_ROOT%{_datadir}/%{name}/greprefs
263mv $RPM_BUILD_ROOT%{_libdir}/%{name}/res $RPM_BUILD_ROOT%{_datadir}/%{name}/res
264%endif
265ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome
266ln -s ../../share/%{name}/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults
267ln -s ../../share/%{name}/extensions $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions
268ln -s ../../share/%{name}/modules $RPM_BUILD_ROOT%{_libdir}/%{name}/modules
269ln -s ../../share/%{name}/icons $RPM_BUILD_ROOT%{_libdir}/%{name}/icons
270ln -s ../../share/%{name}/searchplugins $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins
271%if %{without xulrunner}
272ln -s ../../share/%{name}/greprefs $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs
273ln -s ../../share/%{name}/res $RPM_BUILD_ROOT%{_libdir}/%{name}/res
274%endif
275
276%if %{without xulrunner}
277rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
278ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
279%endif
280
281sed 's,@LIBDIR@,%{_libdir},' %{SOURCE2} > $RPM_BUILD_ROOT%{_bindir}/mozilla-firefox
282ln -s mozilla-firefox $RPM_BUILD_ROOT%{_bindir}/firefox
283
284install browser/base/branding/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/mozilla-firefox.png
285
286install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
287
288# files created by regxpcom and firefox -register
289touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat
290touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat
291
292# what's this? it's content is invalid anyway.
293rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/dependentlibs.list
294rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/old-homepage-default.properties
295
296cat << 'EOF' > $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate
297#!/bin/sh
298umask 022
299rm -f %{_libdir}/%{name}/components/{compreg,xpti}.dat
300
301# it attempts to touch files in $HOME/.mozilla
302# beware if you run this with sudo!!!
303export HOME=$(mktemp -d)
304# also TMPDIR could be pointing to sudo user's homedir
305unset TMPDIR TMP || :
306
307#LD_LIBRARY_PATH=%{_libdir}/%{name}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} %{_libdir}/%{name}/regxpcom
308%{_libdir}/%{name}/firefox -register
309
310rm -rf $HOME
311EOF
312
313%clean
314rm -rf $RPM_BUILD_ROOT
315
316%pretrans
317if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
318 mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
319fi
320for d in chrome defaults extensions greprefs icons res searchplugins; do
321 if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then
322 install -d %{_datadir}/%{name}
323 mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d
324 fi
325done
326exit 0
327
328%post
329%{_sbindir}/%{name}-chrome+xpcom-generate
330%if %{without xulrunner}
331%update_browser_plugins
332%endif
333
334%postun
335%if %{without xulrunner}
336if [ "$1" = 0 ]; then
337 %update_browser_plugins
338fi
339%endif
340
341%files
342%defattr(644,root,root,755)
343%attr(755,root,root) %{_bindir}/%{name}
344%attr(755,root,root) %{_bindir}/firefox
345%attr(755,root,root) %{_sbindir}/%{name}-chrome+xpcom-generate
346
347%if %{without xulrunner}
348# browser plugins v2
349%{_browserpluginsconfdir}/browsers.d/%{name}.*
350%config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
351%endif
352
353%dir %{_libdir}/%{name}
354%attr(755,root,root) %{_libdir}/%{name}/libjemalloc.so
355%if %{without xulrunner}
356%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so
357%attr(755,root,root) %{_libdir}/%{name}/libxpcom.so
358%attr(755,root,root) %{_libdir}/%{name}/libxul.so
359%endif
360%{_libdir}/%{name}/blocklist.xml
361
362%if %{with crashreporter}
363%{_libdir}/%{name}/crashreporter
364%{_libdir}/%{name}/crashreporter-override.ini
365%{_libdir}/%{name}/crashreporter.ini
366%{_libdir}/%{name}/Throbber-small.gif
367%endif
368
369# config?
370%{_libdir}/%{name}/.autoreg
371%{_libdir}/%{name}/application.ini
372
373%dir %{_libdir}/%{name}/components
374
375%{_libdir}/%{name}/components/aboutRights.js
376%{_libdir}/%{name}/components/aboutRobots.js
377%{_libdir}/%{name}/components/FeedConverter.js
378%{_libdir}/%{name}/components/FeedWriter.js
379%{_libdir}/%{name}/components/WebContentConverter.js
380%{_libdir}/%{name}/components/browser.xpt
381%{_libdir}/%{name}/components/fuelApplication.js
382%{_libdir}/%{name}/components/nsBrowserContentHandler.js
383%{_libdir}/%{name}/components/nsBrowserGlue.js
384%{_libdir}/%{name}/components/nsMicrosummaryService.js
385%{_libdir}/%{name}/components/nsPlacesTransactionsService.js
386%{_libdir}/%{name}/components/nsSafebrowsingApplication.js
387%{_libdir}/%{name}/components/nsSearchService.js
388%{_libdir}/%{name}/components/nsSearchSuggestions.js
389%{_libdir}/%{name}/components/nsSessionStartup.js
390%{_libdir}/%{name}/components/nsSessionStore.js
391%{_libdir}/%{name}/components/nsSetDefaultBrowser.js
392%{_libdir}/%{name}/components/nsSidebar.js
393%if %{without xulrunner}
394%{_libdir}/%{name}/platform.ini
395%{_libdir}/%{name}/components/FeedProcessor.js
396%{_libdir}/%{name}/components/jsconsole-clhandler.js
397%{_libdir}/%{name}/components/nsAddonRepository.js
398%{_libdir}/%{name}/components/nsBadCertHandler.js
399%{_libdir}/%{name}/components/nsBlocklistService.js
400%{_libdir}/%{name}/components/nsContentDispatchChooser.js
401%{_libdir}/%{name}/components/nsContentPrefService.js
402%{_libdir}/%{name}/components/nsDefaultCLH.js
403%{_libdir}/%{name}/components/nsDownloadManagerUI.js
404%{_libdir}/%{name}/components/nsExtensionManager.js
405%{_libdir}/%{name}/components/nsFilePicker.js
406%{_libdir}/%{name}/components/nsHandlerService.js
407%{_libdir}/%{name}/components/nsHelperAppDlg.js
408%{_libdir}/%{name}/components/nsLivemarkService.js
409%{_libdir}/%{name}/components/nsLoginInfo.js
410%{_libdir}/%{name}/components/nsLoginManager.js
411%{_libdir}/%{name}/components/nsLoginManagerPrompter.js
412%{_libdir}/%{name}/components/nsProxyAutoConfig.js
413%{_libdir}/%{name}/components/nsTaggingService.js
414%{_libdir}/%{name}/components/nsTryToClose.js
415%{_libdir}/%{name}/components/nsURLFormatter.js
416%{_libdir}/%{name}/components/nsUpdateService.js
417%{_libdir}/%{name}/components/nsUrlClassifierLib.js
418%{_libdir}/%{name}/components/nsUrlClassifierListManager.js
419%{_libdir}/%{name}/components/nsWebHandlerApp.js
420%{_libdir}/%{name}/components/pluginGlue.js
421%{_libdir}/%{name}/components/storage-Legacy.js
422%{_libdir}/%{name}/components/txEXSLTRegExFunctions.js
423%endif
424
425%attr(755,root,root) %{_libdir}/%{name}/components/libbrowsercomps.so
426%attr(755,root,root) %{_libdir}/%{name}/components/libbrowserdirprovider.so
427%if %{without xulrunner}
428%attr(755,root,root) %{_libdir}/%{name}/components/libdbusservice.so
429%attr(755,root,root) %{_libdir}/%{name}/components/libimgicon.so
430%endif
431
432%if %{with gnomevfs}
433%if %{without xulrunner}
434%attr(755,root,root) %{_libdir}/%{name}/components/libmozgnome.so
435%endif
436%attr(755,root,root) %{_libdir}/%{name}/components/libnkgnomevfs.so
437%endif
438
439%attr(755,root,root) %{_libdir}/%{name}/*.sh
440%attr(755,root,root) %{_libdir}/%{name}/firefox
441%if %{without xulrunner}
442%attr(755,root,root) %{_libdir}/%{name}/firefox-bin
443%dir %{_libdir}/%{name}/plugins
444%attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
445%attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client
446%endif
447%{_pixmapsdir}/mozilla-firefox.png
448%{_desktopdir}/mozilla-firefox.desktop
449
450# symlinks
451%{_libdir}/%{name}/chrome
452%{_libdir}/%{name}/defaults
453%{_libdir}/%{name}/extensions
454%{_libdir}/%{name}/icons
455%{_libdir}/%{name}/modules
456%{_libdir}/%{name}/searchplugins
457%if %{without xulrunner}
458%{_libdir}/%{name}/dictionaries
459%{_libdir}/%{name}/greprefs
460%{_libdir}/%{name}/res
461%endif
462
463# browserconfig
464%{_libdir}/%{name}/browserconfig.properties
465
466%{_libdir}/%{name}/README.txt
467
468%dir %{_datadir}/%{name}
469%{_datadir}/%{name}/chrome
470%{_datadir}/%{name}/defaults
471%{_datadir}/%{name}/icons
472%{_datadir}/%{name}/modules
473%{_datadir}/%{name}/searchplugins
474%if %{without xulrunner}
475%{_datadir}/%{name}/greprefs
476%{_datadir}/%{name}/res
477%endif
478
479%dir %{_datadir}/%{name}/extensions
480# -dom-inspector subpackage?
481#%{_datadir}/%{name}/extensions/inspector@mozilla.org
482# the signature of the default theme
483%{_datadir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
484
485# files created by regxpcom and firefox -register
486%ghost %{_libdir}/%{name}/components/compreg.dat
487%ghost %{_libdir}/%{name}/components/xpti.dat
This page took 0.25582 seconds and 4 git commands to generate.