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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 130767 - (show annotations) (download)
Sat Jul 30 19:41:01 2011 UTC (12 years, 8 months ago) by ahmad
File size: 13509 byte(s)
- Drop BR xulrunner-devel since libxul.so is built here
- Add BR pkgconfig(libproxy-1.0), pkgconfig(alsa)
- Use the system myspell dictionaries

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 5.0
14 %define ff_epoch 0
15 # (tpg) set version HERE !!!
16 %define realver %{major}.1
17
18 # (tpg) MOZILLA_FIVE_HOME
19 %define mozillalibdir %{_libdir}/%{name}-%{realver}
20 %define pluginsdir %{_libdir}/mozilla/plugins
21
22 # libxul.so is provided by libxulrunnner2.0.
23 %define _requires_exceptions libxul.so
24
25 # this seems fragile, so require the exact version or later (#58754)
26 %define sqlite3_version %(pkg-config --modversion sqlite3 &>/dev/null && pkg-config --modversion sqlite3 2>/dev/null || echo 0)
27
28 %define _use_syshunspell 1
29
30 #define prel 0
31 %define subrel 2
32 %if 0%{?prel}
33 %define release %mkrel -c %prel 1
34 %else
35 %define release %mkrel 1
36 %endif
37
38 Summary: Next generation web browser
39 Name: firefox
40 Version: %{realver}
41 Epoch: %{ff_epoch}
42 Release: %{release}
43 License: MPLv1+
44 Group: Networking/WWW
45 Url: http://www.mozilla.com/firefox/
46 %if 0%{?prel}
47 Source0: ftp://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{realver}/source/%{name}-%{realver}%prel.source.tar.bz2
48 Source1: ftp://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{realver}/source/%{name}-%{realver}%prel.source.tar.bz2.asc
49 %else
50 Source0: ftp://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{realver}/source/%{name}-%{realver}.source.tar.bz2
51 Source1: ftp://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{realver}/source/%{name}-%{realver}.source.tar.bz2.asc
52 %endif
53 Source4: %{name}.desktop
54 Source9: kde.js
55
56 Patch1: mozilla-firefox-3.0.5-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-3.6.3-appname.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
69 # patch from https://bugzilla.mozilla.org/show_bug.cgi?id=551138
70 # we'll have to use system libffi on arm because moz folks are using
71 # vfp asm which doesn't exist on non-cortex platforms
72 # src/arm/sysv.S: Assembler messages:
73 # src/arm/sysv.S:266: Error: selected processor does not support ARM mode `flddle d0,[ip]'
74 # src/arm/sysv.S:267: Error: selected processor does not support ARM mode `fldmiadgt ip,{d0-d7}'
75 # src/arm/sysv.S:307: Error: selected processor does not support ARM mode `fstseq s0,[r2]'
76 # src/arm/sysv.S:311: Error: selected processor does not support ARM mode `fstdeq d0,[r2]'
77 # src/arm/sysv.S:316: Error: selected processor does not support ARM mode `fstmiadeq r2,{d0-d3}'
78 # src/arm/sysv.S:400: Error: selected processor does not support ARM mode `fstmfdd sp!,{d0-d7}'
79 # src/arm/sysv.S:438: Error: selected processor does not support ARM mode `flds s0,[sp]'
80 # src/arm/sysv.S:441: Error: selected processor does not support ARM mode `fldd d0,[sp]'
81 # src/arm/sysv.S:450: Error: selected processor does not support ARM mode `fldmiad sp,{d0-d1}'
82 # src/arm/sysv.S:453: Error: selected processor does not support ARM mode `fldmiad sp,{d0-d3}'
83 Patch32: xulrunner_allow_to_use_system_libffi.patch
84 Patch33: xulrunner_configure_neon_check.patch
85 Patch34: xulrunner_nojit.patch
86 Patch35: firefox-5.0-asciidel.patch
87 BuildRequires: gtk+2-devel
88 BuildRequires: unzip
89 BuildRequires: zip
90 BuildRequires: libjpeg-devel
91 BuildRequires: zlib-devel
92 BuildRequires: glib2-devel
93 BuildRequires: libIDL2-devel
94 BuildRequires: makedepend
95 BuildRequires: nss-devel >= 2:3.12.8
96 BuildRequires: nss-static-devel
97 BuildRequires: nspr-devel >= 2:4.8.7
98 BuildRequires: startup-notification-devel
99 BuildRequires: dbus-glib-devel
100 BuildRequires: python
101 Requires: %{mklibname sqlite3_ 0} >= %{sqlite3_version}
102 BuildRequires: libsqlite3-devel >= 3.7.0.1-2
103 %ifnarch %arm %mips
104 BuildRequires: valgrind
105 BuildRequires: java-rpmbuild
106 BuildRequires: yasm >= 1.0.1
107 %endif
108 %ifarch %arm
109 BuildRequires: libffi-devel
110 %endif
111 BuildRequires: rootcerts
112 BuildRequires: libxt-devel
113 %if %_use_syshunspell
114 BuildRequires: hunspell-devel
115 %endif
116 BuildRequires: doxygen
117 BuildRequires: libgnome2-devel
118 BuildRequires: libgnomeui2-devel
119 #BuildRequires: xulrunner-devel >= %xulrunner_version%{?prel:-0.%prel}
120 BuildRequires: pkgconfig(libproxy-1.0)
121 BuildRequires: pkgconfig(alsa)
122 BuildRequires: wget
123 BuildRequires: libnotify-devel
124 BuildRequires: cairo-devel >= 1.10
125 BuildRequires: mesagl-devel
126 BuildRequires: libvpx-devel
127 BuildRequires: autoconf2.1
128 BuildRequires: libiw-devel
129 %if 0%{?prel}
130 Provides: %{name} = %{epoch}:%{realver}-0.%{prel}
131 %else
132 Provides: %{name} = %{epoch}:%{realver}
133 %endif
134 Provides: webclient
135 Requires: indexhtml
136 Requires: xdg-utils
137 Suggests: myspell-en_US
138 %ifarch x86_64
139 Suggests: nspluginwrapper
140 %endif
141 Requires(post): desktop-file-utils
142 Requires(postun): desktop-file-utils
143 # fixes bug #42096
144 Requires: mailcap
145 Provides: mozilla-firefox = %{epoch}:%{version}-%{release}
146 Obsoletes: firefox-ext-weave-sync
147
148 %description
149 The award-winning Web browser is now faster, more secure, and fully customizable
150 to your online life. With Firefox(R), we've added powerful new features that
151 make your online experience even better. It is an 'open source' product which is
152 freely available, and is acquiring a growing proportion of international web
153 browser usage.
154
155 Firefox claims to offer a more secure web browsing experience than other products,
156 with better protection against spyware and other Internet-based security threats.
157 It includes all the standard features of a modern web browser, like Internet
158 searching, tracking recently visited sites, setting up shortcuts to favourite
159 sites, customising the software behaviour and so on. Firefox also includes
160 features like 'tabbed browsing' (opening several web sites as sections within the
161 same window) and methods for controlling pop-up windows, cookies and downloaded
162 files.
163
164 %package devel
165 Summary: Development files for %{name}
166 Group: Development/Other
167
168 %description devel
169 Files and macros mainly for building Firefox extensions.
170
171 %prep
172 %setup -qn mozilla-release
173 %patch1 -p1 -b .lang
174 %patch2 -p1 -b .vendor
175 #patch3 -p1
176 %patch5 -p1 -b .defaultbrowser
177 # It was disabled because firefox3 hangs when using soundwrapper
178 #patch7 -p1
179 %patch8 -p1 -b .disable-software-update
180 #patch9
181 %patch10 -p1 -b .default-mail-handler
182 ## KDE INTEGRATION
183 # copy current files and patch them later to keep them in sync
184 %patch11 -p1 -b .kde
185 %patch12 -p1 -b .kdemoz
186 # install kde.js
187 install -m 644 %{SOURCE9} browser/app/profile/kde.js
188 # (tpg) remove ff bookmarks, use mga ones
189 rm -rf browser/locales/en-US/profile/bookmarks.html
190 touch browser/locales/en-US/profile/bookmarks.html
191
192 # needed to regenerate certdata.c
193 pushd security/nss/lib/ckfw/builtins
194 perl ./certdata.perl < /etc/pki/tls/mozilla/certdata.txt
195 popd
196
197 %patch32 -p1
198 %patch33 -p1
199 %ifarch %arm
200 %if "%{_target_cpu}" != "armv7l"
201 %patch34 -p1
202 %endif
203 %endif
204 %patch35 -p1
205 pushd js/src
206 autoconf-2.13
207 popd
208 autoconf-2.13
209
210 # (tpg) remove ff bookmarks, use mdv ones
211 rm -rf browser/locales/en-US/profile/bookmarks.html
212 touch browser/locales/en-US/profile/bookmarks.html
213
214 # needed to regenerate certdata.c
215 pushd security/nss/lib/ckfw/builtins
216 perl ./certdata.perl < /etc/pki/tls/mozilla/certdata.txt
217 popd
218
219 %build
220 export MOZCONFIG=./mozconfig
221 cat << EOF > $MOZCONFIG
222 mk_add_options MOZILLA_OFFICIAL=1
223 mk_add_options BUILD_OFFICIAL=1
224 mk_add_options MOZ_MAKE_FLAGS="%{_smp_mflags}"
225 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj
226 ac_add_options --prefix="%{_prefix}"
227 ac_add_options --libdir="%{_libdir}"
228 ac_add_options --sysconfdir="%{_sysconfdir}"
229 ac_add_options --mandir="%{_mandir}"
230 ac_add_options --includedir="%{_includedir}"
231 ac_add_options --datadir="%{_datadir}"
232 ac_add_options --with-system-nspr
233 ac_add_options --with-system-nss
234 ac_add_options --with-system-zlib
235 ac_add_options --disable-installer
236 ac_add_options --disable-updater
237 ac_add_options --disable-tests
238 ac_add_options --disable-debug
239 #ac_add_options --enable-chrome-format=jar
240 #ac_add_options --enable-update-channel=beta
241 ac_add_options --enable-official-branding
242 ac_add_options --enable-libproxy
243 %if %mgaversion > 2
244 ac_add_options --with-system-png
245 %else
246 ac_add_options --without-system-png
247 %endif
248 ac_add_options --with-system-jpeg
249 ac_add_options --enable-system-cairo
250 ac_add_options --enable-system-sqlite
251 ac_add_options --with-distribution-id=org.mageia
252 ac_add_options --disable-crashreporter
253 %ifarch %arm
254 %if "%{_target_cpu}" != "armv7l"
255 ac_add_options --disable-methodjit
256 ac_add_options --disable-tracejit
257 %endif
258 ac_add_options --enable-system-ffi
259 %endif
260 %ifnarch %arm %mips
261 ac_add_options --with-valgrind
262 ac_add_options --with-java-include-path=%{java_home}/include
263 ac_add_options --with-java-bin-path=%{java_home}/bin
264 %endif
265
266 EOF
267
268 %__perl -p -i -e 's|\-0|\-9|g' config/make-jars.pl
269
270 make -f client.mk build
271
272 %install
273 rm -rf %{buildroot}
274
275 make -C %{_builddir}/obj/browser/installer STRIP=/bin/true
276
277 # Copy files to buildroot
278 %{__mkdir_p} %{buildroot}%{mozillalibdir}
279 cp -rf %{_builddir}/obj/dist/firefox/* %{buildroot}%{mozillalibdir}
280
281 %{__mkdir_p} %{buildroot}%{_bindir}
282 ln -sf %{mozillalibdir}/firefox %{buildroot}%{_bindir}/firefox
283 pushd %{buildroot}%{_bindir}
284 ln -sf firefox mozilla-firefox
285 popd
286
287 # Create an own %_libdir/mozilla/plugins
288 %{__mkdir_p} %{buildroot}%{_libdir}/mozilla/plugins
289
290 # (tpg) desktop entry
291 %{__mkdir_p} %{buildroot}%{_datadir}/applications
292 install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/applications/%{name}.desktop
293
294 # (tpg) icons
295 %{__cp} %{buildroot}%{mozillalibdir}/chrome/icons/default/default16.png %{buildroot}/%{mozillalibdir}/icons/
296 for i in 16 32 48 ; do
297 %{__mkdir_p} %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps
298 ln -sf %{mozillalibdir}/chrome/icons/default/default$i.png %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps/firefox.png ;
299 done
300
301 # exclusions
302 rm -f %{buildroot}%{mozillalibdir}/README.txt
303 rm -f %{buildroot}%{mozillalibdir}/removed-files
304 rm -f %{buildroot}%{mozillalibdir}/precomplete
305
306 install -D -m644 browser/app/profile/prefs.js %{buildroot}%{mozillalibdir}/defaults/profile/prefs.js
307 cat << EOF >> %{buildroot}%{mozillalibdir}/defaults/profile/prefs.js
308 user_pref("browser.EULA.override", true);
309 user_pref("browser.shell.checkDefaultBrowser", false);
310 user_pref("browser.startup.homepage", "file:///usr/share/indexhtml/index.html");
311 user_pref("browser.ctrlTab.previews", true);
312 user_pref("browser.tabs.insertRelatedAfterCurrent", false);
313 user_pref("app.update.auto", false);
314 user_pref("app.update.enabled", false);
315 user_pref("app.update.autoInstallEnabled", false);
316 user_pref("security.ssl.require_safe_negotiation", false);
317 user_pref("browser.startup.homepage","file:///usr/share/indexhtml/index.html");
318 EOF
319
320 # (ahmad) these ones belonged in prefs.js (see above), remove them until it's
321 # decided what search engines to ship by default
322 #user_pref("browser.search.selectedEngine","Ask.com");
323 #user_pref("browser.search.order.1","Ask.com");
324 #user_pref("browser.search.order.2","Exalead");
325 #user_pref("browser.search.order.3","Google");
326 #user_pref("browser.search.order.4","Yahoo");
327
328 # (ahmad) don't install these until it's decided what search engines to ship by
329 # default
330 # search engines
331 #cp -f %{SOURCE5} %{buildroot}%{mozillalibdir}/searchplugins/jamendo.xml
332 #cp -f %{SOURCE6} %{buildroot}%{mozillalibdir}/searchplugins/exalead.xml
333 #cp -f %{SOURCE8} %{buildroot}%{mozillalibdir}/searchplugins/askcom.xml
334
335 #sed -i 's/@DISTRO_VALUE@/ffx/' %{buildroot}%{mozillalibdir}/searchplugins/askcom.xml
336 #sed -i 's/@DISTRO_VALUE@//' %{buildroot}%{mozillalibdir}/searchplugins/exalead.xml
337
338 # Use the system myspell dictionaries
339 rm -fr %{buildroot}%{mozillalibdir}/dictionaries
340 ls -s %{_datadir}/dict/mozilla %{buildroot}%{mozillalibdir}/dictionaries
341
342 %find_lang %{name}
343
344 mkdir -p %{buildroot}%{_sys_macros_dir}
345 cat <<FIN >%{buildroot}%{_sys_macros_dir}/%{name}.macros
346 # Macros from %{name} package
347 %%firefox_major %{major}
348 %%firefox_epoch %{ff_epoch}
349 %%firefox_version %{realver}%{?prel:-0.%prel}
350 %%firefox_mozillapath %{mozillalibdir}
351 %%firefox_pluginsdir %{pluginsdir}
352 %%firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
353 %%firefox_extdir %%(if [ "%%_target_cpu" = "noarch" ]; then echo %%{_datadir}/mozilla/extensions/%%{firefox_appid}; else echo %%{_libdir}/mozilla/extensions/%%{firefox_appid}; fi)
354 FIN
355
356
357 %pre
358 if [ -d %{mozillalibdir}/dictionaries ]; then
359 rm -fr %{mozillalibdir}/dictionaries
360 fi
361
362 %post
363 if [ ! -r /etc/sysconfig/oem ]; then
364 case `grep META_CLASS /etc/sysconfig/system` in
365 *powerpack) bookmark="mozilla-powerpack.html" ;;
366 *desktop) bookmark="mozilla-one.html";;
367 *) bookmark="mozilla-download.html";;
368 esac
369 ln -s -f ../../../../share/mdk/bookmarks/mozilla/$bookmark %{mozillalibdir}/defaults/profile/bookmarks.html
370 fi
371
372 %files -f %{name}.lang
373 %{_bindir}/%{name}
374 %{_bindir}/mozilla-firefox
375 %{_iconsdir}/hicolor/*/apps/*.png
376 %{_datadir}/applications/*.desktop
377 %{_libdir}/%{name}-%{realver}*
378 %dir %{_libdir}/mozilla
379 %dir %{pluginsdir}
380
381 %files devel
382 %{_sys_macros_dir}/%{name}.macros

  ViewVC Help
Powered by ViewVC 1.1.30