/[packages]/updates/3/firefox/current/SPECS/firefox.spec
ViewVC logotype

Contents of /updates/3/firefox/current/SPECS/firefox.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30