1 |
# This package is loosely synced with FC |
2 |
|
3 |
%global system_nss 1 |
4 |
%global system_cairo 0 |
5 |
%global system_libicu 0 |
6 |
%global hardened_build 1 |
7 |
%global build_with_clang 0 |
8 |
%ifarch x86_64 aarch64 |
9 |
%global build_with_clang 1 |
10 |
%endif |
11 |
%global build_with_pgo 0 |
12 |
%global use_bundled_cbindgen 1 |
13 |
|
14 |
# (tpg) MOZILLA_FIVE_HOME |
15 |
%global mozillalibdir %{_libdir}/%{name} |
16 |
%global pluginsdir %{_libdir}/mozilla/plugins |
17 |
%global firefox_channel beta |
18 |
|
19 |
%define prerel b3 |
20 |
|
21 |
# Build as a debug package? |
22 |
%global debug_build 0 |
23 |
#%if !0%{?build_with_clang} |
24 |
#%global disable_elfhack 1 |
25 |
#%endif |
26 |
|
27 |
# Minimal required versions |
28 |
%global cairo_version 1.13.1 |
29 |
%global freetype_version 2.1.9 |
30 |
%global libnotify_version 0.7.0 |
31 |
%global libvpx_version 1.5.0-3 |
32 |
|
33 |
# this seems fragile, so require the exact version or later (#58754) |
34 |
%global nspr_version 4.19 |
35 |
%global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) |
36 |
%global nss_version 3.40 |
37 |
%global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) |
38 |
%global sqlite_version 3.22.0 |
39 |
# The actual sqlite version (see #480989): |
40 |
%global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) |
41 |
|
42 |
%global mozappdir %{_libdir}/%{name} |
43 |
|
44 |
Summary: Mozilla Firefox Web browser |
45 |
Name: firefox-beta |
46 |
Version: 67.0 |
47 |
Release: %mkrel 0.%{prerel} |
48 |
Provides: %{name} = %{version}-0.%{prerel} |
49 |
URL: https://www.mozilla.org/firefox/ |
50 |
License: MPLv1.1 or GPLv2+ or LGPLv2+ |
51 |
Group: Networking/WWW |
52 |
ExclusiveArch: %ix86 x86_64 |
53 |
Source0: https://ftp.mozilla.org/pub/firefox/releases/%{version}%prerel/source/firefox-%{version}%prerel.source.tar.xz |
54 |
Source2: cbindgen-vendor.tar.xz |
55 |
Source4: %{name}.desktop |
56 |
Source8: firefox-searchengines-duckduckgo.xml |
57 |
# From Fedora: |
58 |
Source10: firefox-mozconfig |
59 |
Source12: firefox-mageia-default-prefs.js |
60 |
Source24: mozilla-api-key |
61 |
Source26: distribution.ini |
62 |
Source27: google-api-key |
63 |
# To generate cbindgen-vendor.tar.xz |
64 |
Source100: gen_cbindgen-vendor.sh |
65 |
# Fedora patches: |
66 |
Patch3: mozilla-build-arm.patch |
67 |
Patch27: mozilla-1335250.patch |
68 |
# Always feel lucky for unsupported platforms: |
69 |
# https://bugzilla.mozilla.org/show_bug.cgi?id=1347128 |
70 |
Patch37: build-jit-atomic-always-lucky.patch |
71 |
Patch40: build-aarch64-skia.patch |
72 |
Patch41: build-disable-elfhack.patch |
73 |
Patch42: prio-nss-build.patch |
74 |
|
75 |
#ARM run-time patch |
76 |
Patch226: rhbz-1354671.patch |
77 |
|
78 |
# Upstream patches |
79 |
Patch407: mozilla-1348576.patch |
80 |
Patch410: mozilla-1321521.patch |
81 |
Patch411: mozilla-1321521-2.patch |
82 |
Patch412: mozilla-1337988.patch |
83 |
Patch413: mozilla-1353817.patch |
84 |
|
85 |
# Mageia patches: |
86 |
Patch1000: firefox-lang.patch |
87 |
Patch1002: firefox-vendor.patch |
88 |
Patch1003: firefox-disable-check-default-browser.patch |
89 |
# (OpenSuse) add patch to make firefox always use /usr/bin/firefox when "make firefox |
90 |
# the default web browser" is used fix mdv bug#58784 |
91 |
Patch1005: firefox-38.0-appname.patch |
92 |
Patch1009: fix-build.diff |
93 |
|
94 |
%if %{?system_nss} |
95 |
BuildRequires: pkgconfig(nspr) >= %{nspr_version} |
96 |
BuildRequires: pkgconfig(nss) >= %{nss_version} |
97 |
BuildRequires: nss-static-devel >= %{nss_version} |
98 |
%endif |
99 |
%if %{?system_cairo} |
100 |
BuildRequires: pkgconfig(cairo) >= %{cairo_version} |
101 |
%endif |
102 |
BuildRequires: pkgconfig(libpng) |
103 |
BuildRequires: libjpeg-devel |
104 |
BuildRequires: zip |
105 |
BuildRequires: bzip2-devel |
106 |
BuildRequires: pkgconfig(zlib) |
107 |
BuildRequires: pkgconfig(libIDL-2.0) |
108 |
BuildRequires: pkgconfig(gtk+-3.0) |
109 |
BuildRequires: pkgconfig(gtk+-2.0) |
110 |
BuildRequires: pkgconfig(krb5) |
111 |
BuildRequires: pkgconfig(pango) |
112 |
BuildRequires: pkgconfig(freetype2) >= %{freetype_version} |
113 |
BuildRequires: pkgconfig(xt) |
114 |
BuildRequires: pkgconfig(xrender) |
115 |
BuildRequires: pkgconfig(hunspell) |
116 |
BuildRequires: pkgconfig(libstartup-notification-1.0) |
117 |
BuildRequires: pkgconfig(libnotify) >= %{libnotify_version} |
118 |
BuildRequires: pkgconfig(dri) |
119 |
BuildRequires: dbus-glib-devel |
120 |
BuildRequires: pkgconfig(libvpx) >= %{libvpx_version} |
121 |
BuildRequires: autoconf2.1 |
122 |
BuildRequires: pkgconfig(libpulse) |
123 |
BuildRequires: pkgconfig(icu-i18n) >= 58.0 |
124 |
BuildRequires: pkgconfig(gconf-2.0) |
125 |
#BuildRequires: valgrind-devel |
126 |
BuildRequires: nasm |
127 |
BuildRequires: yasm |
128 |
BuildRequires: libatomic-devel |
129 |
BuildRequires: clang-devel |
130 |
BuildRequires: llvm |
131 |
BuildRequires: llvm-devel |
132 |
BuildRequires: clang |
133 |
%if 0%{?build_with_clang} |
134 |
BuildRequires: lld |
135 |
%endif |
136 |
BuildRequires: nodejs |
137 |
%if %{?system_nss} |
138 |
Requires: %{mklibname nss 3} >= 2:%{nss_build_version} |
139 |
Requires: %{mklibname nspr 4} >= 2:%{nspr_build_version} |
140 |
%endif |
141 |
BuildRequires: pkgconfig(libavcodec) |
142 |
BuildRequires: python2-devel |
143 |
BuildRequires: pkgconfig(sqlite3) >= %{sqlite_version} |
144 |
Requires: %{mklibname sqlite3_ 0} >= %{sqlite_build_version} |
145 |
BuildRequires: pkgconfig(libffi) |
146 |
BuildRequires: rootcerts >= 1:20130411.00 |
147 |
BuildRequires: doxygen |
148 |
BuildRequires: libiw-devel |
149 |
BuildRequires: python-setuptools |
150 |
BuildRequires: python-virtualenv |
151 |
BuildRequires: pkgconfig(libproxy-1.0) |
152 |
Obsoletes: firefox-aurora < %{version} |
153 |
|
154 |
BuildRequires: rust |
155 |
BuildRequires: cargo |
156 |
|
157 |
Provides: webclient |
158 |
|
159 |
#Requires: indexhtml |
160 |
Requires: xdg-utils |
161 |
# fixes bug #42096 |
162 |
Requires: mailcap |
163 |
Recommends: hunspell-en |
164 |
Requires: %{_lib}notify4 |
165 |
# make sure our default bookmarks are present |
166 |
Requires: desktop-common-data |
167 |
Recommends: %{_lib}canberra0 |
168 |
Recommends: %{_lib}cups2 |
169 |
%define ff_deps myspell-en_US |
170 |
Recommends: %{ff_deps} |
171 |
|
172 |
%description |
173 |
Mozilla Firefox is an open-source web browser, designed for standards |
174 |
compliance, performance and portability. |
175 |
|
176 |
%package devel |
177 |
Summary: Development files for %{name} |
178 |
Group: Development/Other |
179 |
Obsoletes: firefox-aurora-devel < %{version} |
180 |
|
181 |
%description devel |
182 |
Files and macros mainly for building Firefox extensions. |
183 |
|
184 |
%prep |
185 |
%setup -qn firefox-%{version} |
186 |
# Fedora patches: |
187 |
%patch40 -p1 |
188 |
#patch37 -p1 -b .jit-atomic-lucky |
189 |
%if 0%{?disable_elfhack} |
190 |
%patch41 -p1 -b .disable-elfhack |
191 |
%endif |
192 |
%patch3 -p1 -b .arm |
193 |
#patch42 -p1 -b .nss-build |
194 |
%ifarch aarch64 |
195 |
%patch226 -p1 -b .1354671 |
196 |
%endif |
197 |
|
198 |
%patch413 -p1 -b .1353817 |
199 |
|
200 |
|
201 |
# Mageia patches: |
202 |
%patch1000 -p1 -b .lang |
203 |
#patch1002 -p1 -b .vendor |
204 |
%patch1003 -p1 -b .defaultbrowser |
205 |
%patch1009 -p1 -b .fbts |
206 |
|
207 |
# needed to regenerate certdata.c |
208 |
#pushd ./security/nss/lib/ckfw/builtins |
209 |
#perl ./certdata.perl < /etc/pki/tls/mozilla/certdata.txt |
210 |
#popd |
211 |
|
212 |
%{__rm} -f .mozconfig |
213 |
%{__cp} %{SOURCE10} .mozconfig |
214 |
# Mageia specific options: |
215 |
cat << EOF >> .mozconfig |
216 |
ac_add_options --enable-libproxy |
217 |
ac_add_options --with-system-png |
218 |
ac_add_options --with-distribution-id=org.mageia |
219 |
#ac_add_options --with-valgrind |
220 |
EOF |
221 |
|
222 |
# Options shared with FC: |
223 |
echo "ac_add_options --enable-default-toolkit=cairo-gtk3" >> .mozconfig |
224 |
echo "ac_add_options --enable-official-branding" >> .mozconfig |
225 |
|
226 |
%{__cp} %{SOURCE24} mozilla-api-key |
227 |
%{__cp} %{SOURCE27} google-api-key |
228 |
|
229 |
%if %{?system_nss} |
230 |
echo "ac_add_options --with-system-nspr" >> .mozconfig |
231 |
echo "ac_add_options --with-system-nss" >> .mozconfig |
232 |
%else |
233 |
echo "ac_add_options --without-system-nspr" >> .mozconfig |
234 |
echo "ac_add_options --without-system-nss" >> .mozconfig |
235 |
%endif |
236 |
|
237 |
echo "ac_add_options --enable-system-sqlite" >> .mozconfig |
238 |
|
239 |
%if %{?system_cairo} |
240 |
echo "ac_add_options --enable-system-cairo" >> .mozconfig |
241 |
%else |
242 |
echo "ac_add_options --disable-system-cairo" >> .mozconfig |
243 |
%endif |
244 |
|
245 |
echo "ac_add_options --enable-system-ffi" >> .mozconfig |
246 |
|
247 |
%ifarch %{arm} |
248 |
echo "ac_add_options --disable-elf-hack" >> .mozconfig |
249 |
%endif |
250 |
|
251 |
%if %{?debug_build} |
252 |
echo "ac_add_options --enable-debug" >> .mozconfig |
253 |
echo "ac_add_options --disable-optimize" >> .mozconfig |
254 |
%else |
255 |
%global optimize_flags "none" |
256 |
%ifarch armv7hl |
257 |
# ARMv7 needs that (rhbz#1426850) |
258 |
%global optimize_flags "-g -O2 -fno-schedule-insns" |
259 |
# Disable libaom due to rhbz#1641623 |
260 |
echo "ac_add_options --disable-av1" >> .mozconfig |
261 |
%endif |
262 |
%ifarch ppc64le aarch64 |
263 |
%global optimize_flags "-g -O2" |
264 |
%endif |
265 |
%if %{optimize_flags} != "none" |
266 |
echo 'ac_add_options --enable-optimize=%{?optimize_flags}' >> .mozconfig |
267 |
%else |
268 |
echo 'ac_add_options --enable-optimize' >> .mozconfig |
269 |
%endif |
270 |
echo "ac_add_options --disable-debug" >> .mozconfig |
271 |
%endif |
272 |
|
273 |
# Second arches fail to start with jemalloc enabled |
274 |
%ifnarch %{ix86} x86_64 |
275 |
echo "ac_add_options --disable-jemalloc" >> .mozconfig |
276 |
%endif |
277 |
|
278 |
%ifnarch %{ix86} x86_64 |
279 |
echo "ac_add_options --disable-webrtc" >> .mozconfig |
280 |
%endif |
281 |
|
282 |
echo "ac_add_options --disable-crashreporter" >> .mozconfig |
283 |
|
284 |
echo "ac_add_options --with-system-jpeg" >> .mozconfig |
285 |
|
286 |
echo "ac_add_options --without-system-libvpx" >> .mozconfig |
287 |
|
288 |
%if %{?system_libicu} |
289 |
echo "ac_add_options --with-system-icu" >> .mozconfig |
290 |
%else |
291 |
echo "ac_add_options --without-system-icu" >> .mozconfig |
292 |
%endif |
293 |
|
294 |
%if 0%{?use_bundled_cbindgen} |
295 |
|
296 |
mkdir -p my_rust_vendor |
297 |
cd my_rust_vendor |
298 |
%{__tar} xf %{SOURCE2} |
299 |
cd - |
300 |
mkdir -p .cargo |
301 |
cat > .cargo/config <<EOL |
302 |
[source.crates-io] |
303 |
replace-with = "vendored-sources" |
304 |
|
305 |
[source.vendored-sources] |
306 |
directory = "`pwd`/my_rust_vendor" |
307 |
EOL |
308 |
|
309 |
env CARGO_HOME=.cargo cargo install cbindgen |
310 |
%endif |
311 |
|
312 |
%build |
313 |
%if 0%{?use_bundled_cbindgen} |
314 |
export PATH=`pwd`/.cargo/bin:$PATH |
315 |
%endif |
316 |
|
317 |
# -fpermissive is needed to build with gcc 4.6+ which has become stricter |
318 |
# |
319 |
# Mozilla builds with -Wall with exception of a few warnings which show up |
320 |
# everywhere in the code; so, don't override that. |
321 |
# |
322 |
# Disable C++ exceptions since Mozilla code is not exception-safe |
323 |
# |
324 |
MOZ_OPT_FLAGS=$(echo "%{optflags}" | %{__sed} -e 's/-Wall//') |
325 |
#rhbz#1037063 |
326 |
# -Werror=format-security causes build failures when -Wno-format is explicitly given |
327 |
# for some sources |
328 |
# Explicitly force the hardening flags for Firefox so it passes the checksec test; |
329 |
# See also https://fedoraproject.org/wiki/Changes/Harden_All_Packages |
330 |
MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security" |
331 |
# Disable null pointer gcc6 optimization in gcc6 (rhbz#1328045) |
332 |
MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fno-delete-null-pointer-checks" |
333 |
# Use hardened build? |
334 |
%if 0%{?hardened_build} |
335 |
MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fPIC -Wl,-z,relro -Wl,-z,now" |
336 |
%endif |
337 |
%if %{?debug_build} |
338 |
MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') |
339 |
%endif |
340 |
%ifnarch x86_64 |
341 |
MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') |
342 |
# If MOZ_DEBUG_FLAGS is empty, firefox's build will default it to "-g" which |
343 |
# overrides the -g1 from line above and breaks building on s390 |
344 |
# (OOM when linking, rhbz#1238225) |
345 |
export MOZ_DEBUG_FLAGS=" " |
346 |
%endif |
347 |
%if !0%{?build_with_clang} |
348 |
%ifarch s390 %{arm} ppc aarch64 %{ix86} |
349 |
MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" |
350 |
%endif |
351 |
%endif |
352 |
%ifarch %{arm} %ix86 |
353 |
export RUSTFLAGS="-Cdebuginfo=0" |
354 |
%endif |
355 |
export CFLAGS=$MOZ_OPT_FLAGS |
356 |
export CXXFLAGS=$MOZ_OPT_FLAGS |
357 |
export LDFLAGS=$MOZ_LINK_FLAGS |
358 |
|
359 |
export PREFIX='%{_prefix}' |
360 |
export LIBDIR='%{_libdir}' |
361 |
|
362 |
%if 0%{?build_with_clang} |
363 |
export LLVM_PROFDATA="llvm-profdata" |
364 |
#export AR="llvm-ar" |
365 |
#export NM="llvm-nm" |
366 |
export RANLIB="llvm-ranlib" |
367 |
echo "ac_add_options --enable-linker=lld" >> .mozconfig |
368 |
%else |
369 |
export CC=gcc |
370 |
export CXX=g++ |
371 |
#echo "ac_add_options --enable-linker=gold" >> .mozconfig |
372 |
%endif |
373 |
%if 0%{?build_with_pgo} |
374 |
echo "ac_add_options MOZ_PGO=1" >> .mozconfig |
375 |
%endif |
376 |
|
377 |
MOZ_SMP_FLAGS=-j1 |
378 |
# On x86_64 architectures, Mozilla can build up to 4 jobs at once in parallel, |
379 |
# however builds tend to fail on other arches when building in parallel. |
380 |
%ifarch %{ix86} %{arm} |
381 |
[ -z "$RPM_BUILD_NCPUS" ] && \ |
382 |
RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" |
383 |
[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 |
384 |
%endif |
385 |
%ifarch x86_64 ppc ppc64 ppc64le aarch64 |
386 |
[ -z "$RPM_BUILD_NCPUS" ] && \ |
387 |
RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" |
388 |
[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 |
389 |
[ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4 |
390 |
%ifnarch aarch64 |
391 |
[ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8 |
392 |
%endif |
393 |
%endif |
394 |
|
395 |
export MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" |
396 |
export MOZ_SERVICES_SYNC="1" |
397 |
export STRIP=/bin/true |
398 |
./mach build |
399 |
|
400 |
%install |
401 |
make -C objdir/browser/installer STRIP=/bin/true MOZ_PKG_FATAL_WARNINGS=0 |
402 |
|
403 |
# Copy files to buildroot |
404 |
%{__mkdir_p} %{buildroot}%{mozillalibdir} |
405 |
cp -rf objdir/dist/firefox/* %{buildroot}%{mozillalibdir} |
406 |
|
407 |
%{__mkdir_p} %{buildroot}%{_bindir} |
408 |
ln -sf %{mozillalibdir}/firefox %{buildroot}%{_bindir}/firefox-%{firefox_channel} |
409 |
mkdir -p %{buildroot}%{mozillalibdir}/browser/defaults/preferences/ |
410 |
|
411 |
# (tpg) desktop entry |
412 |
%{__mkdir_p} %{buildroot}%{_datadir}/applications |
413 |
install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/applications/firefox-%{firefox_channel}.desktop |
414 |
|
415 |
# (tpg) icons |
416 |
#cp %{buildroot}%{mozillalibdir}/browser/chrome/icons/default/default16.png %{buildroot}/%{mozillalibdir}/browser/icons/ |
417 |
for i in 16 22 24 32 48 256; do |
418 |
%{__mkdir_p} %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps |
419 |
%{__install} -m 644 browser/branding/official/default$i.png %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps/firefox-%{firefox_channel}.png ; |
420 |
done |
421 |
|
422 |
# exclusions |
423 |
rm -f %{buildroot}%{mozillalibdir}/README.txt |
424 |
rm -f %{buildroot}%{mozillalibdir}/removed-files |
425 |
rm -f %{buildroot}%{mozillalibdir}/precomplete |
426 |
|
427 |
# Default |
428 |
%{__cp} %{SOURCE12} %{buildroot}%{mozillalibdir}/browser/defaults/preferences |
429 |
|
430 |
# display icon for Firefox button |
431 |
%{__mkdir_p} %{buildroot}%{mozillalibdir}/browser/defaults/profile/chrome |
432 |
cat << EOF > %{buildroot}%{mozillalibdir}/browser/defaults/profile/chrome/userChrome.css |
433 |
#appmenu-toolbar-button { |
434 |
list-style-image: url("chrome://branding/content/icon16.png"); |
435 |
} |
436 |
EOF |
437 |
|
438 |
# files in this directory are read on every startup, and can change/add |
439 |
# preferences for existing profiles |
440 |
# extensions.autoDisableScopes is a new preference added in firefox 8 |
441 |
# it defines "scopes" where newly installed addons are disabled by default |
442 |
# this is an additive bit field, and the value defaults to 15 (1+2+4+8) |
443 |
# we need to remove system scope (8) from it so language packs and other addons |
444 |
# which are installed systemwide won't get marked as 3rd party and disabled |
445 |
# documentation: http://kb.mozillazine.org/About:config_entries#Extensions. |
446 |
# or in toolkit/mozapps/extensions/AddonManager.jsm |
447 |
# we also need to disable the "disable addon selection dialog" |
448 |
%{__mkdir_p} %{buildroot}%{mozillalibdir}/browser/defaults/preferences |
449 |
cat << EOF > %{buildroot}%{mozillalibdir}/browser/defaults/preferences/mga.js |
450 |
pref("general.useragent.locale", "chrome://global/locale/intl.properties"); |
451 |
pref("extensions.autoDisableScopes", 0); |
452 |
pref("extensions.shownSelectionUI", true); |
453 |
EOF |
454 |
# FIXME: Add it back in mga.js when this search engine will be used by default. |
455 |
# user_pref("browser.search.selectedEngine","duckduckgo.com"); |
456 |
|
457 |
# Use the system hunspell dictionaries |
458 |
rm -fr %{buildroot}%{mozillalibdir}/dictionaries |
459 |
ln -s %{_datadir}/hunspell %{buildroot}%{mozillalibdir}/dictionaries |
460 |
|
461 |
# Add distribution.ini |
462 |
%{__mkdir_p} %{buildroot}%{mozappdir}/distribution |
463 |
%{__cp} %{SOURCE26} %{buildroot}%{mozappdir}/distribution |
464 |
|
465 |
# (lm) touch and %ghost bookmarks.html to a proper uninstall |
466 |
touch %{buildroot}%{mozillalibdir}/browser/defaults/profile/bookmarks.html |
467 |
|
468 |
mkdir -p %{buildroot}%{_sys_macros_dir} |
469 |
cat <<FIN >%{buildroot}%{_sys_macros_dir}/%{name}.macros |
470 |
# Macros from %{name} package |
471 |
%%firefox_major %{version} |
472 |
%%firefox_version %{version} |
473 |
%%firefox_mozillapath %{mozillalibdir} |
474 |
%%firefox_pluginsdir %{pluginsdir} |
475 |
%%firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} |
476 |
%%firefox_extdir %%(if [ "%%_target_cpu" = "noarch" ]; then echo %%{_datadir}/mozilla/extensions/%%{firefox_appid}; else echo %%{_libdir}/mozilla/extensions/%%{firefox_appid}; fi) |
477 |
FIN |
478 |
# temp build fix: |
479 |
mkdir -p %{buildroot}%{mozillalibdir}/browser/searchplugins |
480 |
cp -f %{SOURCE8} %{buildroot}%{mozillalibdir}/browser/searchplugins/duckduckgo.xml |
481 |
|
482 |
%pre |
483 |
if [ -d %{mozillalibdir}/dictionaries ]; then |
484 |
rm -fr %{mozillalibdir}/dictionaries |
485 |
fi |
486 |
|
487 |
%post |
488 |
if [ ! -r /etc/sysconfig/oem ]; then |
489 |
case `grep META_CLASS /etc/sysconfig/system` in |
490 |
*powerpack) bookmark="mozilla-powerpack.html" ;; |
491 |
*desktop) bookmark="mozilla-one.html";; |
492 |
*) bookmark="mozilla-download.html";; |
493 |
esac |
494 |
ln -s -f %{_prefix}/share/mga/bookmarks/mozilla/$bookmark %{mozillalibdir}/browser/defaults/profile/bookmarks.html |
495 |
fi |
496 |
|
497 |
%files |
498 |
%{_bindir}/firefox-%{firefox_channel} |
499 |
%{_iconsdir}/hicolor/*/apps/*.png |
500 |
%{_datadir}/applications/*.desktop |
501 |
%{_libdir}/%{name}* |
502 |
%ghost %{mozillalibdir}/browser/defaults/profile/bookmarks.html |
503 |
|
504 |
%files devel |
505 |
%{_sys_macros_dir}/%{name}.macros |