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