2 # - handle locales differently (runtime, since it's possible to do)
3 # - see ftp://ftp.debian.org/debian/pool/main/m/mozilla-firefox/*diff*
4 # for hints how to make locales
5 # - make it more pld-like (bookmarks, default page etc..)
8 %bcond_with tests # enable tests (whatever they check)
9 %bcond_without gnome # disable all GNOME components (gnomevfs, gnome, gnomeui)
10 %bcond_with tidy # enable htmlvalidator extension (tidy)
12 %define _tidy_ver 0.839
13 %define _firefox_ver 2.0.0.4
15 Summary: Firefox Community Edition web browser
16 Summary(pl.UTF-8): Firefox Community Edition - przeglądarka WWW
21 Group: X11/Applications/Networking
22 Source0: ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/%{version}/source/firefox-%{version}-source.tar.bz2
23 # Source0-md5: 99c14794976b2532addfcd2d836c6bb2
24 Source1: http://users.skynet.be/mgueury/mozilla/tidy_08x_source.zip
25 # Source1-md5: ad63736e9d57de3e6c69696319b34b3b
26 Source2: %{name}.desktop
28 Patch0: mozilla-install.patch
29 Patch1: %{name}-lib_path.patch
30 Patch2: %{name}-addon-tidy.patch
31 Patch3: %{name}-nopangoxft.patch
32 Patch5: %{name}-fonts.patch
33 Patch69: %{name}-agent.patch
34 Patch7: %{name}-myspell.patch
35 # if ac rebuild is needed...
36 #PatchX: %{name}-ac.patch
37 URL: http://www.mozilla.org/projects/firefox/
38 %{?with_gnome:BuildRequires: GConf2-devel >= 1.2.1}
39 BuildRequires: automake
40 BuildRequires: cairo-devel >= 1.0.0
41 %{?with_gnome:BuildRequires: gnome-vfs2-devel >= 2.0}
42 BuildRequires: gtk+2-devel >= 1:2.0.0
43 BuildRequires: krb5-devel
44 BuildRequires: libIDL-devel >= 0.8.0
45 %{?with_gnome:BuildRequires: libgnome-devel >= 2.0}
46 %{?with_gnome:BuildRequires: libgnomeui-devel >= 2.2.0}
47 BuildRequires: libjpeg-devel >= 6b
48 BuildRequires: libpng-devel >= 1.2.7
49 BuildRequires: libstdc++-devel
50 BuildRequires: myspell-devel
51 BuildRequires: nspr-devel >= 1:4.6.3
52 BuildRequires: nss-devel >= 1:3.11.3-3
53 %{?with_tidy:BuildRequires: opensp-devel}
54 BuildRequires: pango-devel >= 1:1.6.0
55 BuildRequires: perl-modules >= 5.004
56 BuildRequires: pkgconfig
57 BuildRequires: rpmbuild(macros) >= 1.356
58 BuildRequires: xorg-lib-libXext-devel
59 BuildRequires: xorg-lib-libXft-devel >= 2.1
60 BuildRequires: xorg-lib-libXinerama-devel
61 BuildRequires: xorg-lib-libXp-devel
62 BuildRequires: xorg-lib-libXt-devel
64 BuildRequires: zlib-devel >= 1.2.3
65 Requires(post): mktemp >= 1.5-18
66 Requires: %{name}-lang-resources = %{version}
67 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
68 Requires: browser-plugins >= 2.0
69 Requires: nspr >= 1:4.6.3
70 Requires: nss >= 1:3.11.3
72 Obsoletes: mozilla-firebird
73 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
75 # firefox/thunderbird/seamonkey provide their own versions
76 %define _noautoreqdep libgkgfx.so libgtkxtbin.so libjsj.so libxpcom_compat.so libxpcom_core.so
77 %define _noautoprovfiles %{_libdir}/%{name}/components
78 # we don't want these to satisfy xulrunner-devel
79 %define _noautoprov libgtkembedmoz.so libmozjs.so libxpcom.so libxul.so
80 # and as we don't provide them, don't require either
81 %define _noautoreq libgtkembedmoz.so libmozjs.so libxpcom.so libxul.so
83 %define specflags -fno-strict-aliasing -fno-tree-vrp -fno-stack-protector
86 Firefox Community Edition is an open-source web browser, designed for
87 standards compliance, performance and portability.
89 %description -l pl.UTF-8
90 Firefox Community Edition jest przeglądarką WWW rozpowszechnianą
91 zgodnie z ideami ruchu otwartego oprogramowania oraz tworzoną z myślą
92 o zgodności ze standardami, wydajnością i przenośnością.
95 Summary: Firefox Community Edition shared libraries
96 Summary(pl.UTF-8): Biblioteki współdzielone przeglądarki Firefox Community Edition
98 Conflicts: mozilla-firefox < 2.0-1.4
101 Firefox Community Edition shared libraries.
103 %description libs -l pl.UTF-8
104 Biblioteki współdzielone przeglądarki Firefox Community Edition.
107 Summary: English resources for Firefox Community Edition
108 Summary(pl.UTF-8): Anglojęzyczne zasoby dla przeglądarki Firefox Community Edition
109 Group: X11/Applications/Networking
110 Requires: %{name} = %{version}-%{release}
111 Provides: %{name}-lang-resources = %{version}-%{release}
114 English resources for Firefox Community Edition.
116 %description lang-en -l pl.UTF-8
117 Anglojęzyczne zasoby dla przeglądarki Firefox Community Edition.
120 %setup -qc %{?with_tidy:-a1}
122 mv mozilla_tidy_source/mozilla/extensions/tidy mozilla/extensions/tidy
123 mv mozilla_tidy_source/tidy_extension .
124 rm -rf mozilla/extensions/tidy/opensp
129 %{?with_tidy:%patch2 -p1}
136 #rm -rf mozilla/nsprpub mozilla/security/nss
140 export CFLAGS="%{rpmcflags} $(%{_bindir}/pkg-config mozilla-nspr --cflags-only-I)"
141 export CXXFLAGS="%{rpmcflags} $(%{_bindir}/pkg-config mozilla-nspr --cflags-only-I)"
143 cp -f %{_datadir}/automake/config.* build/autoconf
144 cp -f %{_datadir}/automake/config.* nsprpub/build/autoconf
145 cp -f %{_datadir}/automake/config.* directory/c-sdk/config/autoconf
147 cat << 'EOF' > .mozconfig
148 . $topsrcdir/browser/config/mozconfig
150 # Options for 'configure' (same as command-line options).
151 ac_add_options --prefix=%{_prefix}
152 ac_add_options --exec-prefix=%{_exec_prefix}
153 ac_add_options --bindir=%{_bindir}
154 ac_add_options --sbindir=%{_sbindir}
155 ac_add_options --sysconfdir=%{_sysconfdir}
156 ac_add_options --datadir=%{_datadir}
157 ac_add_options --includedir=%{_includedir}
158 ac_add_options --libdir=%{_libdir}
159 ac_add_options --libexecdir=%{_libexecdir}
160 ac_add_options --localstatedir=%{_localstatedir}
161 ac_add_options --sharedstatedir=%{_sharedstatedir}
162 ac_add_options --mandir=%{_mandir}
163 ac_add_options --infodir=%{_infodir}
165 ac_add_options --disable-optimize
166 ac_add_options --enable-debug
167 ac_add_options --enable-debug-modules
168 ac_add_options --enable-debugger-info-modules
169 ac_add_options --enable-crash-on-assert
171 ac_add_options --disable-debug
172 ac_add_options --disable-logging
173 ac_add_options --enable-optimize="%{rpmcflags}"
176 ac_add_options --enable-tests
178 ac_add_options --disable-tests
181 ac_add_options --enable-gnomevfs
182 ac_add_options --enable-gnomeui
184 ac_add_options --disable-gnomevfs
185 ac_add_options --disable-gnomeui
187 ac_add_options --disable-freetype2
188 ac_add_options --disable-installer
189 ac_add_options --disable-javaxpcom
190 ac_add_options --disable-updater
191 ac_add_options --enable-default-toolkit=gtk2
192 ac_add_options --enable-svg
193 ac_add_options --enable-system-cairo
194 ac_add_options --enable-system-myspell
195 ac_add_options --enable-xft
196 ac_add_options --with-distribution-id=org.pld-linux
197 ac_add_options --with-system-nspr
198 ac_add_options --with-system-nss
199 ac_add_options --with-system-zlib
200 ac_add_options --with-system-jpeg
201 ac_add_options --with-system-png
202 ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
203 ac_cv_visibility_pragma=no
206 %{__make} -j1 -f client.mk build \
211 rm -rf $RPM_BUILD_ROOT
214 $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}} \
215 $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}} \
216 $RPM_BUILD_ROOT%{_datadir}/%{name}
218 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins
220 %{__make} -C xpinstall/packager stage-package \
221 DESTDIR=$RPM_BUILD_ROOT \
222 MOZ_PKG_APPDIR=%{_libdir}/%{name} \
225 # move arch independant ones to datadir
226 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome
227 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults
228 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions
229 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs $RPM_BUILD_ROOT%{_datadir}/%{name}/greprefs
230 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/icons $RPM_BUILD_ROOT%{_datadir}/%{name}/icons
231 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/init.d $RPM_BUILD_ROOT%{_datadir}/%{name}/init.d
232 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/res $RPM_BUILD_ROOT%{_datadir}/%{name}/res
233 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins $RPM_BUILD_ROOT%{_datadir}/%{name}/searchplugins
234 ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome
235 ln -s ../../share/%{name}/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults
236 ln -s ../../share/%{name}/extensions $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions
237 ln -s ../../share/%{name}/greprefs $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs
238 ln -s ../../share/%{name}/icons $RPM_BUILD_ROOT%{_libdir}/%{name}/icons
239 ln -s ../../share/%{name}/init.d $RPM_BUILD_ROOT%{_libdir}/%{name}/init.d
240 ln -s ../../share/%{name}/res $RPM_BUILD_ROOT%{_libdir}/%{name}/res
241 ln -s ../../share/%{name}/searchplugins $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins
243 rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
244 ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
246 sed 's,@LIBDIR@,%{_libdir},' %{SOURCE3} > $RPM_BUILD_ROOT%{_bindir}/mozilla-firefox
247 ln -s mozilla-firefox $RPM_BUILD_ROOT%{_bindir}/firefox
249 install browser/base/branding/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/mozilla-firefox.png
251 install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
253 # header/development files
254 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/xpidl
255 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/xpt_dump
256 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/xpt_link
258 # files created by regxpcom and firefox -register
259 touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat
260 touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat
262 # what's this? it's content is invalid anyway.
263 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/dependentlibs.list
265 cat << 'EOF' > $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate
268 rm -f %{_libdir}/%{name}/components/{compreg,xpti}.dat
270 # it attempts to touch files in $HOME/.mozilla
271 # beware if you run this with sudo!!!
272 export HOME=$(mktemp -d)
273 # also TMPDIR could be pointing to sudo user's homedir
274 unset TMPDIR TMP || :
276 LD_LIBRARY_PATH=%{_libdir}/%{name}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} %{_libdir}/%{name}/regxpcom
277 %{_libdir}/%{name}/firefox -register
283 rm -rf $RPM_BUILD_ROOT
286 if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
287 mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
289 for d in chrome defaults extensions greprefs icons init.d res searchplugins; do
290 if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then
291 install -d %{_datadir}/%{name}
292 mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d
298 %{_sbindir}/%{name}-chrome+xpcom-generate
299 %update_browser_plugins
302 if [ "$1" = 0 ]; then
303 %update_browser_plugins
307 %defattr(644,root,root,755)
308 %attr(755,root,root) %{_bindir}/%{name}
309 %attr(755,root,root) %{_bindir}/firefox
310 %attr(755,root,root) %{_sbindir}/%{name}-chrome+xpcom-generate
313 %{_browserpluginsconfdir}/browsers.d/%{name}.*
314 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
316 %dir %{_libdir}/%{name}/components
317 %attr(755,root,root) %{_libdir}/%{name}/components/*.so
318 %{_libdir}/%{name}/components/*.js
319 %{_libdir}/%{name}/components/*.xpt
320 %dir %{_libdir}/%{name}/plugins
321 %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
322 %attr(755,root,root) %{_libdir}/%{name}/*.sh
323 %attr(755,root,root) %{_libdir}/%{name}/m*
324 %attr(755,root,root) %{_libdir}/%{name}/f*
325 %attr(755,root,root) %{_libdir}/%{name}/regxpcom
326 %attr(755,root,root) %{_libdir}/%{name}/xpcshell
327 %attr(755,root,root) %{_libdir}/%{name}/xpicleanup
328 %{_pixmapsdir}/mozilla-firefox.png
329 %{_desktopdir}/mozilla-firefox.desktop
332 %{_libdir}/%{name}/chrome
333 %{_libdir}/%{name}/defaults
334 %{_libdir}/%{name}/dictionaries
335 %{_libdir}/%{name}/extensions
336 %{_libdir}/%{name}/greprefs
337 %{_libdir}/%{name}/icons
338 %{_libdir}/%{name}/init.d
339 %{_libdir}/%{name}/res
340 %{_libdir}/%{name}/searchplugins
343 %{_libdir}/%{name}/browserconfig.properties
345 %{_libdir}/%{name}/LICENSE
346 %{_libdir}/%{name}/README.txt
348 %dir %{_datadir}/%{name}
349 %{_datadir}/%{name}/chrome
350 %{_datadir}/%{name}/defaults
351 %{_datadir}/%{name}/greprefs
352 %{_datadir}/%{name}/icons
353 %{_datadir}/%{name}/init.d
354 %{_datadir}/%{name}/res
355 %{_datadir}/%{name}/searchplugins
357 %dir %{_datadir}/%{name}/extensions
358 # -dom-inspector subpackage?
359 %{_datadir}/%{name}/extensions/inspector@mozilla.org
360 # the signature of the default theme
361 %{_datadir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
363 # files created by regxpcom and firefox -register
364 %ghost %{_libdir}/%{name}/components/compreg.dat
365 %ghost %{_libdir}/%{name}/components/xpti.dat
368 %defattr(644,root,root,755)
369 %dir %{_libdir}/%{name}
370 %attr(755,root,root) %{_libdir}/%{name}/*.so
373 %defattr(644,root,root,755)
374 %{_datadir}/%{name}/chrome/en-US.jar
375 %{_datadir}/%{name}/chrome/en-US.manifest