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

  ViewVC Help
Powered by ViewVC 1.1.30