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

  ViewVC Help
Powered by ViewVC 1.1.30