/[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 170221 - (show annotations) (download)
Mon Nov 21 02:04:56 2011 UTC (12 years, 5 months ago) by doktor5000
File size: 14049 byte(s)
- really prevent firefox 8 default preference (extensions.autoDisableScopes)
  from automatically disabling systemwide installed addons
- hide addons selection dialog permanently
- added comments about purpose of the .js preferences files we use
- drop enable-addons.patch, function replaced by mga.js file
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 8.0.1
14 %define ff_epoch 0
15 # (tpg) set version HERE !!!
16 %define realver %{major}
17 %define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
18
19 # (tpg) MOZILLA_FIVE_HOME
20 %define mozillalibdir %{_libdir}/%{name}-%{realver}
21 %define pluginsdir %{_libdir}/mozilla/plugins
22
23 # libxul.so is provided by libxulrunnner2.0.
24 %define _requires_exceptions libxul.so
25
26 # this seems fragile, so require the exact version or later (#58754)
27 %define sqlite3_version %(pkg-config --modversion sqlite3 &>/dev/null && pkg-config --modversion sqlite3 2>/dev/null || echo 0)
28 %define nss_version %(pkg-config --modversion nss &>/dev/null && pkg-config --modversion nss 2>/dev/null || echo 0)
29 %define nspr_version %(pkg-config --modversion nspr &>/dev/null && pkg-config --modversion nspr 2>/dev/null || echo 0)
30
31 %define _use_syshunspell 1
32
33 #define prel 0
34 %if 0%{?prel}
35 %define release %mkrel -c %prel 1
36 %else
37 %define release %mkrel 4
38 %endif
39
40 Summary: Next generation web browser
41 Name: firefox
42 Version: %{realver}
43 Epoch: %{ff_epoch}
44 Release: %{release}
45 License: MPLv1+
46 Group: Networking/WWW
47 Url: http://www.mozilla.com/firefox/
48 %if 0%{?prel}
49 Source0: ftp://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{realver}/source/%{name}-%{realver}%prel.source.tar.bz2
50 %else
51 Source0: ftp://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{realver}/source/%{name}-%{realver}.source.tar.bz2
52 %endif
53 Source4: %{name}.desktop
54 Source9: kde.js
55
56 Patch1: firefox-6.0-lang.patch
57 Patch2: firefox-vendor.patch
58 Patch3: mozilla-firefox-1.5.0.6-systemproxy.patch
59 # (OpenSuse) add patch to make firefox always use /usr/bin/firefox when "make firefox
60 # the default web browser" is used fix mdv bug#58784
61 Patch5: firefox-6.0-appname.patch
62 Patch6: firefox-7.0-fix-str-fmt.patch
63 Patch7: mozilla-firefox-run-mozilla.patch
64 Patch8: firefox-disable-check-default-browser.patch
65 Patch10: firefox-3.5.3-default-mail-handler.patch
66 # Patches for kde integration of FF
67 Patch11: firefox-kde.patch
68 Patch12: mozilla-kde.patch
69 Patch34: xulrunner_nojit.patch
70 Patch35: firefox-5.0-asciidel.patch
71 BuildRequires: gtk+2-devel
72 BuildRequires: unzip
73 BuildRequires: zip
74 BuildRequires: libxinerama-devel
75 BuildRequires: libxscrnsaver-devel
76 BuildRequires: libjpeg-devel
77 BuildRequires: libpng-devel >= 2:1.4
78 BuildRequires: zlib-devel
79 BuildRequires: glib2-devel
80 BuildRequires: libIDL2-devel
81 BuildRequires: makedepend
82 BuildRequires: nss-devel >= 2:3.12.10
83 BuildRequires: nss-static-devel
84 BuildRequires: nspr-devel >= 2:4.8.9
85 BuildRequires: startup-notification-devel
86 BuildRequires: dbus-glib-devel
87 BuildRequires: python
88 BuildRequires: libsqlite3-devel >= 3.7.0.1-2
89 %ifnarch %arm %mips
90 BuildRequires: valgrind
91 BuildRequires: java-rpmbuild
92 BuildRequires: yasm >= 1.0.1
93 %endif
94 %ifarch %arm
95 BuildRequires: libffi-devel
96 %endif
97 BuildRequires: rootcerts >= 1:20110830.00
98 BuildRequires: libxt-devel
99 %if %_use_syshunspell
100 BuildRequires: hunspell-devel
101 %endif
102 BuildRequires: doxygen
103 # BuildRequires: xulrunner-devel >= %xulrunner_version%{?prel:-0.%prel}
104 BuildRequires: pkgconfig(libproxy-1.0)
105 BuildRequires: pkgconfig(alsa)
106 BuildRequires: wget
107 BuildRequires: libnotify-devel
108 BuildRequires: cairo-devel >= 1.10
109 BuildRequires: mesagl-devel
110 BuildRequires: libvpx-devel
111 BuildRequires: autoconf2.1
112 BuildRequires: libiw-devel
113
114 %if 0%{?prel}
115 Provides: %{name} = %{epoch}:%{realver}-0.%{prel}
116 %else
117 Provides: %{name} = %{epoch}:%{realver}
118 %endif
119 Provides: mozilla-firefox = %{epoch}:%{version}-%{release}
120 Provides: webclient
121
122 Requires: %{mklibname sqlite3_ 0} >= %{sqlite3_version}
123 Requires: %{mklibname nss 3} >= 2:%{nss_version}
124 Requires: %{mklibname nspr 4} >= 2:%{nspr_version}
125 Requires: indexhtml
126 Requires: xdg-utils
127 # fixes bug #42096
128 Requires: mailcap
129 Suggests: myspell-en_US
130 %ifarch x86_64
131 Suggests: nspluginwrapper
132 %endif
133
134 Obsoletes: firefox-ext-weave-sync
135
136 %description
137 The award-winning Web browser is now faster, more secure, and fully customizable
138 to your online life. With Firefox(R), we've added powerful new features that
139 make your online experience even better. It is an 'open source' product which is
140 freely available, and is acquiring a growing proportion of international web
141 browser usage.
142
143 Firefox claims to offer a more secure web browsing experience than other products,
144 with better protection against spyware and other Internet-based security threats.
145 It includes all the standard features of a modern web browser, like Internet
146 searching, tracking recently visited sites, setting up shortcuts to favourite
147 sites, customising the software behaviour and so on. Firefox also includes
148 features like 'tabbed browsing' (opening several web sites as sections within the
149 same window) and methods for controlling pop-up windows, cookies and downloaded
150 files.
151
152 %package devel
153 Summary: Development files for %{name}
154 Group: Development/Other
155
156 %description devel
157 Files and macros mainly for building Firefox extensions.
158
159 %prep
160 %setup -qn mozilla-release
161 %patch1 -p1 -b .lang
162 %patch2 -p1 -b .vendor
163 #patch3 -p1 -b .systemproxy
164 %patch5 -p1 -b .appname
165 %patch6 -p0 -b .str
166 # It was disabled because firefox3 hangs when using soundwrapper
167 #patch7 -p1
168 %patch8 -p1 -b .disable-software-update
169 %patch10 -p1 -b .default-mail-handler
170 ## KDE INTEGRATION
171 # copy current files and patch them later to keep them in sync
172 %patch11 -p1 -b .kde
173 %patch12 -p1 -b .kdemoz
174 # install kde.js
175 install -m 644 %{SOURCE9} browser/app/profile/kde.js
176
177 %ifarch %arm
178 %if "%{_target_cpu}" != "armv7l"
179 %patch34 -p1
180 %endif
181 %endif
182 %patch35 -p1
183 pushd js/src
184 autoconf-2.13
185 popd
186 autoconf-2.13
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 %build
194 export MOZCONFIG=`pwd`/mozconfig
195 cat << EOF > $MOZCONFIG
196 mk_add_options MOZILLA_OFFICIAL=1
197 mk_add_options BUILD_OFFICIAL=1
198 mk_add_options MOZ_MAKE_FLAGS="%{_smp_mflags}"
199 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj
200 ac_add_options --host=%{_host}
201 ac_add_options --target=%{_target_platform}
202 ac_add_options --enable-optimize="%{optflags}"
203 ac_add_options --prefix="%{_prefix}"
204 ac_add_options --libdir="%{_libdir}"
205 ac_add_options --sysconfdir="%{_sysconfdir}"
206 ac_add_options --mandir="%{_mandir}"
207 ac_add_options --includedir="%{_includedir}"
208 ac_add_options --datadir="%{_datadir}"
209 ac_add_options --with-system-nspr
210 ac_add_options --with-system-nss
211 ac_add_options --with-system-zlib
212 ac_add_options --with-system-libvpx
213 ac_add_options --enable-webm
214 ac_add_options --enable-gio
215 ac_add_options --disable-gnomevfs
216 ac_add_options --disable-installer
217 ac_add_options --disable-updater
218 ac_add_options --disable-tests
219 ac_add_options --disable-debug
220 #ac_add_options --enable-chrome-format=jar
221 #ac_add_options --enable-update-channel=beta
222 ac_add_options --enable-official-branding
223 ac_add_options --enable-libproxy
224 ac_add_options --with-system-png
225 ac_add_options --with-system-jpeg
226 ac_add_options --enable-system-cairo
227 ac_add_options --enable-system-sqlite
228 ac_add_options --enable-startup-notification
229 ac_add_options --enable-xinerama
230 ac_add_options --with-distribution-id=org.mageia
231 ac_add_options --disable-crashreporter
232 %ifarch %arm
233 %if "%{_target_cpu}" != "armv7l"
234 ac_add_options --disable-methodjit
235 ac_add_options --disable-tracejit
236 %endif
237 ac_add_options --enable-system-ffi
238 %endif
239 %ifnarch %arm %mips
240 ac_add_options --with-valgrind
241 ac_add_options --with-java-include-path=%{java_home}/include
242 ac_add_options --with-java-bin-path=%{java_home}/bin
243 %endif
244
245 EOF
246
247 %__perl -p -i -e 's|\-0|\-9|g' config/make-jars.pl
248
249 export LDFLAGS="%ldflags"
250 make -f client.mk build
251
252 %install
253 rm -rf %{buildroot}
254
255 make -C %{_builddir}/obj/browser/installer STRIP=/bin/true
256
257 # Copy files to buildroot
258 %{__mkdir_p} %{buildroot}%{mozillalibdir}
259 cp -rf %{_builddir}/obj/dist/firefox/* %{buildroot}%{mozillalibdir}
260
261 %{__mkdir_p} %{buildroot}%{_bindir}
262 ln -sf %{mozillalibdir}/firefox %{buildroot}%{_bindir}/firefox
263 pushd %{buildroot}%{_bindir}
264 ln -sf firefox mozilla-firefox
265 popd
266
267 # Create and own %_libdir/mozilla/plugins & firefox extensions directories
268 %{__mkdir_p} %{buildroot}%{pluginsdir}
269 %{__mkdir_p} %{buildroot}%{_libdir}/mozilla/extensions/%{firefox_appid}
270 %{__mkdir_p} %{buildroot}%{_datadir}/mozilla/extensions/%{firefox_appid}
271
272 # (tpg) desktop entry
273 %{__mkdir_p} %{buildroot}%{_datadir}/applications
274 install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/applications/%{name}.desktop
275
276 # (tpg) icons
277 %{__cp} %{buildroot}%{mozillalibdir}/chrome/icons/default/default16.png %{buildroot}/%{mozillalibdir}/icons/
278 for i in 16 22 24 32 48 256; do
279 # (cg) Not all icon sizes are installed with make install, so just redo it here.
280 %{__install} -m 644 browser/branding/official/default$i.png %{buildroot}%{mozillalibdir}/chrome/icons/default/default$i.png
281 %{__mkdir_p} %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps
282 ln -sf %{mozillalibdir}/chrome/icons/default/default$i.png %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps/%{name}.png ;
283 done
284 %{__mkdir_p} %{buildroot}{%{_liconsdir},%{_iconsdir},%{_miconsdir}}
285 ln -sf %{mozillalibdir}/chrome/icons/default/default48.png %{buildroot}%{_liconsdir}/%{name}.png
286 ln -sf %{mozillalibdir}/chrome/icons/default/default32.png %{buildroot}%{_iconsdir}/%{name}.png
287 ln -sf %{mozillalibdir}/chrome/icons/default/default16.png %{buildroot}%{_miconsdir}/%{name}.png
288
289 # exclusions
290 rm -f %{buildroot}%{mozillalibdir}/README.txt
291 rm -f %{buildroot}%{mozillalibdir}/removed-files
292 rm -f %{buildroot}%{mozillalibdir}/precomplete
293
294 # this file is only used when creating a new user profile
295 install -D -m644 browser/app/profile/prefs.js %{buildroot}%{mozillalibdir}/defaults/profile/prefs.js
296 cat << EOF >> %{buildroot}%{mozillalibdir}/defaults/profile/prefs.js
297 user_pref("browser.EULA.override", true);
298 user_pref("browser.shell.checkDefaultBrowser", false);
299 user_pref("browser.startup.homepage", "file:///usr/share/indexhtml/index.html");
300 user_pref("app.update.auto", false);
301 user_pref("app.update.enabled", false);
302 user_pref("app.update.autoInstallEnabled", false);
303 user_pref("browser.showQuitWarning", true);
304 EOF
305
306 # files in this directory are read on every startup, and can change/add
307 # preferences for existing profiles
308 # extensions.autoDisableScopes is a new preference added in firefox 8
309 # it defines "scopes" where newly installed addons are disabled by default
310 # this is an additive bit field, and the value defaults to 15 (1+2+4+8)
311 # we need to remove system scope (8) from it so language packs and other addons
312 # which are installed systemwide won't get marked as 3rd party and disabled
313 # documentation: http://kb.mozillazine.org/About:config_entries#Extensions.
314 # or in toolkit/mozapps/extensions/AddonManager.jsm
315 # we also need to disable the "disable addon selection dialog"
316 cat << EOF > %{buildroot}%{mozillalibdir}/defaults/pref/mga.js
317 pref("extensions.autoDisableScopes", 0);
318 pref("extensions.shownSelectionUI", true);
319 EOF
320
321 # (ahmad) these ones belonged in prefs.js (see above), remove them until it's
322 # decided what search engines to ship by default
323 #user_pref("browser.search.selectedEngine","Ask.com");
324 #user_pref("browser.search.order.1","Ask.com");
325 #user_pref("browser.search.order.2","Exalead");
326 #user_pref("browser.search.order.3","Google");
327 #user_pref("browser.search.order.4","Yahoo");
328
329 # (ahmad) don't install these until it's decided what search engines to ship by
330 # default
331 # search engines
332 #cp -f %{SOURCE5} %{buildroot}%{mozillalibdir}/searchplugins/jamendo.xml
333 #cp -f %{SOURCE6} %{buildroot}%{mozillalibdir}/searchplugins/exalead.xml
334 #cp -f %{SOURCE8} %{buildroot}%{mozillalibdir}/searchplugins/askcom.xml
335
336 #sed -i 's/@DISTRO_VALUE@/ffx/' %{buildroot}%{mozillalibdir}/searchplugins/askcom.xml
337 #sed -i 's/@DISTRO_VALUE@//' %{buildroot}%{mozillalibdir}/searchplugins/exalead.xml
338
339 # use the system myspell dictionaries
340 rm -fr %{buildroot}%{mozillalibdir}/dictionaries
341 ln -s %{_datadir}/dict/mozilla %{buildroot}%{mozillalibdir}/dictionaries
342
343 # (lm) touch and %ghost bookmarks.html to a proper uninstall
344 touch %{buildroot}%{mozillalibdir}/defaults/profile/bookmarks.html
345
346 %find_lang %{name}
347
348 mkdir -p %{buildroot}%{_sys_macros_dir}
349 cat <<FIN >%{buildroot}%{_sys_macros_dir}/%{name}.macros
350 # Macros from %{name} package
351 %%firefox_major %{major}
352 %%firefox_epoch %{ff_epoch}
353 %%firefox_version %{realver}%{?prel:-0.%prel}
354 %%firefox_mozillapath %{mozillalibdir}
355 %%firefox_pluginsdir %{pluginsdir}
356 %%firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
357 %%firefox_extdir %%(if [ "%%_target_cpu" = "noarch" ]; then echo %%{_datadir}/mozilla/extensions/%%{firefox_appid}; else echo %%{_libdir}/mozilla/extensions/%%{firefox_appid}; fi)
358 FIN
359
360 %pre
361 if [ -d %{mozillalibdir}/dictionaries ]; then
362 rm -fr %{mozillalibdir}/dictionaries
363 fi
364
365 %post
366 if [ ! -r /etc/sysconfig/oem ]; then
367 case `grep META_CLASS /etc/sysconfig/system` in
368 *powerpack) bookmark="mozilla-powerpack.html" ;;
369 *desktop) bookmark="mozilla-one.html";;
370 *) bookmark="mozilla-download.html";;
371 esac
372 ln -s -f ../../../../share/mga/bookmarks/mozilla/$bookmark %{mozillalibdir}/defaults/profile/bookmarks.html
373 fi
374
375 %files -f %{name}.lang
376 %{_bindir}/%{name}
377 %{_bindir}/mozilla-firefox
378 %{_iconsdir}/hicolor/*/apps/*.png
379 %{_miconsdir}/%{name}.png
380 %{_iconsdir}/%{name}.png
381 %{_liconsdir}/%{name}.png
382 %{_datadir}/applications/*.desktop
383 %{_libdir}/%{name}-%{realver}*
384 %ghost %{mozillalibdir}/defaults/profile/bookmarks.html
385 %dir %{_libdir}/mozilla
386 %dir %{pluginsdir}
387 %dir %{_libdir}/mozilla/extensions/%{firefox_appid}
388 %dir %{_datadir}/mozilla/extensions/%{firefox_appid}
389
390 %files devel
391 %{_sys_macros_dir}/%{name}.macros

  ViewVC Help
Powered by ViewVC 1.1.30