1 |
# WARNING: This package is synced with FC |
2 |
|
3 |
# |
4 |
# WARNING, READ FIRST: |
5 |
# |
6 |
# This is a special package that needs special treatment. Due to the amount of |
7 |
# security updates it needs, it's common to ship new upstream versions instead of patching. |
8 |
# That means this package MUST be BUILDABLE for stable official releases. |
9 |
# This also means only STABLE upstream releases, NO betas. |
10 |
# This is a discussed topic. Please, do not flame it again. |
11 |
|
12 |
# Stay on ESR for stable releases and for cauldron before mageia 5. |
13 |
# /!\ Do not update more than FF 45 for mga6. /!\ |
14 |
# ff 45 -> 52 -> 59 |
15 |
|
16 |
# Tentative workaround for BS cc1plus kill issue (09/2016) |
17 |
#define _smp_ncpus_max 8 |
18 |
|
19 |
%define toolkit_gtk3 1 |
20 |
|
21 |
# Use system cairo? |
22 |
%define system_cairo 0 |
23 |
|
24 |
%define major 45 |
25 |
%define ff_epoch 0 |
26 |
# (tpg) set version HERE !!! |
27 |
%define extra esr |
28 |
%define realver %{version}%extra |
29 |
%define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} |
30 |
|
31 |
# (tpg) MOZILLA_FIVE_HOME |
32 |
%define mozillalibdir %{_libdir}/%{name} |
33 |
%define pluginsdir %{_libdir}/mozilla/plugins |
34 |
|
35 |
# libxul.so is provided by libxulrunnner2.0. |
36 |
%global __requires_exclude libxul.so |
37 |
|
38 |
# Minimal required versions |
39 |
%global cairo_version 1.13.1 |
40 |
%global freetype_version 2.1.9 |
41 |
%global libnotify_version 0.7.0 |
42 |
%global libvpx_version 1.5.0 |
43 |
|
44 |
# this seems fragile, so require the exact version or later (#58754) |
45 |
%global nspr_version 4.12 |
46 |
%global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) |
47 |
%global nss_version 3.21.1 |
48 |
%global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) |
49 |
%global sqlite_version 3.8.8.2 |
50 |
# The actual sqlite version (see #480989): |
51 |
%global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) |
52 |
|
53 |
|
54 |
%define update_channel %{extra}%major |
55 |
|
56 |
Summary: Mozilla Firefox Web browser |
57 |
Name: firefox |
58 |
Version: %{major}.8.0 |
59 |
Epoch: %{ff_epoch} |
60 |
Release: %mkrel 3 |
61 |
License: MPLv1.1 or GPLv2+ or LGPLv2+ |
62 |
Group: Networking/WWW |
63 |
Url: https://www.mozilla.org/firefox/organizations/ |
64 |
Source0: https://ftp.mozilla.org/pub/firefox/releases/%{realver}/source/%{name}-%{realver}.source.tar.xz |
65 |
Source4: %{name}.desktop |
66 |
Source8: %{name}-searchengines-duckduckgo.xml |
67 |
Source9: kde.js |
68 |
# From Fedora: |
69 |
Source10: firefox-mozconfig |
70 |
|
71 |
# Fedora patches: |
72 |
Patch3: mozilla-build-arm.patch |
73 |
Patch24: firefox-debug.patch |
74 |
Patch222: firefox-gtk3-20.patch |
75 |
Patch223: rhbz-1291190-appchooser-crash.patch |
76 |
|
77 |
# Upstream patches |
78 |
Patch301: mozilla-1205199.patch |
79 |
Patch302: mozilla-1228540.patch |
80 |
Patch303: mozilla-1228540-1.patch |
81 |
Patch304: mozilla-1253216.patch |
82 |
|
83 |
# Gtk3 upstream patches |
84 |
|
85 |
# Fix Skia Neon stuff on AArch64 |
86 |
# Update https://bugzilla.mozilla.org/show_bug.cgi?id=1142056 |
87 |
# when removed |
88 |
Patch500: aarch64-fix-skia.patch |
89 |
|
90 |
# Mageia patches: |
91 |
Patch1000: firefox-lang.patch |
92 |
# (OpenSuse) add patch to make firefox always use /usr/bin/firefox when "make firefox |
93 |
# the default web browser" is used fix mdv bug#58784 |
94 |
Patch1005: firefox-38.0-appname.patch |
95 |
Patch1006: firefox-7.0-fix-str-fmt.patch |
96 |
Patch1008: firefox-disable-check-default-browser.patch |
97 |
Patch1010: firefox-3.5.3-default-mail-handler.patch |
98 |
# Patches for kde integration of FF |
99 |
# (doktor5000) if the patches need updating, grab both from the branch corresponding with the current firefox version at |
100 |
# http://www.rosenauer.org/hg/mozilla |
101 |
Patch1011: http://www.rosenauer.org/hg/mozilla/file/tip/mozilla-kde.patch |
102 |
# (fwang) please modify patch12 with `sed -e 's/MozillaFirefox/firefox/'` to fit our desktop filename |
103 |
Patch1012: http://www.rosenauer.org/hg/mozilla/file/tip/firefox-kde.patch |
104 |
|
105 |
Patch1037: firefox-38.0-nss-version.patch |
106 |
Patch1038: firefox-38.1-freetype-2.6-compatibility.patch |
107 |
Patch1039: firefox-43.4.0-optimize-dont-force-O3.patch |
108 |
|
109 |
BuildRequires: pkgconfig(nspr) >= %{nspr_version} |
110 |
BuildRequires: pkgconfig(nss) >= %{nss_version} |
111 |
BuildRequires: nss-static-devel >= %{nss_version} |
112 |
%if %{?system_cairo} |
113 |
BuildRequires: pkgconfig(cairo) >= %{cairo_version} |
114 |
%endif |
115 |
BuildRequires: pkgconfig(xinerama) |
116 |
BuildRequires: pkgconfig(xscrnsaver) |
117 |
BuildRequires: pkgconfig(libpng) |
118 |
BuildRequires: libjpeg-devel |
119 |
BuildRequires: zip |
120 |
BuildRequires: bzip2-devel |
121 |
BuildRequires: pkgconfig(zlib) |
122 |
BuildRequires: pkgconfig(libIDL-2.0) |
123 |
%if %{toolkit_gtk3} |
124 |
BuildRequires: pkgconfig(gtk+-3.0) |
125 |
%endif |
126 |
BuildRequires: pkgconfig(gtk+-2.0) |
127 |
BuildRequires: pkgconfig(pango) |
128 |
BuildRequires: pkgconfig(xt) |
129 |
BuildRequires: pkgconfig(hunspell) |
130 |
BuildRequires: pkgconfig(libstartup-notification-1.0) |
131 |
BuildRequires: pkgconfig(alsa) |
132 |
BuildRequires: pkgconfig(libnotify) >= %{libnotify_version} |
133 |
BuildRequires: pkgconfig(dri) |
134 |
BuildRequires: pkgconfig(libvpx) >= %{libvpx_version} |
135 |
BuildRequires: autoconf2.1 |
136 |
BuildRequires: pkgconfig(libpulse) |
137 |
BuildRequires: pkgconfig(icu-i18n) |
138 |
BuildRequires: pkgconfig(gconf-2.0) |
139 |
BuildRequires: yasm |
140 |
Requires: %{mklibname nss 3} >= 2:%{nss_build_version} |
141 |
Requires: %{mklibname nspr 4} >= 2:%{nspr_build_version} |
142 |
BuildRequires: pkgconfig(gstreamer-1.0) |
143 |
BuildRequires: pkgconfig(gstreamer-allocators-1.0) |
144 |
BuildRequires: python |
145 |
BuildRequires: pkgconfig(sqlite3) >= %{sqlite_version} |
146 |
Requires: %{mklibname sqlite3_ 0} >= %{sqlite_build_version} |
147 |
BuildRequires: pkgconfig(libffi) |
148 |
BuildRequires: rootcerts >= 1:20130411.00 |
149 |
BuildRequires: doxygen |
150 |
BuildRequires: libiw-devel |
151 |
BuildRequires: python-virtualenv |
152 |
BuildRequires: pkgconfig(libevent) |
153 |
BuildRequires: pkgconfig(libproxy-1.0) |
154 |
|
155 |
Provides: %{name} = %{epoch}:%{version} |
156 |
Provides: mozilla-firefox = %{epoch}:%{version}-%{release} |
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 |
Requires: gstreamer1.0-libav |
166 |
# make sure our default bookmarks are present |
167 |
Requires: desktop-common-data |
168 |
# try to fix mga#1344 (automatic installation of proper -l10n package) |
169 |
# packages requiring locales-XX will be automatically preferred when locales-XX |
170 |
# is already installed |
171 |
Recommends: firefox-l10n |
172 |
|
173 |
Recommends: %{_lib}canberra0 |
174 |
Recommends: %{_lib}cups2 |
175 |
Obsoletes: firefox-ext-weave-sync |
176 |
Obsoletes: firefox-beta < 25 |
177 |
|
178 |
%description |
179 |
Mozilla Firefox is an open-source web browser, designed for standards |
180 |
compliance, performance and portability. |
181 |
|
182 |
%package devel |
183 |
Summary: Development files for %{name} |
184 |
Group: Development/Other |
185 |
Obsoletes: firefox-beta-devel < 25 |
186 |
|
187 |
%description devel |
188 |
Files and macros mainly for building Firefox extensions. |
189 |
|
190 |
%prep |
191 |
%if %{?extra} |
192 |
#setup -q -n mozilla-%{update_channel} |
193 |
%setup -q -n firefox-%{version}esr |
194 |
%else |
195 |
#setup -q -n mozilla-release |
196 |
%setup -q -n %name-%version |
197 |
%endif |
198 |
# Fedora patches: |
199 |
%patch24 -p1 -b .debug |
200 |
%patch3 -p2 -b .arm |
201 |
%patch223 -p1 -b .appchooser-crash |
202 |
%patch301 -p1 -b .1205199 |
203 |
%patch302 -p1 -b .1228540 |
204 |
%patch303 -p1 -b .1228540-1 |
205 |
%patch304 -p2 -b .1253216 |
206 |
%patch222 -p1 -b .gtk3-20 |
207 |
|
208 |
%patch500 -p1 |
209 |
|
210 |
# Mageia patches: |
211 |
%patch1000 -p1 -b .lang |
212 |
%patch1005 -p1 -b .appname |
213 |
%patch1008 -p1 -b .disable-software-update |
214 |
%patch1010 -p1 -b .default-mail-handler |
215 |
%patch1011 -p1 -b .mozkde |
216 |
%patch1012 -p1 -b .ffkde |
217 |
|
218 |
%patch1037 -p0 |
219 |
%patch1038 -p1 -b .freetype-compatibility |
220 |
%patch1039 -p1 -b .noo3_noos |
221 |
|
222 |
pushd js/src |
223 |
autoconf-2.13 |
224 |
popd |
225 |
autoconf-2.13 |
226 |
|
227 |
# needed to regenerate certdata.c |
228 |
pushd security/nss/lib/ckfw/builtins |
229 |
perl ./certdata.perl < /etc/pki/tls/mozilla/certdata.txt |
230 |
popd |
231 |
|
232 |
%{__rm} -f .mozconfig |
233 |
%{__cp} %{SOURCE10} .mozconfig |
234 |
# Mageia specific options: |
235 |
cat << EOF >> .mozconfig |
236 |
ac_add_options --with-system-libevent |
237 |
ac_add_options --enable-libproxy |
238 |
ac_add_options --with-system-png |
239 |
ac_add_options --with-distribution-id=org.mageia |
240 |
ac_add_options --enable-update-channel=%{update_channel} |
241 |
EOF |
242 |
|
243 |
# Options shared with FC: |
244 |
echo "ac_add_options --enable-official-branding" >> .mozconfig |
245 |
|
246 |
%if %{toolkit_gtk3} |
247 |
echo "ac_add_options --enable-default-toolkit=cairo-gtk3" >> .mozconfig |
248 |
%else |
249 |
echo "ac_add_options --enable-default-toolkit=cairo-gtk2" >> .mozconfig |
250 |
%endif |
251 |
|
252 |
echo "ac_add_options --with-system-nspr" >> .mozconfig |
253 |
echo "ac_add_options --with-system-nss" >> .mozconfig |
254 |
|
255 |
echo "ac_add_options --enable-system-sqlite" >> .mozconfig |
256 |
|
257 |
%if %{?system_cairo} |
258 |
echo "ac_add_options --enable-system-cairo" >> .mozconfig |
259 |
%else |
260 |
echo "ac_add_options --disable-system-cairo" >> .mozconfig |
261 |
%endif |
262 |
|
263 |
echo "ac_add_options --enable-system-ffi" >> .mozconfig |
264 |
|
265 |
echo "ac_add_options --enable-gstreamer=1.0" >> .mozconfig |
266 |
|
267 |
%ifarch %{arm} |
268 |
echo "ac_add_options --disable-elf-hack" >> .mozconfig |
269 |
%endif |
270 |
|
271 |
echo "ac_add_options --disable-debug" >> .mozconfig |
272 |
echo "ac_add_options --enable-optimize" >> .mozconfig |
273 |
|
274 |
%ifarch armv7hl |
275 |
echo "ac_add_options --with-arch=armv7-a" >> .mozconfig |
276 |
echo "ac_add_options --with-float-abi=hard" >> .mozconfig |
277 |
echo "ac_add_options --with-fpu=vfpv3-d16" >> .mozconfig |
278 |
echo "ac_add_options --disable-elf-hack" >> .mozconfig |
279 |
%endif |
280 |
%ifarch armv7hnl |
281 |
echo "ac_add_options --with-arch=armv7-a" >> .mozconfig |
282 |
echo "ac_add_options --with-float-abi=hard" >> .mozconfig |
283 |
echo "ac_add_options --with-fpu=neon" >> .mozconfig |
284 |
echo "ac_add_options --disable-elf-hack" >> .mozconfig |
285 |
echo "ac_add_options --disable-ion" >> .mozconfig |
286 |
echo "ac_add_options --disable-yarr-jit" >> .mozconfig |
287 |
%endif |
288 |
%ifarch armv5tel |
289 |
echo "ac_add_options --with-arch=armv5te" >> .mozconfig |
290 |
echo "ac_add_options --with-float-abi=soft" >> .mozconfig |
291 |
echo "ac_add_options --disable-elf-hack" >> .mozconfig |
292 |
echo "ac_add_options --disable-ion" >> .mozconfig |
293 |
echo "ac_add_options --disable-yarr-jit" >> .mozconfig |
294 |
%endif |
295 |
|
296 |
%ifnarch %{ix86} x86_64 |
297 |
echo "ac_add_options --disable-webrtc" >> .mozconfig |
298 |
%endif |
299 |
|
300 |
echo "ac_add_options --disable-crashreporter" >> .mozconfig |
301 |
|
302 |
echo "ac_add_options --with-system-jpeg" >> .mozconfig |
303 |
|
304 |
echo "ac_add_options --with-system-libvpx" >> .mozconfig |
305 |
|
306 |
%build |
307 |
# -fpermissive is needed to build with gcc 4.6+ which has become stricter |
308 |
# |
309 |
# Mozilla builds with -Wall with exception of a few warnings which show up |
310 |
# everywhere in the code; so, don't override that. |
311 |
# |
312 |
# Disable C++ exceptions since Mozilla code is not exception-safe |
313 |
# |
314 |
MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | %{__sed} -e 's/-Wall//') |
315 |
#rhbz#1037063 |
316 |
# -Werror=format-security causes build failures when -Wno-format is explicitly given |
317 |
# for some sources |
318 |
# Explicitly force the hardening flags for Firefox so it passes the checksec test; |
319 |
# See also https://fedoraproject.org/wiki/Changes/Harden_All_Packages |
320 |
MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security" |
321 |
MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fPIC -Wl,-z,relro -Wl,-z,now" |
322 |
%ifarch %{arm} |
323 |
MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" |
324 |
%endif |
325 |
|
326 |
export CFLAGS=$MOZ_OPT_FLAGS |
327 |
export CXXFLAGS=$MOZ_OPT_FLAGS |
328 |
export LDFLAGS=$MOZ_LINK_FLAGS |
329 |
|
330 |
export PREFIX='%{_prefix}' |
331 |
export LIBDIR='%{_libdir}' |
332 |
|
333 |
MOZ_SMP_FLAGS=-j1 |
334 |
# On x86 architectures, Mozilla can build up to 4 jobs at once in parallel, |
335 |
# however builds tend to fail on other arches when building in parallel. |
336 |
%ifarch %{ix86} x86_64 ppc ppc64 ppc64le aarch64 |
337 |
[ -z "$RPM_BUILD_NCPUS" ] && \ |
338 |
RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" |
339 |
MOZ_SMP_FLAGS=-j$RPM_BUILD_NCPUS |
340 |
%endif |
341 |
|
342 |
make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1" |
343 |
|
344 |
%install |
345 |
make -C objdir/browser/installer STRIP=/bin/true MOZ_PKG_FATAL_WARNINGS=0 |
346 |
|
347 |
# Copy files to buildroot |
348 |
%{__mkdir_p} %{buildroot}%{mozillalibdir} |
349 |
cp -rf objdir/dist/firefox/* %{buildroot}%{mozillalibdir} |
350 |
|
351 |
%{__mkdir_p} %{buildroot}%{_bindir} |
352 |
ln -sf %{mozillalibdir}/firefox %{buildroot}%{_bindir}/firefox |
353 |
pushd %{buildroot}%{_bindir} |
354 |
ln -sf firefox mozilla-firefox |
355 |
popd |
356 |
mkdir -p %{buildroot}%{mozillalibdir}/browser/defaults/preferences/ |
357 |
install -m 644 %{SOURCE9} %{buildroot}%{mozillalibdir}/browser/defaults/preferences/kde.js |
358 |
|
359 |
# Create and own %{_libdir}/mozilla/plugins & firefox extensions directories |
360 |
%{__mkdir_p} %{buildroot}%{pluginsdir} |
361 |
%{__mkdir_p} %{buildroot}%{_libdir}/mozilla/extensions/%{firefox_appid} |
362 |
%{__mkdir_p} %{buildroot}%{_datadir}/mozilla/extensions/%{firefox_appid} |
363 |
|
364 |
# (tpg) desktop entry |
365 |
%{__mkdir_p} %{buildroot}%{_datadir}/applications |
366 |
install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/applications/%{name}.desktop |
367 |
|
368 |
# (tpg) icons |
369 |
%{__cp} %{buildroot}%{mozillalibdir}/browser/chrome/icons/default/default16.png %{buildroot}/%{mozillalibdir}/browser/icons/ |
370 |
for i in 16 22 24 32 48 256; do |
371 |
%{__mkdir_p} %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps |
372 |
%{__install} -m 644 browser/branding/official/default$i.png %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps/%{name}.png ; |
373 |
done |
374 |
%{__mkdir_p} %{buildroot}{%{_liconsdir},%{_iconsdir},%{_miconsdir}} |
375 |
ln -sf %{mozillalibdir}/browser/chrome/icons/default/default48.png %{buildroot}%{_liconsdir}/%{name}.png |
376 |
ln -sf %{mozillalibdir}/browser/chrome/icons/default/default32.png %{buildroot}%{_iconsdir}/%{name}.png |
377 |
ln -sf %{mozillalibdir}/browser/chrome/icons/default/default16.png %{buildroot}%{_miconsdir}/%{name}.png |
378 |
|
379 |
# exclusions |
380 |
rm -f %{buildroot}%{mozillalibdir}/README.txt |
381 |
rm -f %{buildroot}%{mozillalibdir}/removed-files |
382 |
rm -f %{buildroot}%{mozillalibdir}/precomplete |
383 |
|
384 |
# this file is only used when creating a new user profile |
385 |
install -D -m644 browser/app/profile/prefs.js %{buildroot}%{mozillalibdir}/browser/defaults/profile/prefs.js |
386 |
cat << EOF >> %{buildroot}%{mozillalibdir}/browser/defaults/profile/prefs.js |
387 |
user_pref("browser.EULA.override", true); |
388 |
user_pref("browser.shell.checkDefaultBrowser", false); |
389 |
user_pref("browser.startup.homepage", "file:///usr/share/indexhtml/index.html"); |
390 |
user_pref("app.update.auto", false); |
391 |
user_pref("app.update.enabled", false); |
392 |
user_pref("app.update.autoInstallEnabled", false); |
393 |
user_pref("browser.showQuitWarning", true); |
394 |
EOF |
395 |
|
396 |
# display icon for Firefox button |
397 |
%{__mkdir_p} %{buildroot}%{mozillalibdir}/browser/defaults/profile/chrome |
398 |
cat << EOF > %{buildroot}%{mozillalibdir}/browser/defaults/profile/chrome/userChrome.css |
399 |
#appmenu-toolbar-button { |
400 |
list-style-image: url("chrome://branding/content/icon16.png"); |
401 |
} |
402 |
EOF |
403 |
|
404 |
# files in this directory are read on every startup, and can change/add |
405 |
# preferences for existing profiles |
406 |
# extensions.autoDisableScopes is a new preference added in firefox 8 |
407 |
# it defines "scopes" where newly installed addons are disabled by default |
408 |
# this is an additive bit field, and the value defaults to 15 (1+2+4+8) |
409 |
# we need to remove system scope (8) from it so language packs and other addons |
410 |
# which are installed systemwide won't get marked as 3rd party and disabled |
411 |
# documentation: http://kb.mozillazine.org/About:config_entries#Extensions. |
412 |
# or in toolkit/mozapps/extensions/AddonManager.jsm |
413 |
# we also need to disable the "disable addon selection dialog" |
414 |
# (doktor5000) - path has changed since FF 21 |
415 |
# http://mike.kaply.com/2013/04/24/major-changes-coming-in-firefox-21/ |
416 |
cat << EOF > %{buildroot}%{mozillalibdir}/browser/defaults/preferences/mga.js |
417 |
pref("general.useragent.locale", "chrome://global/locale/intl.properties"); |
418 |
pref("extensions.autoDisableScopes", 0); |
419 |
pref("extensions.shownSelectionUI", true); |
420 |
EOF |
421 |
# FIXME: Add it back in mga.js when this search engine will be used by default. |
422 |
# user_pref("browser.search.selectedEngine","duckduckgo.com"); |
423 |
|
424 |
# use the system myspell dictionaries |
425 |
rm -fr %{buildroot}%{mozillalibdir}/dictionaries |
426 |
ln -s %{_datadir}/hunspell %{buildroot}%{mozillalibdir}/dictionaries |
427 |
|
428 |
# (lm) touch and %ghost bookmarks.html to a proper uninstall |
429 |
touch %{buildroot}%{mozillalibdir}/browser/defaults/profile/bookmarks.html |
430 |
|
431 |
# Add stuff to build a plugin to -devel |
432 |
mkdir -p %{buildroot}%{_includedir} |
433 |
cp -a dom/plugins/base/np*.h %{buildroot}%{_includedir} |
434 |
mkdir -p %{buildroot}/%{_datadir}/pkgconfig |
435 |
cat <<EOF >%{buildroot}/%{_datadir}/pkgconfig/mozilla-plugin.pc |
436 |
Name: Mozilla Plug-In API |
437 |
Description: Mozilla Plug-In API |
438 |
Version: %{version} |
439 |
Cflags: -I%{_includedir} -DXP_UNIX |
440 |
EOF |
441 |
|
442 |
mkdir -p %{buildroot}%{_sys_macros_dir} |
443 |
cat <<FIN >%{buildroot}%{_sys_macros_dir}/%{name}.macros |
444 |
# Macros from %{name} package |
445 |
%%firefox_major %{version} |
446 |
%%firefox_epoch %{ff_epoch} |
447 |
%%firefox_version %{version} |
448 |
%%firefox_mozillapath %{mozillalibdir} |
449 |
%%firefox_pluginsdir %{pluginsdir} |
450 |
%%firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} |
451 |
%%firefox_extdir %%(if [ "%%_target_cpu" = "noarch" ]; then echo %%{_datadir}/mozilla/extensions/%%{firefox_appid}; else echo %%{_libdir}/mozilla/extensions/%%{firefox_appid}; fi) |
452 |
FIN |
453 |
# temp build fix: |
454 |
mkdir -p %{buildroot}%{mozillalibdir}/browser/searchplugins |
455 |
cp -f %{SOURCE8} %{buildroot}%{mozillalibdir}/browser/searchplugins/duckduckgo.xml |
456 |
|
457 |
%pre |
458 |
if [ -d %{mozillalibdir}/dictionaries ]; then |
459 |
rm -fr %{mozillalibdir}/dictionaries |
460 |
fi |
461 |
|
462 |
%post |
463 |
if [ ! -r /etc/sysconfig/oem ]; then |
464 |
case `grep META_CLASS /etc/sysconfig/system` in |
465 |
*powerpack) bookmark="mozilla-powerpack.html" ;; |
466 |
*desktop) bookmark="mozilla-one.html";; |
467 |
*) bookmark="mozilla-download.html";; |
468 |
esac |
469 |
ln -s -f %{_prefix}/share/mga/bookmarks/mozilla/$bookmark %{mozillalibdir}/browser/defaults/profile/bookmarks.html |
470 |
fi |
471 |
|
472 |
%files |
473 |
%{_bindir}/%{name} |
474 |
%{_bindir}/mozilla-firefox |
475 |
%{_iconsdir}/hicolor/*/apps/*.png |
476 |
%{_miconsdir}/%{name}.png |
477 |
%{_iconsdir}/%{name}.png |
478 |
%{_liconsdir}/%{name}.png |
479 |
%{_datadir}/applications/*.desktop |
480 |
%{mozillalibdir} |
481 |
%ghost %{mozillalibdir}/browser/defaults/profile/bookmarks.html |
482 |
%dir %{_libdir}/mozilla |
483 |
%dir %{pluginsdir} |
484 |
%dir %{_libdir}/mozilla/extensions/%{firefox_appid} |
485 |
%dir %{_datadir}/mozilla/extensions/%{firefox_appid} |
486 |
|
487 |
%files devel |
488 |
%{_sys_macros_dir}/%{name}.macros |
489 |
%{_includedir}/np*.h |
490 |
%{_datadir}/pkgconfig/mozilla-plugin.pc |