]> git.pld-linux.org Git - packages/firefox.git/blob - mozilla-firefox.spec
- updated nss R/BR to proper version release so firefox will use system nss
[packages/firefox.git] / mozilla-firefox.spec
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 # - make it more pld-like (bookmarks, default page etc..)
7 # - disable some options by default (fraud detection, application update etc.)
8 # - xulrunner
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
17 %if %{without gnome}
18 %undefine       with_gnomeui
19 %undefine       with_gnomevfs
20 %endif
21
22 Summary:        Firefox Community Edition web browser
23 Summary(pl.UTF-8):      Firefox Community Edition - przeglądarka WWW
24 Name:           mozilla-firefox
25 Version:        3.0
26 Release:        2.1
27 License:        MPL 1.1 or GPL v2+ or LGPL v2.1+
28 Group:          X11/Applications/Networking
29 Source0:        ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/%{version}/source/firefox-%{version}-source.tar.bz2
30 # Source0-md5:  4210ae0801df2eb498408533010d97c1
31 Source1:        %{name}.desktop
32 Source2:        %{name}.sh
33 Patch0:         %{name}-install.patch
34 Patch1:         %{name}-gcc3.patch
35 Patch2:         %{name}-agent.patch
36 Patch3:         %{name}-agent-ac.patch
37 Patch4:         %{name}-ti-agent.patch
38 URL:            http://www.mozilla.org/projects/firefox/
39 %{?with_gnomevfs:BuildRequires: GConf2-devel >= 1.2.1}
40 BuildRequires:  automake
41 BuildRequires:  cairo-devel >= 1.6.0
42 BuildRequires:  glib2-devel
43 %{?with_gnomevfs:BuildRequires: gnome-vfs2-devel >= 2.0}
44 BuildRequires:  gtk+2-devel >= 2:2.10
45 %if "%{pld_release}" == "ac"
46 %{?with_kerberos:BuildRequires: heimdal-devel >= 0.7.1}
47 %else
48 %{?with_kerberos:BuildRequires: krb5-devel}
49 %endif
50 BuildRequires:  libIDL-devel >= 0.8.0
51 %{?with_gnomevfs:BuildRequires: libgnome-devel >= 2.0}
52 %{?with_gnomeui:BuildRequires:  libgnomeui-devel >= 2.2.0}
53 BuildRequires:  libjpeg-devel >= 6b
54 BuildRequires:  libpng(APNG)-devel >= 0.10
55 BuildRequires:  libpng-devel >= 1.2.7
56 BuildRequires:  libstdc++-devel
57 BuildRequires:  myspell-devel
58 BuildRequires:  nspr-devel >= 1:4.7
59 BuildRequires:  nss-devel >= 1:3.12-2
60 BuildRequires:  pango-devel >= 1:1.6.0
61 BuildRequires:  perl-modules >= 5.004
62 BuildRequires:  pkgconfig
63 BuildRequires:  sqlite3-devel
64 BuildRequires:  rpm >= 4.4.9-56
65 BuildRequires:  rpmbuild(macros) >= 1.453
66 BuildRequires:  startup-notification-devel
67 BuildRequires:  xorg-lib-libXext-devel
68 BuildRequires:  xorg-lib-libXft-devel >= 2.1
69 BuildRequires:  xorg-lib-libXinerama-devel
70 BuildRequires:  xorg-lib-libXp-devel
71 BuildRequires:  xorg-lib-libXt-devel
72 BuildRequires:  zip
73 BuildRequires:  zlib-devel >= 1.2.3
74 Requires(post): mktemp >= 1.5-18
75 Requires:       browser-plugins >= 2.0
76 Requires:       cairo >= 1.6.0
77 Requires:       libpng(APNG) >= 0.10
78 Requires:       nspr >= 1:4.7
79 Requires:       nss >= 1:3.12-2
80 Provides:       wwwbrowser
81 Obsoletes:      mozilla-firebird
82 Obsoletes:      mozilla-firefox-lang-en < 2.0.0.8-3
83 Obsoletes:      mozilla-firefox-libs
84 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
85
86 # firefox/thunderbird/seamonkey provide their own versions
87 %define         _noautoreqdep           libgkgfx.so libgtkxtbin.so libjsj.so libxpcom_compat.so libxpcom_core.so
88 %define         _noautoprovfiles        %{_libdir}/%{name}/components
89 # we don't want these to satisfy xulrunner-devel
90 %define         _noautoprov             libgtkembedmoz.so libmozjs.so libxpcom.so libxul.so
91 # and as we don't provide them, don't require either
92 %define         _noautoreq              libgtkembedmoz.so libmozjs.so libxpcom.so libxul.so
93
94 %if "%{cc_version}" >= "3.4"
95 %define         specflags       -fno-strict-aliasing -fno-tree-vrp -fno-stack-protector
96 %else
97 %define         specflags       -fno-strict-aliasing
98 %endif
99
100 %description
101 Firefox Community Edition is an open-source web browser, designed for
102 standards compliance, performance and portability.
103
104 %description -l pl.UTF-8
105 Firefox Community Edition jest przeglądarką WWW rozpowszechnianą
106 zgodnie z ideami ruchu otwartego oprogramowania oraz tworzoną z myślą
107 o zgodności ze standardami, wydajnością i przenośnością.
108
109 %prep
110 %setup -qc -n %{name}-%{version}
111 cd mozilla
112 %patch0 -p1
113
114 %if "%{cc_version}" < "3.4"
115 %patch1 -p2
116 %endif
117
118 %if "%{pld_release}" == "th"
119 %patch2 -p1
120 %endif
121
122 %if "%{pld_release}" == "ac"
123 %patch3 -p1
124 %endif
125
126 %if "%{pld_release}" == "ti"
127 %patch4 -p1
128 %endif
129
130 %build
131 cd mozilla
132 cp -f %{_datadir}/automake/config.* build/autoconf
133 cp -f %{_datadir}/automake/config.* nsprpub/build/autoconf
134
135 cat << 'EOF' > .mozconfig
136 . $topsrcdir/browser/config/mozconfig
137
138 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu}
139
140 # Options for 'configure' (same as command-line options).
141 ac_add_options --prefix=%{_prefix}
142 ac_add_options --exec-prefix=%{_exec_prefix}
143 ac_add_options --bindir=%{_bindir}
144 ac_add_options --sbindir=%{_sbindir}
145 ac_add_options --sysconfdir=%{_sysconfdir}
146 ac_add_options --datadir=%{_datadir}
147 ac_add_options --includedir=%{_includedir}
148 ac_add_options --libdir=%{_libdir}
149 ac_add_options --libexecdir=%{_libexecdir}
150 ac_add_options --localstatedir=%{_localstatedir}
151 ac_add_options --sharedstatedir=%{_sharedstatedir}
152 ac_add_options --mandir=%{_mandir}
153 ac_add_options --infodir=%{_infodir}
154 %if %{?debug:1}0
155 ac_add_options --disable-optimize
156 ac_add_options --enable-debug
157 ac_add_options --enable-debug-modules
158 ac_add_options --enable-debugger-info-modules
159 ac_add_options --enable-crash-on-assert
160 %else
161 ac_add_options --disable-debug
162 ac_add_options --disable-debug-modules
163 ac_add_options --disable-logging
164 ac_add_options --enable-optimize="%{rpmcflags} -Os"
165 %endif
166 %if %{with tests}
167 ac_add_options --enable-tests
168 %else
169 ac_add_options --disable-tests
170 %endif
171 %if %{with gnomeui}
172 ac_add_options --enable-gnomeui
173 %else
174 ac_add_options --disable-gnomeui
175 %endif
176 %if %{with gnomevfs}
177 ac_add_options --enable-gnomevfs
178 %else
179 ac_add_options --disable-gnomevfs
180 %endif
181 ac_add_options --disable-crashreporter
182 ac_add_options --disable-installer
183 ac_add_options --disable-javaxpcom
184 ac_add_options --disable-updater
185 ac_add_options --disable-strip
186 ac_add_options --disable-xprint
187 ac_add_options --enable-startup-notification
188 ac_add_options --enable-svg
189 ac_add_options --enable-system-cairo
190 ac_add_options --enable-system-myspell
191 ac_add_options --enable-system-sqlite
192 ac_add_options --enable-libxul
193 ac_add_options --enable-xinerama
194 ac_add_options --with-distribution-id=org.pld-linux
195 ac_add_options --with-pthreads
196 ac_add_options --with-system-jpeg
197 ac_add_options --with-system-nspr
198 ac_add_options --with-system-nss
199 ac_add_options --with-system-png
200 ac_add_options --with-system-zlib
201 ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
202 EOF
203
204 %{__make} -j1 -f client.mk build \
205         STRIP="/bin/true" \
206         CC="%{__cc}" \
207         CXX="%{__cxx}"
208
209 %install
210 rm -rf $RPM_BUILD_ROOT
211 cd mozilla
212 install -d \
213         $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}} \
214         $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}} \
215         $RPM_BUILD_ROOT%{_datadir}/%{name}
216
217 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins
218
219 %{__make} -C obj-%{_target_cpu}/browser/installer stage-package \
220         DESTDIR=$RPM_BUILD_ROOT \
221         MOZ_PKG_APPDIR=%{_libdir}/%{name} \
222         PKG_SKIP_STRIP=1
223
224 # move arch independant ones to datadir
225 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome
226 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults
227 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions
228 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs $RPM_BUILD_ROOT%{_datadir}/%{name}/greprefs
229 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/icons $RPM_BUILD_ROOT%{_datadir}/%{name}/icons
230 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/modules $RPM_BUILD_ROOT%{_datadir}/%{name}/modules
231 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/res $RPM_BUILD_ROOT%{_datadir}/%{name}/res
232 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins $RPM_BUILD_ROOT%{_datadir}/%{name}/searchplugins
233 ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome
234 ln -s ../../share/%{name}/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults
235 ln -s ../../share/%{name}/extensions $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions
236 ln -s ../../share/%{name}/greprefs $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs
237 ln -s ../../share/%{name}/modules $RPM_BUILD_ROOT%{_libdir}/%{name}/modules
238 ln -s ../../share/%{name}/icons $RPM_BUILD_ROOT%{_libdir}/%{name}/icons
239 ln -s ../../share/%{name}/res $RPM_BUILD_ROOT%{_libdir}/%{name}/res
240 ln -s ../../share/%{name}/searchplugins $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins
241
242 rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
243 ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
244
245 sed 's,@LIBDIR@,%{_libdir},' %{SOURCE2} > $RPM_BUILD_ROOT%{_bindir}/mozilla-firefox
246 ln -s mozilla-firefox $RPM_BUILD_ROOT%{_bindir}/firefox
247
248 install browser/base/branding/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/mozilla-firefox.png
249
250 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
251
252 # files created by regxpcom and firefox -register
253 touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat
254 touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat
255
256 # what's this? it's content is invalid anyway.
257 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/dependentlibs.list
258 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/old-homepage-default.properties
259
260 cat << 'EOF' > $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate
261 #!/bin/sh
262 umask 022
263 rm -f %{_libdir}/%{name}/components/{compreg,xpti}.dat
264
265 # it attempts to touch files in $HOME/.mozilla
266 # beware if you run this with sudo!!!
267 export HOME=$(mktemp -d)
268 # also TMPDIR could be pointing to sudo user's homedir
269 unset TMPDIR TMP || :
270
271 #LD_LIBRARY_PATH=%{_libdir}/%{name}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} %{_libdir}/%{name}/regxpcom
272 %{_libdir}/%{name}/firefox -register
273
274 rm -rf $HOME
275 EOF
276
277 %clean
278 rm -rf $RPM_BUILD_ROOT
279
280 %pretrans
281 if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
282         mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
283 fi
284 for d in chrome defaults extensions greprefs icons res searchplugins; do
285         if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then
286                 install -d %{_datadir}/%{name}
287                 mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d
288         fi
289 done
290 exit 0
291
292 %post
293 %{_sbindir}/%{name}-chrome+xpcom-generate
294 %update_browser_plugins
295
296 %postun
297 if [ "$1" = 0 ]; then
298         %update_browser_plugins
299 fi
300
301 %files
302 %defattr(644,root,root,755)
303 %attr(755,root,root) %{_bindir}/%{name}
304 %attr(755,root,root) %{_bindir}/firefox
305 %attr(755,root,root) %{_sbindir}/%{name}-chrome+xpcom-generate
306
307 # browser plugins v2
308 %{_browserpluginsconfdir}/browsers.d/%{name}.*
309 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
310
311 %dir %{_libdir}/%{name}
312 %attr(755,root,root) %{_libdir}/%{name}/*.so
313 %{_libdir}/%{name}/blocklist.xml
314
315 %if %{with crashreporter}
316 %{_libdir}/%{name}/crashreporter
317 %{_libdir}/%{name}/crashreporter-override.ini
318 %{_libdir}/%{name}/crashreporter.ini
319 %{_libdir}/%{name}/Throbber-small.gif
320 %endif
321
322 # config?
323 %{_libdir}/%{name}/.autoreg
324 %{_libdir}/%{name}/application.ini
325 %{_libdir}/%{name}/platform.ini
326
327 %dir %{_libdir}/%{name}/components
328
329 %{_libdir}/%{name}/components/aboutRobots.js
330 %{_libdir}/%{name}/components/FeedConverter.js
331 %{_libdir}/%{name}/components/FeedProcessor.js
332 %{_libdir}/%{name}/components/FeedWriter.js
333 %{_libdir}/%{name}/components/WebContentConverter.js
334 %{_libdir}/%{name}/components/browser.xpt
335 %{_libdir}/%{name}/components/fuelApplication.js
336 %{_libdir}/%{name}/components/jsconsole-clhandler.js
337 %{_libdir}/%{name}/components/nsAddonRepository.js
338 %{_libdir}/%{name}/components/nsBlocklistService.js
339 %{_libdir}/%{name}/components/nsBrowserGlue.js
340 %{_libdir}/%{name}/components/nsContentDispatchChooser.js
341 %{_libdir}/%{name}/components/nsContentPrefService.js
342 %{_libdir}/%{name}/components/nsDefaultCLH.js
343 %{_libdir}/%{name}/components/nsDownloadManagerUI.js
344 %{_libdir}/%{name}/components/nsExtensionManager.js
345 %{_libdir}/%{name}/components/nsFilePicker.js
346 %{_libdir}/%{name}/components/nsHandlerService.js
347 %{_libdir}/%{name}/components/nsHelperAppDlg.js
348 %{_libdir}/%{name}/components/nsLivemarkService.js
349 %{_libdir}/%{name}/components/nsLoginInfo.js
350 %{_libdir}/%{name}/components/nsLoginManager.js
351 %{_libdir}/%{name}/components/nsLoginManagerPrompter.js
352 %{_libdir}/%{name}/components/nsMicrosummaryService.js
353 %{_libdir}/%{name}/components/nsPlacesTransactionsService.js
354 %{_libdir}/%{name}/components/nsProxyAutoConfig.js
355 %{_libdir}/%{name}/components/nsSafebrowsingApplication.js
356 %{_libdir}/%{name}/components/nsSearchService.js
357 %{_libdir}/%{name}/components/nsSearchSuggestions.js
358 %{_libdir}/%{name}/components/nsSessionStartup.js
359 %{_libdir}/%{name}/components/nsSessionStore.js
360 %{_libdir}/%{name}/components/nsSetDefaultBrowser.js
361 %{_libdir}/%{name}/components/nsSidebar.js
362 %{_libdir}/%{name}/components/nsTaggingService.js
363 %{_libdir}/%{name}/components/nsTryToClose.js
364 %{_libdir}/%{name}/components/nsURLFormatter.js
365 %{_libdir}/%{name}/components/nsUpdateService.js
366 %{_libdir}/%{name}/components/nsUrlClassifierLib.js
367 %{_libdir}/%{name}/components/nsUrlClassifierListManager.js
368 %{_libdir}/%{name}/components/nsWebHandlerApp.js
369 %{_libdir}/%{name}/components/pluginGlue.js
370 %{_libdir}/%{name}/components/storage-Legacy.js
371 %{_libdir}/%{name}/components/txEXSLTRegExFunctions.js
372 %{_libdir}/%{name}/components/nsBrowserContentHandler.js
373
374 %attr(755,root,root) %{_libdir}/%{name}/components/libbrowsercomps.so
375 %attr(755,root,root) %{_libdir}/%{name}/components/libbrowserdirprovider.so
376 %attr(755,root,root) %{_libdir}/%{name}/components/libdbusservice.so
377 %attr(755,root,root) %{_libdir}/%{name}/components/libimgicon.so
378
379 %if %{with gnomevfs}
380 %attr(755,root,root) %{_libdir}/%{name}/components/libmozgnome.so
381 %attr(755,root,root) %{_libdir}/%{name}/components/libnkgnomevfs.so
382 %endif
383
384 %dir %{_libdir}/%{name}/plugins
385 %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
386 %attr(755,root,root) %{_libdir}/%{name}/*.sh
387 %attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client
388 %attr(755,root,root) %{_libdir}/%{name}/firefox
389 %attr(755,root,root) %{_libdir}/%{name}/firefox-bin
390 %{_pixmapsdir}/mozilla-firefox.png
391 %{_desktopdir}/mozilla-firefox.desktop
392
393 # symlinks
394 %{_libdir}/%{name}/chrome
395 %{_libdir}/%{name}/defaults
396 %{_libdir}/%{name}/dictionaries
397 %{_libdir}/%{name}/extensions
398 %{_libdir}/%{name}/greprefs
399 %{_libdir}/%{name}/icons
400 %{_libdir}/%{name}/modules
401 %{_libdir}/%{name}/res
402 %{_libdir}/%{name}/searchplugins
403
404 # browserconfig
405 %{_libdir}/%{name}/browserconfig.properties
406
407 %{_libdir}/%{name}/README.txt
408
409 %dir %{_datadir}/%{name}
410 %{_datadir}/%{name}/chrome
411 %{_datadir}/%{name}/defaults
412 %{_datadir}/%{name}/greprefs
413 %{_datadir}/%{name}/icons
414 %{_datadir}/%{name}/modules
415 %{_datadir}/%{name}/res
416 %{_datadir}/%{name}/searchplugins
417
418 %dir %{_datadir}/%{name}/extensions
419 # -dom-inspector subpackage?
420 #%{_datadir}/%{name}/extensions/inspector@mozilla.org
421 # the signature of the default theme
422 %{_datadir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
423
424 # files created by regxpcom and firefox -register
425 %ghost %{_libdir}/%{name}/components/compreg.dat
426 %ghost %{_libdir}/%{name}/components/xpti.dat
This page took 0.109685 seconds and 4 git commands to generate.