/[packages]/cauldron/firefox/releases/0:10.0/1.mga2/SPECS/firefox.spec
ViewVC logotype

Contents of /cauldron/firefox/releases/0:10.0/1.mga2/SPECS/firefox.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30