/[packages]/cauldron/firefox/current/SPECS/firefox.spec
ViewVC logotype

Contents of /cauldron/firefox/current/SPECS/firefox.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1328619 - (show annotations) (download)
Mon Nov 5 21:22:29 2018 UTC (9 days ago) by tv
File size: 19691 byte(s)
new release
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 7.
13 # /!\ Do not update more than FF 60 for mga7. /!\
14 # ff 60 -> 68
15
16 # Tentative workaround for rust's "error: the lock file needs to be updated but --locked was passed to prevent this":
17 %global _smp_ncpus_max 8
18
19 %global system_cairo 0
20 %global hardened_build 1
21 %global use_bundled_cbindgen 1
22
23 %global major 63
24 %global ff_epoch 0
25 # (tpg) set version HERE !!!
26 %global extra %nil
27 %global realver %{version}%extra
28 %global firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
29
30 # (tpg) MOZILLA_FIVE_HOME
31 %global mozillalibdir %{_libdir}/%{name}
32 %global pluginsdir %{_libdir}/mozilla/plugins
33
34 # libxul.so is provided by libxulrunnner2.0.
35 %global __requires_exclude libxul.so
36
37 # Build as a debug package?
38 %global debug_build 0
39 %global disable_elfhack 1
40
41 # Minimal required versions
42 %global cairo_version 1.13.1
43 %global freetype_version 2.1.9
44 %global libnotify_version 0.7.0
45 %global libvpx_version 1.5.0
46
47 # this seems fragile, so require the exact version or later (#58754)
48 %global nspr_version 4.19
49 %global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536)
50 %global nss_version 3.37.3
51 %global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536)
52 %global sqlite_version 3.22.0
53 # The actual sqlite version (see #480989):
54 %global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536)
55
56 %global mozappdir %{_libdir}/%{name}
57 %global tarballdir firefox-%{version}
58
59 %global update_channel %{extra}%major
60
61 Summary: Mozilla Firefox Web browser
62 Name: firefox
63 Version: %{major}.0.1
64 Epoch: %{ff_epoch}
65 Release: %mkrel 1
66 License: MPLv1.1 or GPLv2+ or LGPLv2+
67 Group: Networking/WWW
68 Url: https://www.mozilla.org/firefox/organizations/
69 Source0: https://hg.mozilla.org/releases/mozilla-release/archive/firefox-%{version}%{?pre_version}.source.tar.xz
70 Source2: cbindgen-vendor.tar.xz
71 Source4: %{name}.desktop
72 Source8: %{name}-searchengines-duckduckgo.xml
73 Source9: kde.js
74 # From Fedora:
75 Source10: firefox-mozconfig
76 Source12: firefox-mageia-default-prefs.js
77 Source23: firefox.1
78 Source24: mozilla-api-key
79 Source26: distribution.ini
80 Source27: google-api-key
81
82 # Fedora patches:
83 Patch3: mozilla-build-arm.patch
84 Patch27: mozilla-1335250.patch
85 # Also fixes s390x: https://bugzilla.mozilla.org/show_bug.cgi?id=1376268
86 Patch29: build-big-endian.patch
87 # Always feel lucky for unsupported platforms:
88 # https://bugzilla.mozilla.org/show_bug.cgi?id=1347128
89 Patch37: build-jit-atomic-always-lucky.patch
90 Patch40: build-aarch64-skia.patch
91 Patch41: build-disable-elfhack.patch
92 Patch42: prio-nss-build.patch
93 Patch43: mozilla-1500366.patch
94 Patch219: rhbz-1173156.patch
95 Patch224: mozilla-1170092.patch
96 Patch225: mozilla-1005640-accept-lang.patch
97 #ARM run-time patch
98 Patch226: rhbz-1354671.patch
99 Patch229: firefox-nss-version.patch
100
101 # Upstream patches
102 Patch402: mozilla-1196777.patch
103 Patch406: mozilla-256180.patch
104 Patch410: mozilla-1321521.patch
105 Patch411: mozilla-1321521-2.patch
106 Patch412: mozilla-1337988.patch
107 Patch413: mozilla-1353817.patch
108 Patch414: mozilla-1435212-ffmpeg-4.0.patch
109 Patch415: Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch
110 Patch416: mozilla-1424422.patch
111 Patch417: bug1375074-save-restore-x28.patch
112
113 # Mageia patches:
114 Patch1000: firefox-lang.patch
115 Patch1001: firefox-npapi-missing-include.patch
116 # (OpenSuse) add patch to make firefox always use /usr/bin/firefox when "make firefox
117 # the default web browser" is used fix mdv bug#58784
118 Patch1005: firefox-38.0-appname.patch
119 # Patches for kde integration of FF
120 # (doktor5000) if the patches need updating, grab both from the branch corresponding with the current firefox version at
121 # http://www.rosenauer.org/hg/mozilla
122 Patch1011: http://www.rosenauer.org/hg/mozilla/file/tip/mozilla-kde.patch
123 # (fwang) please modify patch12 with `sed -e 's/MozillaFirefox/firefox/'` to fit our desktop filename
124 Patch1012: http://www.rosenauer.org/hg/mozilla/file/tip/firefox-kde.patch
125
126 Patch1037: firefox-38.0-nss-version.patch
127 Patch1039: firefox-59.0-optimize-dont-force-O3.patch
128
129 BuildRequires: pkgconfig(nspr) >= %{nspr_version}
130 BuildRequires: pkgconfig(nss) >= %{nss_version}
131 BuildRequires: nss-static-devel >= %{nss_version}
132 %if %{?system_cairo}
133 BuildRequires: pkgconfig(cairo) >= %{cairo_version}
134 %endif
135 BuildRequires: pkgconfig(xinerama)
136 BuildRequires: pkgconfig(xscrnsaver)
137 BuildRequires: pkgconfig(libpng) >= 1.6.31
138 BuildRequires: pkgconfig(libjpeg)
139 BuildRequires: zip
140 BuildRequires: bzip2-devel
141 BuildRequires: pkgconfig(zlib)
142 BuildRequires: pkgconfig(libIDL-2.0)
143 BuildRequires: pkgconfig(gtk+-3.0)
144 BuildRequires: pkgconfig(gtk+-2.0)
145 BuildRequires: pkgconfig(pango)
146 BuildRequires: pkgconfig(freetype2) >= %{freetype_version}
147 BuildRequires: pkgconfig(xt)
148 BuildRequires: pkgconfig(hunspell)
149 BuildRequires: pkgconfig(libstartup-notification-1.0)
150 BuildRequires: pkgconfig(libnotify) >= %{libnotify_version}
151 BuildRequires: pkgconfig(dri)
152 %if %mgaver > 5
153 BuildRequires: pkgconfig(libvpx) >= %{libvpx_version}
154 %endif
155 BuildRequires: autoconf2.1
156 BuildRequires: pkgconfig(libpulse)
157 BuildRequires: pkgconfig(icu-i18n)
158 BuildRequires: pkgconfig(gconf-2.0)
159 BuildRequires: yasm
160 BuildRequires: llvm
161 BuildRequires: llvm-devel
162 BuildRequires: clang
163 BuildRequires: clang-devel
164 BuildRequires: nodejs
165 Requires: %{mklibname nss 3} >= 2:%{nss_build_version}
166 Requires: %{mklibname nspr 4} >= 2:%{nspr_build_version}
167 BuildRequires: python2-devel
168 BuildRequires: pkgconfig(sqlite3) >= %{sqlite_version}
169 Requires: %{mklibname sqlite3_ 0} >= %{sqlite_build_version}
170 BuildRequires: pkgconfig(libffi)
171 BuildRequires: rootcerts >= 1:20130411.00
172 BuildRequires: doxygen
173 BuildRequires: libiw-devel
174 BuildRequires: python-virtualenv
175 BuildRequires: pkgconfig(libproxy-1.0)
176 BuildRequires: rust
177 BuildRequires: cargo
178
179 Provides: %{name} = %{epoch}:%{version}
180 Provides: mozilla-firefox = %{epoch}:%{version}-%{release}
181 Provides: webclient
182
183 Requires: indexhtml
184 Requires: xdg-utils
185 # fixes bug #42096
186 Requires: mailcap
187 Recommends: hunspell-en
188 Requires: %{_lib}notify4
189 # make sure our default bookmarks are present
190 Requires: desktop-common-data
191 # try to fix mga#1344 (automatic installation of proper -l10n package)
192 # packages requiring locales-XX will be automatically preferred when locales-XX
193 # is already installed
194 Recommends: firefox-l10n
195
196 Recommends: %{_lib}canberra0
197 Recommends: %{_lib}cups2
198 Obsoletes: firefox-ext-weave-sync
199 Obsoletes: firefox-beta < 25
200
201 %description
202 Mozilla Firefox is an open-source web browser, designed for standards
203 compliance, performance and portability.
204
205 %package devel
206 Summary: Development files for %{name}
207 Group: Development/Other
208 Obsoletes: firefox-beta-devel < 25
209
210 %description devel
211 Files and macros mainly for building Firefox extensions.
212
213 %prep
214 %if 0%{?extra}
215 #setup -q -n mozilla-%{update_channel}
216 %setup -q -n firefox-%{version}esr
217 %else
218 %setup -q -n %{tarballdir}
219 %endif
220 # Fedora patches:
221 %if 0%{?big_endian}
222 %patch29 -p1 -b .big-endian
223 %endif
224 %patch40 -p1 -b .aarch64-skia
225 %patch37 -p1 -b .jit-atomic-lucky
226 %if 0%{?disable_elfhack}
227 %patch41 -p1 -b .disable-elfhack
228 %endif
229 %patch3 -p1 -b .arm
230 %patch42 -p1 -b .nss-build
231 %patch43 -p1 -b .1500366
232 %patch219 -p2 -b .rhbz-1173156
233 %patch224 -p1 -b .1170092
234 %patch225 -p1 -b .1005640-accept-lang
235 %ifarch aarch64
236 %patch226 -p1 -b .1354671
237 %endif
238
239 %patch402 -p1 -b .1196777
240 %patch406 -p1 -b .256180
241 %patch413 -p1 -b .1353817
242 %ifarch %{arm}
243 %patch415 -p1 -b .mozilla-1238661
244 %endif
245
246 # Mageia patches:
247 %patch1000 -p1 -b .lang
248 %patch1001 -p1 -b .npapi-missing-include
249 %patch1005 -p1 -b .appname
250 #patch1011 -p1 -b .mozkde
251 #patch1012 -p1 -b .ffkde
252
253 %patch1037 -p0
254 %patch1039 -p1 -b .noo3_noos
255
256 pushd js/src
257 autoconf-2.13
258 popd
259 autoconf-2.13
260
261 %{__rm} -f .mozconfig
262 %{__cp} %{SOURCE10} .mozconfig
263 # Mageia specific options:
264 cat << EOF >> .mozconfig
265 ac_add_options --enable-libproxy
266 ac_add_options --with-system-png
267 ac_add_options --with-distribution-id=org.mageia
268 ac_add_options --enable-update-channel=%{update_channel}
269 EOF
270
271 # Options shared with FC:
272 echo "ac_add_options --enable-default-toolkit=cairo-gtk3" >> .mozconfig
273 echo "ac_add_options --enable-official-branding" >> .mozconfig
274
275 %{__cp} %{SOURCE24} mozilla-api-key
276 %{__cp} %{SOURCE27} google-api-key
277
278 echo "ac_add_options --with-system-nspr" >> .mozconfig
279 echo "ac_add_options --with-system-nss" >> .mozconfig
280
281 echo "ac_add_options --enable-system-sqlite" >> .mozconfig
282
283 %if %{?system_cairo}
284 echo "ac_add_options --enable-system-cairo" >> .mozconfig
285 %else
286 echo "ac_add_options --disable-system-cairo" >> .mozconfig
287 %endif
288
289 echo "ac_add_options --enable-system-ffi" >> .mozconfig
290
291 %ifarch %{arm}
292 echo "ac_add_options --disable-elf-hack" >> .mozconfig
293 %endif
294
295 %if %{?debug_build}
296 echo "ac_add_options --enable-debug" >> .mozconfig
297 echo "ac_add_options --disable-optimize" >> .mozconfig
298 %else
299 %global optimize_flags "none"
300 %ifarch armv7hl
301 # ARMv7 needs that (rhbz#1426850)
302 %global optimize_flags "-g -O2 -fno-schedule-insns"
303 # Disable libaom due to rhbz#1641623
304 echo "ac_add_options --disable-av1" >> .mozconfig
305 %endif
306 %ifarch ppc64le aarch64
307 %global optimize_flags "-g -O2"
308 %endif
309 %if %{optimize_flags} != "none"
310 echo 'ac_add_options --enable-optimize=%{?optimize_flags}' >> .mozconfig
311 %else
312 echo 'ac_add_options --enable-optimize' >> .mozconfig
313 %endif
314 echo "ac_add_options --disable-debug" >> .mozconfig
315 %endif
316
317 # Second arches fail to start with jemalloc enabled
318 %ifnarch %{ix86} x86_64
319 echo "ac_add_options --disable-jemalloc" >> .mozconfig
320 %endif
321
322 %ifnarch %{ix86} x86_64
323 echo "ac_add_options --disable-webrtc" >> .mozconfig
324 %endif
325
326 echo "ac_add_options --disable-crashreporter" >> .mozconfig
327
328 echo "ac_add_options --with-system-jpeg" >> .mozconfig
329
330 %if %mgaver > 5
331 echo "ac_add_options --with-system-libvpx" >> .mozconfig
332 %else
333 # Using the bundled libvpx because the mgav5 one is too old.
334 echo "ac_add_options --disable-system-libvpx" >> .mozconfig
335 %endif
336
337 %if %mgaver > 5
338 # Using the bundled icu because the mgav5 one is too old.
339 echo "ac_add_options --disable-system-icu" >> .mozconfig
340 %endif
341
342 # Remove executable bit to make brp-mangle-shebangs happy.
343 chmod -x third_party/rust/itertools/src/lib.rs
344
345 #---------------------------------------------------------------------
346
347 %if 0%{?use_bundled_cbindgen}
348
349 mkdir -p my_rust_vendor
350 cd my_rust_vendor
351 %{__tar} xf %{SOURCE2}
352 cd -
353 mkdir -p .cargo
354 cat > .cargo/config <<EOL
355 [source.crates-io]
356 replace-with = "vendored-sources"
357
358 [source.vendored-sources]
359 directory = "`pwd`/my_rust_vendor"
360 EOL
361
362 env CARGO_HOME=.cargo cargo install cbindgen
363 %endif
364
365 %build
366 %if 0%{?use_bundled_cbindgen}
367 export PATH=`pwd`/.cargo/bin:$PATH
368 %endif
369
370 # -fpermissive is needed to build with gcc 4.6+ which has become stricter
371 #
372 # Mozilla builds with -Wall with exception of a few warnings which show up
373 # everywhere in the code; so, don't override that.
374 #
375 # Disable C++ exceptions since Mozilla code is not exception-safe
376 #
377 MOZ_OPT_FLAGS=$(echo "%{optflags}" | %{__sed} -e 's/-Wall//')
378 #rhbz#1037063
379 # -Werror=format-security causes build failures when -Wno-format is explicitly given
380 # for some sources
381 # Explicitly force the hardening flags for Firefox so it passes the checksec test;
382 # See also https://fedoraproject.org/wiki/Changes/Harden_All_Packages
383 MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security"
384 # Disable null pointer gcc6 optimization in gcc6 (rhbz#1328045)
385 MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fno-delete-null-pointer-checks"
386 # Use hardened build?
387 %if 0%{?hardened_build}
388 MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fPIC -Wl,-z,relro -Wl,-z,now"
389 %endif
390 %if %{?debug_build}
391 MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//')
392 %endif
393 %ifnarch x86_64
394 MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/')
395 # If MOZ_DEBUG_FLAGS is empty, firefox's build will default it to "-g" which
396 # overrides the -g1 from line above and breaks building on s390
397 # (OOM when linking, rhbz#1238225)
398 export MOZ_DEBUG_FLAGS=" "
399 %endif
400 %ifarch s390 %{arm} ppc aarch64 %{ix86}
401 MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
402 %endif
403 %ifarch %{arm}
404 export RUSTFLAGS="-Cdebuginfo=0"
405 %endif
406 export CFLAGS=$MOZ_OPT_FLAGS
407 export CXXFLAGS=$MOZ_OPT_FLAGS
408 export LDFLAGS=$MOZ_LINK_FLAGS
409
410 export PREFIX='%{_prefix}'
411 export LIBDIR='%{_libdir}'
412
413 MOZ_SMP_FLAGS=-j1
414 # On x86 architectures, Mozilla can build up to 4 jobs at once in parallel,
415 # however builds tend to fail on other arches when building in parallel.
416 %ifarch %{ix86} x86_64 ppc ppc64 ppc64le aarch64
417 [ -z "$RPM_BUILD_NCPUS" ] && \
418 RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"
419 [ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2
420 [ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4
421 [ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8
422 %endif
423
424 #make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1"
425 export MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS"
426 export MOZ_SERVICES_SYNC="1"
427 export STRIP=/bin/true
428 ./mach build
429
430 %install
431 make -C objdir/browser/installer STRIP=/bin/true MOZ_PKG_FATAL_WARNINGS=0
432
433 # Copy files to buildroot
434 %{__mkdir_p} %{buildroot}%{mozillalibdir}
435 cp -rf objdir/dist/firefox/* %{buildroot}%{mozillalibdir}
436
437 %{__mkdir_p} %{buildroot}%{_bindir}
438 ln -sf %{mozillalibdir}/firefox %{buildroot}%{_bindir}/firefox
439 pushd %{buildroot}%{_bindir}
440 ln -sf firefox mozilla-firefox
441 popd
442 mkdir -p %{buildroot}%{mozillalibdir}/browser/defaults/preferences/
443 install -m 644 %{SOURCE9} %{buildroot}%{mozillalibdir}/browser/defaults/preferences/kde.js
444
445 # Create and own %{_libdir}/mozilla/plugins & firefox extensions directories
446 %{__mkdir_p} %{buildroot}%{pluginsdir}
447 %{__mkdir_p} %{buildroot}%{_libdir}/mozilla/extensions/%{firefox_appid}
448 %{__mkdir_p} %{buildroot}%{_datadir}/mozilla/extensions/%{firefox_appid}
449
450 # (tpg) desktop entry
451 %{__mkdir_p} %{buildroot}%{_datadir}/applications
452 install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/applications/%{name}.desktop
453
454 # (tpg) icons
455 #%{__cp} %{buildroot}%{mozillalibdir}/browser/chrome/icons/default/default16.png %{buildroot}/%{mozillalibdir}/browser/icons/
456 for i in 16 22 24 32 48 256; do
457 %{__mkdir_p} %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps
458 %{__install} -m 644 browser/branding/official/default$i.png %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps/%{name}.png ;
459 done
460 %{__mkdir_p} %{buildroot}{%{_liconsdir},%{_iconsdir},%{_miconsdir}}
461 ln -sf %{mozillalibdir}/browser/chrome/icons/default/default48.png %{buildroot}%{_liconsdir}/%{name}.png
462 ln -sf %{mozillalibdir}/browser/chrome/icons/default/default32.png %{buildroot}%{_iconsdir}/%{name}.png
463 ln -sf %{mozillalibdir}/browser/chrome/icons/default/default16.png %{buildroot}%{_miconsdir}/%{name}.png
464
465 %{__install} -p -D -m 644 %{SOURCE23} %{buildroot}%{_mandir}/man1/firefox.1
466
467 # exclusions
468 rm -f %{buildroot}%{mozillalibdir}/README.txt
469 rm -f %{buildroot}%{mozillalibdir}/removed-files
470 rm -f %{buildroot}%{mozillalibdir}/precomplete
471
472 # display icon for Firefox button
473 %{__mkdir_p} %{buildroot}%{mozillalibdir}/browser/defaults/profile/chrome
474 cat << EOF > %{buildroot}%{mozillalibdir}/browser/defaults/profile/chrome/userChrome.css
475 #appmenu-toolbar-button {
476 list-style-image: url("chrome://branding/content/icon16.png");
477 }
478 EOF
479
480 # files in this directory are read on every startup, and can change/add
481 # preferences for existing profiles
482 # extensions.autoDisableScopes is a new preference added in firefox 8
483 # it defines "scopes" where newly installed addons are disabled by default
484 # this is an additive bit field, and the value defaults to 15 (1+2+4+8)
485 # we need to remove system scope (8) from it so language packs and other addons
486 # which are installed systemwide won't get marked as 3rd party and disabled
487 # documentation: http://kb.mozillazine.org/About:config_entries#Extensions.
488 # or in toolkit/mozapps/extensions/AddonManager.jsm
489 # we also need to disable the "disable addon selection dialog"
490 # (doktor5000) - path has changed since FF 21
491 # http://mike.kaply.com/2013/04/24/major-changes-coming-in-firefox-21/
492 cat << EOF > %{buildroot}%{mozillalibdir}/browser/defaults/preferences/mga.js
493 pref("general.useragent.locale", "chrome://global/locale/intl.properties");
494 pref("extensions.autoDisableScopes", 0);
495 pref("extensions.shownSelectionUI", true);
496 EOF
497 # FIXME: Add it back in mga.js when this search engine will be used by default.
498 # user_pref("browser.search.selectedEngine","duckduckgo.com");
499
500 # Use the system hunspell dictionaries
501 rm -fr %{buildroot}%{mozillalibdir}/dictionaries
502 ln -s %{_datadir}/hunspell %{buildroot}%{mozillalibdir}/dictionaries
503
504 # Default
505 %{__cp} %{SOURCE12} %{buildroot}%{mozillalibdir}/browser/defaults/preferences
506
507 # Copy over run-mozilla.sh
508 %{__cp} build/unix/run-mozilla.sh %{buildroot}%{mozappdir}
509
510 # Add distribution.ini
511 %{__mkdir_p} %{buildroot}%{mozappdir}/distribution
512 %{__cp} %{SOURCE26} %{buildroot}%{mozappdir}/distribution
513
514 # (lm) touch and %ghost bookmarks.html to a proper uninstall
515 touch %{buildroot}%{mozillalibdir}/browser/defaults/profile/bookmarks.html
516
517 # Add stuff to build a plugin to -devel
518 mkdir -p %{buildroot}%{_includedir}
519 cp -a dom/plugins/base/np*.h %{buildroot}%{_includedir}
520 mkdir -p %{buildroot}/%{_datadir}/pkgconfig
521 cat <<EOF >%{buildroot}/%{_datadir}/pkgconfig/mozilla-plugin.pc
522 Name: Mozilla Plug-In API
523 Description: Mozilla Plug-In API
524 Version: %{version}
525 Cflags: -I%{_includedir} -DXP_UNIX
526 EOF
527
528 mkdir -p %{buildroot}%{_sys_macros_dir}
529 cat <<FIN >%{buildroot}%{_sys_macros_dir}/%{name}.macros
530 # Macros from %{name} package
531 %%firefox_major %{version}
532 %%firefox_epoch %{ff_epoch}
533 %%firefox_version %{version}
534 %%firefox_mozillapath %{mozillalibdir}
535 %%firefox_pluginsdir %{pluginsdir}
536 %%firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
537 %%firefox_extdir %%(if [ "%%_target_cpu" = "noarch" ]; then echo %%{_datadir}/mozilla/extensions/%%{firefox_appid}; else echo %%{_libdir}/mozilla/extensions/%%{firefox_appid}; fi)
538 FIN
539 # temp build fix:
540 mkdir -p %{buildroot}%{mozillalibdir}/browser/searchplugins
541 cp -f %{SOURCE8} %{buildroot}%{mozillalibdir}/browser/searchplugins/duckduckgo.xml
542
543 %pre
544 if [ -d %{mozillalibdir}/dictionaries ]; then
545 rm -fr %{mozillalibdir}/dictionaries
546 fi
547
548 %post
549 if [ ! -r /etc/sysconfig/oem ]; then
550 case `grep META_CLASS /etc/sysconfig/system` in
551 *powerpack) bookmark="mozilla-powerpack.html" ;;
552 *desktop) bookmark="mozilla-one.html";;
553 *) bookmark="mozilla-download.html";;
554 esac
555 ln -s -f %{_prefix}/share/mga/bookmarks/mozilla/$bookmark %{mozillalibdir}/browser/defaults/profile/bookmarks.html
556 fi
557
558 %files
559 %{_bindir}/%{name}
560 %{_bindir}/mozilla-firefox
561 %doc %{_mandir}/man1/*
562 %{_iconsdir}/hicolor/*/apps/*.png
563 %{_miconsdir}/%{name}.png
564 %{_iconsdir}/%{name}.png
565 %{_liconsdir}/%{name}.png
566 %{_datadir}/applications/*.desktop
567 %{mozillalibdir}
568 %ghost %{mozillalibdir}/browser/defaults/profile/bookmarks.html
569 %dir %{_libdir}/mozilla
570 %dir %{pluginsdir}
571 %dir %{_libdir}/mozilla/extensions/%{firefox_appid}
572 %dir %{_datadir}/mozilla/extensions/%{firefox_appid}
573
574 %files devel
575 %{_sys_macros_dir}/%{name}.macros
576 %{_includedir}/np*.h
577 %{_datadir}/pkgconfig/mozilla-plugin.pc

  ViewVC Help
Powered by ViewVC 1.1.26