/[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 75106 - (show annotations) (download)
Mon Mar 21 00:24:58 2011 UTC (13 years, 1 month ago) by ahmad
Original Path: cauldron/firefox/current/SPECS/firefox.spec
File size: 11816 byte(s)
- drop the vendor patch in accordance with xulrunner commits, c.f.:
  http://svnweb.mageia.org/packages?view=revision&revision=65726
- don't change upstream search engines prefs until it's decided what Mageia will
  ship by default
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 4
14 %define ff_epoch 0
15 # (tpg) set version HERE !!!
16 %define realver %{major}.0
17 %define prel rc2
18 %define xulrunner_version 2.0
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
29 %define _use_syshunspell 1
30
31 %define release %mkrel -c %prel 1
32
33 Summary: Next generation web browser
34 Name: firefox
35 Version: %{realver}
36 Epoch: %{ff_epoch}
37 Release: %{release}
38 License: MPLv1+
39 Group: Networking/WWW
40 Url: http://www.mozilla.com/firefox/
41 Source0: ftp://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{realver}/source/%{name}-%{realver}%prel.source.tar.bz2
42 Source1: ftp://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{realver}/source/%{name}-%{realver}%prel.source.tar.bz2.asc
43 Source4: %{name}.desktop
44 Source5: firefox-searchengines-jamendo.xml
45 Source6: firefox-searchengines-exalead.xml
46 Source8: firefox-searchengines-askcom.xml
47 Source9: kde.js
48 Patch1: mozilla-firefox-3.0.5-lang.patch
49 Patch3: mozilla-firefox-1.5.0.6-systemproxy.patch
50 Patch5: firefox-3.0b3-check-default-browser.patch
51 Patch6: mozilla-firefox-run-mozilla.patch
52 Patch14: mozilla-firefox-1.5-software-update.patch
53 #Patch15: firefox-3.0.1-disable-classic-theme.patch
54 Patch16: firefox-3.5.3-default-mail-handler.patch
55 Patch17: firefox-kde.patch
56 # (OpenSuse) add patch to make firefox always use /usr/bin/firefox when "make firefox
57 # the default web browser" is used fix mdv bug#58784
58 Patch18: firefox-3.6.3-appname.patch
59 BuildRequires: gtk+2-devel
60 BuildRequires: unzip
61 BuildRequires: zip
62 #BuildRequires: libpng-devel >= 1.4.1
63 BuildRequires: libjpeg-devel
64 BuildRequires: zlib-devel
65 BuildRequires: glib2-devel
66 BuildRequires: libIDL2-devel
67 BuildRequires: makedepend
68 BuildRequires: nss-devel >= 2:3.12.8
69 BuildRequires: nspr-devel >= 2:4.8.7
70 BuildRequires: startup-notification-devel
71 BuildRequires: dbus-glib-devel
72 BuildRequires: python
73 Requires: %{mklibname sqlite3_ 0} >= %{sqlite3_version}
74 BuildRequires: libsqlite3-devel >= 3.7.0.1-2
75 BuildRequires: valgrind
76 BuildRequires: rootcerts
77 BuildRequires: libxt-devel
78 %if %_use_syshunspell
79 BuildRequires: hunspell-devel
80 %endif
81 BuildRequires: doxygen
82 BuildRequires: libgnome2-devel
83 BuildRequires: libgnomeui2-devel
84 BuildRequires: java-rpmbuild
85 BuildRequires: xulrunner-devel >= %xulrunner_version%{?prel:-0.%prel}
86 BuildRequires: wget
87 BuildRequires: libnotify-devel
88 BuildRequires: cairo-devel >= 1.10
89 BuildRequires: yasm
90 BuildRequires: mesagl-devel
91 BuildRequires: libvpx-devel
92 %if %{prel}
93 Provides: %{name} = %{epoch}:%{realver}-0.%{prel}
94 %endif
95 Provides: webclient
96 Requires: indexhtml
97 Requires: xdg-utils
98 %define ff_deps myspell-en_US nspluginwrapper
99 Suggests: %{ff_deps}
100 Requires(post): desktop-file-utils
101 Requires(postun): desktop-file-utils
102 # fixes bug #42096
103 Requires: mailcap
104 Provides: mozilla-firefox = %{epoch}:%{version}-%{release}
105 Requires: xulrunner = %{xulrunner_version}%{?prel:-0.%prel}
106 Requires: %{mklibname xulrunner %xulrunner_version}
107 Obsoletes: firefox-ext-weave-sync
108 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
109
110 %description
111 The award-winning Web browser is now faster, more secure, and fully customizable
112 to your online life. With Firefox(R), we've added powerful new features that
113 make your online experience even better. It is an 'open source' product which is
114 freely available, and is acquiring a growing proportion of international web
115 browser usage.
116
117 Firefox claims to offer a more secure web browsing experience than other products,
118 with better protection against spyware and other Internet-based security threats.
119 It includes all the standard features of a modern web browser, like Internet
120 searching, tracking recently visited sites, setting up shortcuts to favourite
121 sites, customising the software behaviour and so on. Firefox also includes
122 features like 'tabbed browsing' (opening several web sites as sections within the
123 same window) and methods for controlling pop-up windows, cookies and downloaded
124 files.
125
126 %package devel
127 Summary: Development files for %{name}
128 Group: Development/Other
129
130 %description devel
131 Files and macros mainly for building Firefox extensions.
132
133 %prep
134 %setup -qn mozilla-2.0
135 #%patch1 -p1 -b .lang rediff
136 # Temporary disabled. It prevents firefox from running.
137 #%patch3 -p1
138 %patch5 -p1 -b .defaultbrowser
139 # It was disabled because firefox3 hangs when using soundwrapper
140 #%patch6 -p1
141 #%patch14 -p1 -b .disable-software-update rediff
142 # (salem) this patch does not work properly on ff3.
143 #%patch15 -p1 -b .disable-classic-theme
144 %patch16 -p1 -b .default-mail-handler
145 ## KDE INTEGRATION
146 # copy current files and patch them later to keep them in sync
147 %patch17 -p1
148 # install kde.js
149 install -m 644 %{SOURCE9} browser/app/profile/kde.js
150 %patch18 -p1 -b .appname
151 # (tpg) remove ff bookmarks, use mdv ones
152 rm -rf browser/locales/en-US/profile/bookmarks.html
153 touch browser/locales/en-US/profile/bookmarks.html
154
155 # needed to regenerate certdata.c
156 pushd security/nss/lib/ckfw/builtins
157 perl ./certdata.perl < /etc/pki/tls/mozilla/certdata.txt
158 popd
159
160 %build
161 %setup_compile_flags
162 %serverbuild
163 export PREFIX="%{_prefix}"
164 export LIBDIR="%{_libdir}"
165 export MOZILLA_OFFICIAL=1
166 export BUILD_OFFICIAL=1
167
168 # (tpg) don't use macro here
169 # (fhimpe) javaxpcom does not build correctly with xulrunner (is it
170 # actually needed/useful here when enabled already in xulrunner?)
171 # https://bugzilla.mozilla.org/show_bug.cgi?id=448386
172 ./configure --build=%{_target_platform} \
173 --prefix=%{_prefix} \
174 --bindir=%{_bindir} \
175 --libdir=%{_libdir} \
176 --includedir=%{_includedir} \
177 --datadir=%{_datadir} \
178 --enable-application=browser \
179 --disable-elf-hack \
180 --with-pthreads \
181 --with-system-jpeg \
182 --with-system-zlib \
183 --with-system-bz2 \
184 --enable-system-png \
185 --with-system-nspr \
186 --with-system-nss \
187 --disable-ldap \
188 --disable-calendar \
189 --disable-mailnews \
190 --disable-chatzilla \
191 --disable-composer \
192 --enable-gio \
193 --disable-gnomevfs \
194 --disable-profilesharing \
195 --disable-toolkit-qt \
196 --disable-installer \
197 --disable-updater \
198 --disable-debug \
199 --disable-pedantic \
200 --disable-native-uconv \
201 --disable-elf-dynstr-gc \
202 --disable-crashreporter \
203 --disable-strip \
204 --enable-crypto \
205 --enable-gnomeui \
206 --enable-places \
207 --enable-storage \
208 --enable-default-toolkit=cairo-gtk2 \
209 --enable-official-branding \
210 --enable-svg \
211 --enable-svg-renderer=cairo \
212 --enable-single-profile \
213 --enable-startup-notification \
214 --enable-system-cairo \
215 --enable-system-pixman \
216 --disable-javaxpcom \
217 --enable-optimize \
218 --enable-safe-browsing \
219 --enable-xinerama \
220 --enable-canvas \
221 --enable-pango \
222 --enable-xtf \
223 --enable-wave \
224 --enable-ogg \
225 --enable-system-libvpx \
226 --enable-xpcom-fastload \
227 --enable-dbus \
228 --enable-image-encoder=all \
229 --enable-image-decoders=all \
230 --enable-extensions=default \
231 %if %_use_syshunspell
232 --enable-system-hunspell \
233 %endif
234 --enable-install-strip \
235 --enable-url-classifier \
236 --enable-smil \
237 --disable-tree-freetype \
238 --enable-canvas3d \
239 --disable-coretext \
240 --enable-necko-protocols=all \
241 --disable-necko-wifi \
242 --disable-tests \
243 --disable-mochitest \
244 --with-distribution-id=com.mageia \
245 --with-valgrind \
246 --enable-jemalloc \
247 --enable-system-sqlite \
248 --with-system-libxul \
249 --enable-chrome-format=jar \
250 --with-libxul-sdk=`pkg-config --variable=sdkdir libxul` \
251 --with-java-include-path=%{java_home}/include \
252 --with-java-bin-path=%{java_home}/bin \
253 --with-default-mozilla-five-home="%{mozillalibdir}"
254
255 %__perl -p -i -e 's|\-0|\-9|g' config/make-jars.pl
256
257 %make
258
259 %install
260 rm -rf %{buildroot}
261
262 %makeinstall_std
263
264 ln -s firefox %{buildroot}%{_bindir}/mozilla-firefox
265 sed -i "s,@LIBDIR@,%{_libdir}," %{buildroot}%{mozillalibdir}/%{name}
266
267 # Create an own %_libdir/mozilla/plugins
268 %{__mkdir_p} %{buildroot}%{_libdir}/mozilla/plugins
269
270 # (tpg) desktop entry
271 %{__mkdir_p} %{buildroot}%{_datadir}/applications
272 install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/applications/%{name}.desktop
273
274 # (tpg) icons
275 %{__cp} other-licenses/branding/%{name}/default16.png %{buildroot}/%{mozillalibdir}/icons/
276 for i in 16 22 24 32 48 256; do
277 %{__mkdir_p} %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps
278 %{__cp} other-licenses/branding/%{name}/default$i.png %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps/firefox.png ;
279 done
280
281 install -D -m644 browser/app/profile/prefs.js %{buildroot}%{mozillalibdir}/defaults/profile/prefs.js
282 cat << EOF >> %{buildroot}%{mozillalibdir}/defaults/profile/prefs.js
283 user_pref("browser.EULA.override", true);
284 user_pref("browser.shell.checkDefaultBrowser", false);
285 user_pref("browser.startup.homepage", "file:///usr/share/doc/HTML/index.html");
286 user_pref("browser.ctrlTab.previews", true);
287 user_pref("app.update.auto", false);
288 user_pref("app.update.enabled", false);
289 user_pref("app.update.autoInstallEnabled", false);
290 user_pref("browser.startup.homepage","file:///usr/share/doc/HTML/index.html");
291 EOF
292
293 # (ahmad) these ones belonged in prefs.js (see above), remove them until it's
294 # decided what search engines to ship by default
295 #user_pref("browser.search.selectedEngine","Ask.com");
296 #user_pref("browser.search.order.1","Ask.com");
297 #user_pref("browser.search.order.2","Exalead");
298 #user_pref("browser.search.order.3","Google");
299 #user_pref("browser.search.order.4","Yahoo");
300
301 # (ahmad) don't install these until it's decided what search engines to ship by
302 # default
303 # search engines
304 #cp -f %{SOURCE5} %{buildroot}%{mozillalibdir}/searchplugins/jamendo.xml
305 #cp -f %{SOURCE6} %{buildroot}%{mozillalibdir}/searchplugins/exalead.xml
306 #cp -f %{SOURCE8} %{buildroot}%{mozillalibdir}/searchplugins/askcom.xml
307
308 #sed -i 's/@DISTRO_VALUE@/ffx/' %{buildroot}%{mozillalibdir}/searchplugins/askcom.xml
309 #sed -i 's/@DISTRO_VALUE@//' %{buildroot}%{mozillalibdir}/searchplugins/exalead.xml
310
311 %find_lang %{name}
312
313 mkdir -p %{buildroot}%{_sys_macros_dir}
314 cat <<FIN >%{buildroot}%{_sys_macros_dir}/%{name}.macros
315 # Macros from %{name} package
316 %%firefox_major %{major}
317 %%firefox_epoch %{ff_epoch}
318 %%firefox_version %{realver}%{?prel:-0.%prel}
319 %%firefox_mozillapath %{mozillalibdir}
320 %%firefox_xulrunner_version %{xulrunner_version}
321 %%firefox_pluginsdir %{pluginsdir}
322 %%firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
323 %%firefox_extdir %%(if [ "%%_target_cpu" = "noarch" ]; then echo %%{_datadir}/mozilla/extensions/%%{firefox_appid}; else echo %%{_libdir}/mozilla/extensions/%%{firefox_appid}; fi)
324 FIN
325
326 %post
327 if [ ! -r /etc/sysconfig/oem ]; then
328 case `grep META_CLASS /etc/sysconfig/system` in
329 *powerpack) bookmark="mozilla-powerpack.html" ;;
330 *desktop) bookmark="mozilla-one.html";;
331 *) bookmark="mozilla-download.html";;
332 esac
333 ln -s -f ../../../../share/mdk/bookmarks/mozilla/$bookmark %{mozillalibdir}/defaults/profile/bookmarks.html
334 fi
335
336 %clean
337 rm -rf %{buildroot}
338
339 %files -f %{name}.lang
340 %defattr(-,root,root)
341 %{_bindir}/%{name}
342 %{_bindir}/mozilla-firefox
343 %{_iconsdir}/hicolor/*/apps/*.png
344 %{_datadir}/applications/*.desktop
345 %{_libdir}/%{name}-%{realver}*
346 %dir %{_libdir}/mozilla
347 %dir %{pluginsdir}
348
349 %files devel
350 %{_sys_macros_dir}/%{name}.macros

  ViewVC Help
Powered by ViewVC 1.1.30