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

  ViewVC Help
Powered by ViewVC 1.1.26