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