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

  ViewVC Help
Powered by ViewVC 1.1.26