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

  ViewVC Help
Powered by ViewVC 1.1.26