/[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 74105 - (show annotations) (download)
Fri Mar 18 10:30:02 2011 UTC (13 years ago) by dmorgan
Original Path: cauldron/firefox/current/SPECS/firefox.spec
File size: 12279 byte(s)
disable gnomevfs and enable gio
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 8
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 --enable-gio \
196 --disable-gnomevfs \
197 --disable-profilesharing \
198 --disable-toolkit-qt \
199 --disable-installer \
200 --disable-updater \
201 --disable-debug \
202 --disable-pedantic \
203 --disable-native-uconv \
204 --disable-elf-dynstr-gc \
205 --disable-crashreporter \
206 --disable-strip \
207 --enable-crypto \
208 --enable-gnomevfs \
209 --enable-gnomeui \
210 --enable-places \
211 --enable-storage \
212 --enable-default-toolkit=cairo-gtk2 \
213 --enable-official-branding \
214 --enable-svg \
215 --enable-svg-renderer=cairo \
216 --enable-single-profile \
217 --enable-startup-notification \
218 --enable-system-cairo \
219 --disable-javaxpcom \
220 --enable-optimize \
221 --enable-safe-browsing \
222 --enable-xinerama \
223 --enable-canvas \
224 --enable-pango \
225 --enable-xtf \
226 --enable-wave \
227 --enable-webm \
228 --enable-ogg \
229 --enable-xpcom-fastload \
230 --enable-gio \
231 --enable-dbus \
232 --enable-image-encoder=all \
233 --enable-image-decoders=all \
234 --enable-extensions=default \
235 %if %_use_syshunspell
236 --enable-system-hunspell \
237 %endif
238 --enable-install-strip \
239 --enable-url-classifier \
240 --disable-faststart \
241 --enable-smil \
242 --disable-tree-freetype \
243 --enable-canvas3d \
244 --disable-coretext \
245 --enable-necko-protocols=all \
246 --disable-necko-wifi \
247 --disable-tests \
248 --disable-mochitest \
249 --with-distribution-id=com.mageia \
250 --with-valgrind \
251 --enable-jemalloc \
252 --enable-system-sqlite \
253 --with-system-libxul \
254 --enable-chrome-format=jar \
255 --with-libxul-sdk=`pkg-config --variable=sdkdir libxul` \
256 --with-java-include-path=%{java_home}/include \
257 --with-java-bin-path=%{java_home}/bin \
258 --with-default-mozilla-five-home="%{mozillalibdir}"
259
260 %__perl -p -i -e 's|\-0|\-9|g' config/make-jars.pl
261
262 %make
263
264 %install
265 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
266
267 %makeinstall_std
268
269 ln -s firefox %{buildroot}%{_bindir}/mozilla-firefox
270 sed -i "s,@LIBDIR@,%{_libdir}," %{buildroot}%{mozillalibdir}/%{name}
271
272 # Create an own %_libdir/mozilla/plugins
273 %{__mkdir_p} %{buildroot}%{_libdir}/mozilla/plugins
274
275 # (tpg) desktop entry
276 %{__mkdir_p} %{buildroot}%{_datadir}/applications
277 install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/applications/%{name}.desktop
278
279 # (tpg) icons
280 %{__cp} other-licenses/branding/%{name}/default16.png %{buildroot}/%{mozillalibdir}/icons/
281 for i in 16 22 24 32 48 256; do
282 %{__mkdir_p} %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps
283 %{__cp} other-licenses/branding/%{name}/default$i.png %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps/firefox.png ;
284 done
285
286 install -D -m644 browser/app/profile/prefs.js %{buildroot}%{mozillalibdir}/defaults/profile/prefs.js
287 cat << EOF >> %{buildroot}%{mozillalibdir}/defaults/profile/prefs.js
288 user_pref("browser.search.selectedEngine","Ask.com");
289 user_pref("browser.search.order.1","Ask.com");
290 user_pref("browser.search.order.2","Exalead");
291 user_pref("browser.search.order.3","Google");
292 user_pref("browser.search.order.4","Yahoo");
293 user_pref("browser.EULA.override", true);
294 user_pref("browser.shell.checkDefaultBrowser", false);
295 user_pref("browser.startup.homepage", "file:///usr/share/doc/HTML/index.html");
296 user_pref("browser.ctrlTab.previews", true);
297 user_pref("app.update.auto", false);
298 user_pref("app.update.enabled", false);
299 user_pref("app.update.autoInstallEnabled", false);
300 user_pref("security.ssl.require_safe_negotiation", false);
301 user_pref("browser.startup.homepage","file:///usr/share/doc/HTML/index.html");
302 EOF
303
304 # search engines
305 cp -f %{SOURCE5} %{buildroot}%{mozillalibdir}/searchplugins/jamendo.xml
306 cp -f %{SOURCE6} %{buildroot}%{mozillalibdir}/searchplugins/exalead.xml
307 cp -f %{SOURCE8} %{buildroot}%{mozillalibdir}/searchplugins/askcom.xml
308
309 sed -i 's/@DISTRO_VALUE@/ffx/' %{buildroot}%{mozillalibdir}/searchplugins/askcom.xml
310 sed -i 's/@DISTRO_VALUE@//' %{buildroot}%{mozillalibdir}/searchplugins/exalead.xml
311
312 #ghost files
313 touch %{buildroot}%{mozillalibdir}/components/compreg.dat
314 touch %{buildroot}%{mozillalibdir}/components/xpti.dat
315
316 # firefox update tool
317 cat %{SOURCE7} |\
318 sed -e "s|FIREFOX_VERSION|%{realver}|g;s|LIBDIR|%{_libdir}|g"\
319 > %{buildroot}%{mozillalibdir}/firefox-rebuild-databases.pl
320 chmod 755 %{buildroot}%{mozillalibdir}/firefox-rebuild-databases.pl
321
322 %find_lang %{name}
323
324 mkdir -p %{buildroot}%{_sys_macros_dir}
325 cat <<FIN >%{buildroot}%{_sys_macros_dir}/%{name}.macros
326 # Macros from %{name} package
327 %%firefox_major %{major}
328 %%firefox_epoch %{ff_epoch}
329 %%firefox_version %{realver}%{?prel:-0.%prel}
330 %%firefox_mozillapath %{mozillalibdir}
331 %%firefox_xulrunner_version %{xulrunner_version}
332 %%firefox_pluginsdir %{pluginsdir}
333 %%firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
334 %%firefox_extdir %%(if [ "%%_target_cpu" = "noarch" ]; then echo %%{_datadir}/mozilla/extensions/%%{firefox_appid}; else echo %%{_libdir}/mozilla/extensions/%%{firefox_appid}; fi)
335 FIN
336
337 %post
338 unset DISPLAY
339 %{mozillalibdir}/firefox-rebuild-databases.pl
340 if [ ! -r /etc/sysconfig/oem ]; then
341 case `grep META_CLASS /etc/sysconfig/system` in
342 *powerpack) bookmark="mozilla-powerpack.html" ;;
343 *desktop) bookmark="mozilla-one.html";;
344 *) bookmark="mozilla-download.html";;
345 esac
346 ln -s -f ../../../../share/mdk/bookmarks/mozilla/$bookmark %{mozillalibdir}/defaults/profile/bookmarks.html
347 fi
348
349 %clean
350 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
351
352 %files -f %{name}.lang
353 %defattr(-,root,root)
354 %{_bindir}/%{name}
355 %{_bindir}/mozilla-firefox
356 %{_iconsdir}/hicolor/*/apps/*.png
357 %ghost %{mozillalibdir}/components/compreg.dat
358 %ghost %{mozillalibdir}/components/xpti.dat
359 %{_datadir}/applications/*.desktop
360 %{_libdir}/%{name}-%{realver}*
361 %dir %{_libdir}/mozilla
362 %dir %{pluginsdir}
363
364 %files devel
365 %{_sys_macros_dir}/%{name}.macros

  ViewVC Help
Powered by ViewVC 1.1.30