1 |
blino |
20612 |
# |
2 |
|
|
# WARNING, READ FIRST: |
3 |
|
|
# |
4 |
|
|
# This is a special package that needs special treatment. Due to the amount of |
5 |
|
|
# security updates it needs, it's common to ship new upstream versions instead of patching. |
6 |
|
|
# That means this package MUST be BUILDABLE for stable official releases. |
7 |
|
|
# This also means only STABLE upstream releases, NO betas. |
8 |
|
|
# This is a discussed topic. Please, do not flame it again. |
9 |
|
|
|
10 |
fwang |
480701 |
# Stay on ESR for stable releases and for cauldron before mageia 4. |
11 |
|
|
# /!\ Do not update more than FF 24 for mga4. /!\ |
12 |
dmorgan |
287522 |
|
13 |
doktor5000 |
673450 |
%define use_clang 0 |
14 |
|
|
|
15 |
doktor5000 |
674823 |
#temporary measure to test build against gcc |
16 |
|
|
%if "%use_clang" == "0" |
17 |
|
|
%define _disable_ld_no_undefined 1 |
18 |
|
|
%endif |
19 |
|
|
|
20 |
tv |
655456 |
%define major 31 |
21 |
blino |
20612 |
%define ff_epoch 0 |
22 |
|
|
# (tpg) set version HERE !!! |
23 |
tv |
655456 |
%define extra esr |
24 |
|
|
#define extra %nil |
25 |
tv |
445222 |
%define realver %{version}%extra |
26 |
lmenut |
130942 |
%define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} |
27 |
dmorgan |
127856 |
|
28 |
blino |
20612 |
# (tpg) MOZILLA_FIVE_HOME |
29 |
tv |
445222 |
%define mozillalibdir %{_libdir}/%{name}-%{version} |
30 |
blino |
20612 |
%define pluginsdir %{_libdir}/mozilla/plugins |
31 |
|
|
|
32 |
|
|
# libxul.so is provided by libxulrunnner2.0. |
33 |
tv |
677155 |
%global __requires_exclude libxul.so |
34 |
blino |
20612 |
|
35 |
|
|
# this seems fragile, so require the exact version or later (#58754) |
36 |
|
|
%define sqlite3_version %(pkg-config --modversion sqlite3 &>/dev/null && pkg-config --modversion sqlite3 2>/dev/null || echo 0) |
37 |
lmenut |
130942 |
%define nss_version %(pkg-config --modversion nss &>/dev/null && pkg-config --modversion nss 2>/dev/null || echo 0) |
38 |
fwang |
464111 |
%define nspr_version %(pkg-config --modversion nspr &>/dev/null && pkg-config --modversion nspr 2>/dev/null || echo 0) |
39 |
blino |
20612 |
|
40 |
|
|
%define _use_syshunspell 1 |
41 |
|
|
|
42 |
|
|
|
43 |
tv |
445222 |
%define update_channel %{extra}%major |
44 |
dmorgan |
256220 |
|
45 |
blino |
20612 |
Summary: Next generation web browser |
46 |
|
|
Name: firefox |
47 |
fwang |
672314 |
Version: %{major}.1.0 |
48 |
blino |
20612 |
Epoch: %{ff_epoch} |
49 |
doktor5000 |
673450 |
Release: %mkrel 3 |
50 |
blino |
20612 |
License: MPLv1+ |
51 |
|
|
Group: Networking/WWW |
52 |
fwang |
319950 |
Url: http://www.mozilla.org/firefox/organizations/ |
53 |
dmorgan |
256939 |
Source0: ftp://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{realver}/source/%{name}-%{realver}.source.tar.bz2 |
54 |
blino |
20612 |
Source4: %{name}.desktop |
55 |
luigiwalser |
390568 |
Source8: %{name}-searchengines-duckduckgo.xml |
56 |
blino |
20612 |
Source9: kde.js |
57 |
fwang |
133091 |
Patch1: firefox-6.0-lang.patch |
58 |
luigiwalser |
390568 |
Patch2: firefox-vendor.patch |
59 |
tv |
604711 |
Patch4: firefox-28.0-nss-binary.patch |
60 |
blino |
20612 |
# (OpenSuse) add patch to make firefox always use /usr/bin/firefox when "make firefox |
61 |
|
|
# the default web browser" is used fix mdv bug#58784 |
62 |
tv |
655456 |
Patch5: firefox-31.0-appname.patch |
63 |
fwang |
149203 |
Patch6: firefox-7.0-fix-str-fmt.patch |
64 |
dmorgan |
127856 |
Patch8: firefox-disable-check-default-browser.patch |
65 |
|
|
Patch10: firefox-3.5.3-default-mail-handler.patch |
66 |
fwang |
480717 |
# Patches for kde integration of FF |
67 |
|
|
Patch11: https://build.opensuse.org/package/rawsourcefile/mozilla:Factory/MozillaFirefox/mozilla-kde.patch |
68 |
|
|
# (fwang) please modify patch12 with `sed -e 's/MozillaFirefox/firefox/'` to fit our desktop filename |
69 |
|
|
Patch12: https://build.opensuse.org/package/rawsourcefile/mozilla:Factory/MozillaFirefox/firefox-kde.patch |
70 |
luigiwalser |
390568 |
Patch13: firefox-13-fix-nspr-include.patch |
71 |
|
|
Patch37: firefox-17.0-nss-version.patch |
72 |
doktor5000 |
673450 |
# taken from http://hg.mozilla.org/mozilla-central/rev/b0599f36be18 |
73 |
|
|
# try to fix "GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed" msgs |
74 |
|
|
# also see https://bugzilla.mozilla.org/show_bug.cgi?id=672671 |
75 |
|
|
# also see https://bugzilla.mozilla.org/show_bug.cgi?id=833117 |
76 |
|
|
# also see https://bugzilla.gnome.org/show_bug.cgi?id=674885 |
77 |
|
|
Patch38: firefox_glib.patch |
78 |
blino |
20612 |
BuildRequires: gtk+2-devel |
79 |
|
|
BuildRequires: unzip |
80 |
|
|
BuildRequires: zip |
81 |
tv |
618760 |
BuildRequires: pkgconfig(xinerama) |
82 |
|
|
BuildRequires: pkgconfig(xscrnsaver) |
83 |
blino |
20612 |
BuildRequires: libjpeg-devel |
84 |
tv |
618815 |
BuildRequires: pkgconfig(libpng) >= 1.4 |
85 |
tv |
618760 |
BuildRequires: pkgconfig(zlib) |
86 |
|
|
BuildRequires: pkgconfig(gio-2.0) |
87 |
|
|
BuildRequires: pkgconfig(libIDL-2.0) |
88 |
blino |
20612 |
BuildRequires: makedepend |
89 |
tv |
618815 |
BuildRequires: pkgconfig(nss) >= 3.15.2 |
90 |
luigiwalser |
390568 |
BuildRequires: nss-static-devel |
91 |
fwang |
635335 |
BuildRequires: pkgconfig(nspr) >= 4.10.6 |
92 |
tv |
618760 |
BuildRequires: pkgconfig(libstartup-notification-1.0) |
93 |
|
|
BuildRequires: pkgconfig(dbus-glib-1) |
94 |
blino |
20612 |
BuildRequires: python |
95 |
tv |
618760 |
BuildRequires: pkgconfig(sqlite3) >= 3.7.17 |
96 |
rtp |
79029 |
%ifnarch %arm %mips |
97 |
blino |
20612 |
BuildRequires: valgrind |
98 |
oden |
496908 |
%if %{mgaversion} >= 4 |
99 |
fwang |
484107 |
BuildRequires: java-devel |
100 |
|
|
BuildRequires: jpackage-utils |
101 |
oden |
496812 |
%else |
102 |
|
|
BuildRequires: java-rpmbuild |
103 |
|
|
%endif |
104 |
luigiwalser |
390568 |
BuildRequires: yasm >= 1.0.1 |
105 |
rtp |
79029 |
%endif |
106 |
|
|
%ifarch %arm |
107 |
tv |
618760 |
BuildRequires: pkgconfig(libffi) |
108 |
rtp |
79029 |
%endif |
109 |
oden |
496812 |
BuildRequires: rootcerts >= 1:20130411.00 |
110 |
tv |
618760 |
BuildRequires: pkgconfig(xt) |
111 |
blino |
20612 |
%if %_use_syshunspell |
112 |
tv |
618760 |
BuildRequires: pkgconfig(hunspell) |
113 |
blino |
20612 |
%endif |
114 |
|
|
BuildRequires: doxygen |
115 |
|
|
BuildRequires: wget |
116 |
tv |
618760 |
BuildRequires: pkgconfig(libnotify) |
117 |
|
|
BuildRequires: pkgconfig(cairo) >= 1.10 |
118 |
|
|
BuildRequires: pkgconfig(dri) |
119 |
|
|
BuildRequires: pkgconfig(libvpx) |
120 |
rtp |
79029 |
BuildRequires: autoconf2.1 |
121 |
luigiwalser |
390568 |
BuildRequires: libiw-devel |
122 |
dmorgan |
284628 |
BuildRequires: python-virtualenv |
123 |
fwang |
655459 |
BuildRequires: icu-devel |
124 |
tv |
655519 |
BuildRequires: pkgconfig(gstreamer-1.0) |
125 |
|
|
BuildRequires: pkgconfig(gstreamer-allocators-1.0) |
126 |
tv |
604772 |
BuildRequires: pkgconfig(alsa) |
127 |
tv |
604751 |
BuildRequires: pkgconfig(libevent) |
128 |
tv |
604772 |
BuildRequires: pkgconfig(libproxy-1.0) |
129 |
tv |
604755 |
BuildRequires: pkgconfig(libpulse) |
130 |
luigiwalser |
390635 |
BuildRequires: pkgconfig(ogg) |
131 |
tv |
604751 |
BuildRequires: pkgconfig(opus) |
132 |
|
|
BuildRequires: pkgconfig(theoradec) |
133 |
luigiwalser |
390635 |
BuildRequires: pkgconfig(vorbis) |
134 |
doktor5000 |
673450 |
%if "%use_clang" == "1" |
135 |
tv |
655464 |
BuildRequires: clang |
136 |
doktor5000 |
673450 |
%endif |
137 |
lmenut |
329825 |
|
138 |
tv |
445222 |
Provides: %{name} = %{epoch}:%{version} |
139 |
lmenut |
130942 |
Provides: mozilla-firefox = %{epoch}:%{version}-%{release} |
140 |
blino |
20612 |
Provides: webclient |
141 |
lmenut |
130942 |
|
142 |
|
|
Requires: %{mklibname sqlite3_ 0} >= %{sqlite3_version} |
143 |
|
|
Requires: %{mklibname nss 3} >= 2:%{nss_version} |
144 |
|
|
Requires: %{mklibname nspr 4} >= 2:%{nspr_version} |
145 |
blino |
20612 |
Requires: indexhtml |
146 |
luigiwalser |
390568 |
Requires: xdg-utils |
147 |
lmenut |
130942 |
# fixes bug #42096 |
148 |
|
|
Requires: mailcap |
149 |
tv |
675665 |
Recommends: hunspell-en |
150 |
oden |
496908 |
%if %{mgaversion} >= 4 |
151 |
fwang |
485813 |
Requires: %{_lib}notify4 |
152 |
tv |
656603 |
Requires: gstreamer1.0-libav |
153 |
oden |
496908 |
%endif |
154 |
doktor5000 |
492319 |
# make sure our default bookmarks are present |
155 |
|
|
Requires: desktop-common-data |
156 |
doktor5000 |
667194 |
# try to fix mga#1344 (automatic installation of proper -l10n package) |
157 |
|
|
# packages requiring locales-XX will be automatically preferred when locales-XX |
158 |
|
|
# is already installed |
159 |
tv |
675665 |
Recommends: firefox-l10n |
160 |
doktor5000 |
667194 |
|
161 |
tv |
675665 |
Recommends: %{_lib}canberra0 |
162 |
|
|
Recommends: %{_lib}cups2 |
163 |
ahmad |
75375 |
Obsoletes: firefox-ext-weave-sync |
164 |
tv |
492484 |
Obsoletes: firefox-beta < 25 |
165 |
blino |
20612 |
|
166 |
|
|
%description |
167 |
|
|
The award-winning Web browser is now faster, more secure, and fully customizable |
168 |
tv |
45609 |
to your online life. With Firefox(R), we've added powerful new features that |
169 |
blino |
20612 |
make your online experience even better. It is an 'open source' product which is |
170 |
|
|
freely available, and is acquiring a growing proportion of international web |
171 |
|
|
browser usage. |
172 |
|
|
|
173 |
|
|
Firefox claims to offer a more secure web browsing experience than other products, |
174 |
|
|
with better protection against spyware and other Internet-based security threats. |
175 |
|
|
It includes all the standard features of a modern web browser, like Internet |
176 |
|
|
searching, tracking recently visited sites, setting up shortcuts to favourite |
177 |
|
|
sites, customising the software behaviour and so on. Firefox also includes |
178 |
|
|
features like 'tabbed browsing' (opening several web sites as sections within the |
179 |
|
|
same window) and methods for controlling pop-up windows, cookies and downloaded |
180 |
|
|
files. |
181 |
|
|
|
182 |
|
|
%package devel |
183 |
|
|
Summary: Development files for %{name} |
184 |
|
|
Group: Development/Other |
185 |
tv |
492484 |
Obsoletes: firefox-beta-devel < 25 |
186 |
blino |
20612 |
|
187 |
|
|
%description devel |
188 |
|
|
Files and macros mainly for building Firefox extensions. |
189 |
|
|
|
190 |
|
|
%prep |
191 |
tv |
655456 |
%if %{?extra} |
192 |
doktor5000 |
492319 |
%setup -q -n mozilla-%update_channel |
193 |
tv |
445222 |
%else |
194 |
tv |
587039 |
%setup -q -n mozilla-release |
195 |
tv |
445222 |
%endif |
196 |
dmorgan |
116916 |
%patch1 -p1 -b .lang |
197 |
dmorgan |
127856 |
%patch2 -p1 -b .vendor |
198 |
fwang |
223798 |
%patch4 -p0 -b .nss |
199 |
lmenut |
130942 |
%patch5 -p1 -b .appname |
200 |
dmorgan |
252897 |
%patch8 -p1 -b .disable-software-update |
201 |
dmorgan |
127856 |
%patch10 -p1 -b .default-mail-handler |
202 |
tv |
587049 |
#patch11 -p1 -b .mozkde |
203 |
|
|
#patch12 -p1 -b .ffkde |
204 |
blino |
20612 |
|
205 |
dmorgan |
320058 |
%patch37 -p0 |
206 |
doktor5000 |
673451 |
#%patch38 -p1 -b .glib |
207 |
dmorgan |
284628 |
|
208 |
rtp |
79029 |
pushd js/src |
209 |
|
|
autoconf-2.13 |
210 |
|
|
popd |
211 |
|
|
autoconf-2.13 |
212 |
|
|
|
213 |
dmorgan |
127856 |
# needed to regenerate certdata.c |
214 |
|
|
pushd security/nss/lib/ckfw/builtins |
215 |
|
|
perl ./certdata.perl < /etc/pki/tls/mozilla/certdata.txt |
216 |
|
|
popd |
217 |
|
|
|
218 |
blino |
20612 |
%build |
219 |
tv |
492471 |
export MOZCONFIG=$PWD/mozconfig |
220 |
dmorgan |
127856 |
cat << EOF > $MOZCONFIG |
221 |
|
|
mk_add_options MOZILLA_OFFICIAL=1 |
222 |
|
|
mk_add_options BUILD_OFFICIAL=1 |
223 |
|
|
mk_add_options MOZ_MAKE_FLAGS="%{_smp_mflags}" |
224 |
|
|
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj |
225 |
fwang |
132978 |
ac_add_options --host=%{_host} |
226 |
|
|
ac_add_options --target=%{_target_platform} |
227 |
fwang |
205048 |
ac_add_options --enable-optimize="%{optflags}" |
228 |
dmorgan |
127856 |
ac_add_options --prefix="%{_prefix}" |
229 |
|
|
ac_add_options --libdir="%{_libdir}" |
230 |
|
|
ac_add_options --sysconfdir="%{_sysconfdir}" |
231 |
|
|
ac_add_options --mandir="%{_mandir}" |
232 |
|
|
ac_add_options --includedir="%{_includedir}" |
233 |
|
|
ac_add_options --datadir="%{_datadir}" |
234 |
|
|
ac_add_options --with-system-nspr |
235 |
|
|
ac_add_options --with-system-nss |
236 |
|
|
ac_add_options --with-system-zlib |
237 |
fwang |
133280 |
ac_add_options --with-system-libvpx |
238 |
fwang |
467025 |
ac_add_options --with-system-libevent |
239 |
tv |
655464 |
ac_add_options --with-system-harfbuzz |
240 |
fwang |
655459 |
ac_add_options --with-system-icu |
241 |
fwang |
133280 |
ac_add_options --enable-webm |
242 |
lmenut |
130942 |
ac_add_options --enable-gio |
243 |
|
|
ac_add_options --disable-gnomevfs |
244 |
dmorgan |
127856 |
ac_add_options --disable-updater |
245 |
|
|
ac_add_options --disable-tests |
246 |
|
|
ac_add_options --disable-debug |
247 |
|
|
ac_add_options --enable-official-branding |
248 |
|
|
ac_add_options --enable-libproxy |
249 |
oden |
497301 |
%if %{mgaversion} >= 3 |
250 |
fwang |
142362 |
ac_add_options --with-system-png |
251 |
oden |
497301 |
%endif |
252 |
dmorgan |
127856 |
ac_add_options --with-system-jpeg |
253 |
|
|
ac_add_options --enable-system-cairo |
254 |
|
|
ac_add_options --enable-system-sqlite |
255 |
lmenut |
130942 |
ac_add_options --enable-startup-notification |
256 |
fwang |
133282 |
ac_add_options --enable-xinerama |
257 |
dmorgan |
127856 |
ac_add_options --with-distribution-id=org.mageia |
258 |
|
|
ac_add_options --disable-crashreporter |
259 |
dmorgan |
263350 |
ac_add_options --enable-update-channel=%{update_channel} |
260 |
tv |
655519 |
ac_add_options --enable-gstreamer=1.0 |
261 |
rtp |
79029 |
%ifarch %arm |
262 |
|
|
%if "%{_target_cpu}" != "armv7l" |
263 |
dmorgan |
127856 |
ac_add_options --disable-methodjit |
264 |
rtp |
79029 |
%endif |
265 |
dmorgan |
127856 |
ac_add_options --enable-system-ffi |
266 |
rtp |
79029 |
%endif |
267 |
|
|
%ifnarch %arm %mips |
268 |
dmorgan |
127856 |
ac_add_options --with-valgrind |
269 |
|
|
ac_add_options --with-java-include-path=%{java_home}/include |
270 |
|
|
ac_add_options --with-java-bin-path=%{java_home}/bin |
271 |
rtp |
385395 |
%endif |
272 |
luigiwalser |
390635 |
ac_add_options --with-system-ogg |
273 |
dmorgan |
284628 |
ac_add_options --enable-opus |
274 |
luigiwalser |
390635 |
ac_add_options --disable-webrtc |
275 |
tv |
655464 |
# use clang as gcc-4.9 fails to compile ff-31: |
276 |
doktor5000 |
673450 |
%if "%use_clang" == "1" |
277 |
tv |
655464 |
export CC="clang" |
278 |
|
|
export CXX="clang++" |
279 |
doktor5000 |
673450 |
%endif |
280 |
|
|
|
281 |
dmorgan |
127856 |
EOF |
282 |
|
|
|
283 |
rtp |
385395 |
%ifarch %arm |
284 |
|
|
export CFLAGS="-D__ARM_PCS $(echo %{optflags})" |
285 |
|
|
export CXXFLAGS="$CFLAGS" |
286 |
|
|
%endif |
287 |
tv |
655464 |
|
288 |
|
|
# use clang as gcc-4.9 fails to compile ff-31: |
289 |
doktor5000 |
673450 |
%if "%use_clang" == "1" |
290 |
tv |
655464 |
export CC="clang" |
291 |
|
|
export CXX="clang++" |
292 |
doktor5000 |
673450 |
%endif |
293 |
tv |
655464 |
|
294 |
fwang |
133345 |
export LDFLAGS="%ldflags" |
295 |
dmorgan |
127856 |
make -f client.mk build |
296 |
blino |
20612 |
|
297 |
|
|
%install |
298 |
dmorgan |
287524 |
make -C %{_builddir}/obj/browser/installer STRIP=/bin/true MOZ_PKG_FATAL_WARNINGS=0 |
299 |
blino |
20612 |
|
300 |
dmorgan |
127856 |
# Copy files to buildroot |
301 |
|
|
%{__mkdir_p} %{buildroot}%{mozillalibdir} |
302 |
|
|
cp -rf %{_builddir}/obj/dist/firefox/* %{buildroot}%{mozillalibdir} |
303 |
blino |
20612 |
|
304 |
dmorgan |
127856 |
%{__mkdir_p} %{buildroot}%{_bindir} |
305 |
|
|
ln -sf %{mozillalibdir}/firefox %{buildroot}%{_bindir}/firefox |
306 |
|
|
pushd %{buildroot}%{_bindir} |
307 |
|
|
ln -sf firefox mozilla-firefox |
308 |
|
|
popd |
309 |
doktor5000 |
492319 |
mkdir -p %{buildroot}%{mozillalibdir}/browser/defaults/preferences/ |
310 |
|
|
install -m 644 %{SOURCE9} %{buildroot}%{mozillalibdir}/browser/defaults/preferences/kde.js |
311 |
tv |
110649 |
|
312 |
lmenut |
130942 |
# Create and own %_libdir/mozilla/plugins & firefox extensions directories |
313 |
|
|
%{__mkdir_p} %{buildroot}%{pluginsdir} |
314 |
|
|
%{__mkdir_p} %{buildroot}%{_libdir}/mozilla/extensions/%{firefox_appid} |
315 |
|
|
%{__mkdir_p} %{buildroot}%{_datadir}/mozilla/extensions/%{firefox_appid} |
316 |
blino |
20612 |
|
317 |
|
|
# (tpg) desktop entry |
318 |
|
|
%{__mkdir_p} %{buildroot}%{_datadir}/applications |
319 |
|
|
install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/applications/%{name}.desktop |
320 |
|
|
|
321 |
|
|
# (tpg) icons |
322 |
tv |
445230 |
%{__cp} %{buildroot}%{mozillalibdir}/browser/chrome/icons/default/default16.png %{buildroot}/%{mozillalibdir}/browser/icons/ |
323 |
colin |
130660 |
for i in 16 22 24 32 48 256; do |
324 |
blino |
20612 |
%{__mkdir_p} %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps |
325 |
tv |
445243 |
%{__install} -m 644 browser/branding/official/default$i.png %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps/%{name}.png ; |
326 |
blino |
20612 |
done |
327 |
colin |
130660 |
%{__mkdir_p} %{buildroot}{%{_liconsdir},%{_iconsdir},%{_miconsdir}} |
328 |
tv |
445230 |
ln -sf %{mozillalibdir}/browser/chrome/icons/default/default48.png %{buildroot}%{_liconsdir}/%{name}.png |
329 |
|
|
ln -sf %{mozillalibdir}/browser/chrome/icons/default/default32.png %{buildroot}%{_iconsdir}/%{name}.png |
330 |
|
|
ln -sf %{mozillalibdir}/browser/chrome/icons/default/default16.png %{buildroot}%{_miconsdir}/%{name}.png |
331 |
blino |
20612 |
|
332 |
dmorgan |
127856 |
# exclusions |
333 |
|
|
rm -f %{buildroot}%{mozillalibdir}/README.txt |
334 |
|
|
rm -f %{buildroot}%{mozillalibdir}/removed-files |
335 |
|
|
rm -f %{buildroot}%{mozillalibdir}/precomplete |
336 |
|
|
|
337 |
doktor5000 |
170221 |
# this file is only used when creating a new user profile |
338 |
doktor5000 |
492319 |
install -D -m644 browser/app/profile/prefs.js %{buildroot}%{mozillalibdir}/browser/defaults/profile/prefs.js |
339 |
|
|
cat << EOF >> %{buildroot}%{mozillalibdir}/browser/defaults/profile/prefs.js |
340 |
blino |
20612 |
user_pref("browser.EULA.override", true); |
341 |
|
|
user_pref("browser.shell.checkDefaultBrowser", false); |
342 |
rda |
76933 |
user_pref("browser.startup.homepage", "file:///usr/share/indexhtml/index.html"); |
343 |
blino |
20612 |
user_pref("app.update.auto", false); |
344 |
|
|
user_pref("app.update.enabled", false); |
345 |
|
|
user_pref("app.update.autoInstallEnabled", false); |
346 |
lmenut |
130942 |
user_pref("browser.showQuitWarning", true); |
347 |
blino |
20612 |
EOF |
348 |
|
|
|
349 |
fwang |
223187 |
# display icon for Firefox button |
350 |
doktor5000 |
492319 |
%{__mkdir_p} %{buildroot}%{mozillalibdir}/browser/defaults/profile/chrome |
351 |
|
|
cat << EOF > %{buildroot}%{mozillalibdir}/browser/defaults/profile/chrome/userChrome.css |
352 |
fwang |
223187 |
#appmenu-toolbar-button { |
353 |
|
|
list-style-image: url("chrome://branding/content/icon16.png"); |
354 |
|
|
} |
355 |
|
|
EOF |
356 |
|
|
|
357 |
doktor5000 |
170221 |
# files in this directory are read on every startup, and can change/add |
358 |
|
|
# preferences for existing profiles |
359 |
|
|
# extensions.autoDisableScopes is a new preference added in firefox 8 |
360 |
|
|
# it defines "scopes" where newly installed addons are disabled by default |
361 |
|
|
# this is an additive bit field, and the value defaults to 15 (1+2+4+8) |
362 |
|
|
# we need to remove system scope (8) from it so language packs and other addons |
363 |
|
|
# which are installed systemwide won't get marked as 3rd party and disabled |
364 |
|
|
# documentation: http://kb.mozillazine.org/About:config_entries#Extensions. |
365 |
|
|
# or in toolkit/mozapps/extensions/AddonManager.jsm |
366 |
|
|
# we also need to disable the "disable addon selection dialog" |
367 |
doktor5000 |
492319 |
# (doktor5000) - path has changed since FF 21 |
368 |
|
|
# http://mike.kaply.com/2013/04/24/major-changes-coming-in-firefox-21/ |
369 |
|
|
cat << EOF > %{buildroot}%{mozillalibdir}/browser/defaults/preferences/mga.js |
370 |
fwang |
484046 |
pref("general.useragent.locale", "chrome://global/locale/intl.properties"); |
371 |
doktor5000 |
170221 |
pref("extensions.autoDisableScopes", 0); |
372 |
|
|
pref("extensions.shownSelectionUI", true); |
373 |
|
|
EOF |
374 |
dmorgan |
320058 |
# FIXME: Add it back in mga.js when this search engine will be used by default. |
375 |
|
|
# user_pref("browser.search.selectedEngine","duckduckgo.com"); |
376 |
doktor5000 |
170221 |
|
377 |
ahmad |
130766 |
# use the system myspell dictionaries |
378 |
|
|
rm -fr %{buildroot}%{mozillalibdir}/dictionaries |
379 |
fwang |
211783 |
ln -s %{_datadir}/hunspell %{buildroot}%{mozillalibdir}/dictionaries |
380 |
ahmad |
130766 |
|
381 |
lmenut |
130942 |
# (lm) touch and %ghost bookmarks.html to a proper uninstall |
382 |
doktor5000 |
492319 |
touch %{buildroot}%{mozillalibdir}/browser/defaults/profile/bookmarks.html |
383 |
lmenut |
130942 |
|
384 |
blino |
20612 |
%find_lang %{name} |
385 |
|
|
|
386 |
pterjan |
566090 |
# Add stuff to build a plugin to -devel |
387 |
|
|
mkdir -p %{buildroot}%{_includedir} |
388 |
|
|
cp -a dom/plugins/base/np*.h %{buildroot}%{_includedir} |
389 |
|
|
mkdir -p %{buildroot}/%{_datadir}/pkgconfig |
390 |
|
|
cat <<EOF >%{buildroot}/%{_datadir}/pkgconfig/mozilla-plugin.pc |
391 |
|
|
Name: Mozilla Plug-In API |
392 |
|
|
Description: Mozilla Plug-In API |
393 |
|
|
Version: %{version} |
394 |
|
|
Cflags: -I%{_includedir} -DXP_UNIX |
395 |
|
|
EOF |
396 |
|
|
|
397 |
blino |
20612 |
mkdir -p %{buildroot}%{_sys_macros_dir} |
398 |
|
|
cat <<FIN >%{buildroot}%{_sys_macros_dir}/%{name}.macros |
399 |
|
|
# Macros from %{name} package |
400 |
tv |
445222 |
%%firefox_major %{version} |
401 |
blino |
20612 |
%%firefox_epoch %{ff_epoch} |
402 |
tv |
445222 |
%%firefox_version %{version} |
403 |
blino |
20612 |
%%firefox_mozillapath %{mozillalibdir} |
404 |
|
|
%%firefox_pluginsdir %{pluginsdir} |
405 |
tv |
45614 |
%%firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} |
406 |
|
|
%%firefox_extdir %%(if [ "%%_target_cpu" = "noarch" ]; then echo %%{_datadir}/mozilla/extensions/%%{firefox_appid}; else echo %%{_libdir}/mozilla/extensions/%%{firefox_appid}; fi) |
407 |
blino |
20612 |
FIN |
408 |
tv |
445249 |
cp -f %{SOURCE8} %{buildroot}%{mozillalibdir}/browser/searchplugins/duckduckgo.xml |
409 |
blino |
20612 |
|
410 |
ahmad |
130766 |
%pre |
411 |
|
|
if [ -d %{mozillalibdir}/dictionaries ]; then |
412 |
|
|
rm -fr %{mozillalibdir}/dictionaries |
413 |
|
|
fi |
414 |
dmorgan |
127856 |
|
415 |
blino |
20612 |
%post |
416 |
|
|
if [ ! -r /etc/sysconfig/oem ]; then |
417 |
|
|
case `grep META_CLASS /etc/sysconfig/system` in |
418 |
|
|
*powerpack) bookmark="mozilla-powerpack.html" ;; |
419 |
|
|
*desktop) bookmark="mozilla-one.html";; |
420 |
|
|
*) bookmark="mozilla-download.html";; |
421 |
|
|
esac |
422 |
doktor5000 |
492319 |
ln -s -f %_prefix/share/mga/bookmarks/mozilla/$bookmark %{mozillalibdir}/browser/defaults/profile/bookmarks.html |
423 |
blino |
20612 |
fi |
424 |
|
|
|
425 |
|
|
%files -f %{name}.lang |
426 |
|
|
%{_bindir}/%{name} |
427 |
|
|
%{_bindir}/mozilla-firefox |
428 |
|
|
%{_iconsdir}/hicolor/*/apps/*.png |
429 |
colin |
130660 |
%{_miconsdir}/%{name}.png |
430 |
|
|
%{_iconsdir}/%{name}.png |
431 |
|
|
%{_liconsdir}/%{name}.png |
432 |
blino |
20612 |
%{_datadir}/applications/*.desktop |
433 |
tv |
445222 |
%{_libdir}/%{name}-%{version}* |
434 |
doktor5000 |
492319 |
%ghost %{mozillalibdir}/browser/defaults/profile/bookmarks.html |
435 |
blino |
20612 |
%dir %{_libdir}/mozilla |
436 |
|
|
%dir %{pluginsdir} |
437 |
lmenut |
130942 |
%dir %{_libdir}/mozilla/extensions/%{firefox_appid} |
438 |
|
|
%dir %{_datadir}/mozilla/extensions/%{firefox_appid} |
439 |
blino |
20612 |
|
440 |
|
|
%files devel |
441 |
|
|
%{_sys_macros_dir}/%{name}.macros |
442 |
pterjan |
566090 |
%{_includedir}/np*.h |
443 |
|
|
%{_datadir}/pkgconfig/mozilla-plugin.pc |