- rel 1
[packages/firefox.git] / firefox.spec
CommitLineData
0d00fa1b 1# TODO:
54d6358a 2# - consider --enable-libproxy
2f695f11 3#
ca6a7239 4# Conditional build:
4ab16c9e 5%bcond_with tests # enable tests (whatever they check)
a9334f16 6%bcond_with gtk3 # GTK+ 3.x instead of 2.x
2a673919 7%bcond_without kerberos # disable krb5 support
54d6358a
JR
8%bcond_with pgo # PGO-enabled build (requires working $DISPLAY == :100)
9# - disabled shared_js - https://bugzilla.mozilla.org/show_bug.cgi?id=1039964
10%bcond_with shared_js # shared libmozjs library [broken]
11
12# On updating version, grab CVE links from:
13# https://www.mozilla.org/security/known-vulnerabilities/firefox.html
14# Release Notes:
15# https://developer.mozilla.org/en-US/Firefox/Releases
2a673919 16
d97ddc70
JB
17# The actual sqlite version (see RHBZ#480989):
18%define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR)
d97ddc70 19
d0a1bb80 20%define nspr_ver 4.10.8
54d6358a
JR
21%define nss_ver 3.19.2
22
23Summary: Firefox web browser
24Summary(hu.UTF-8): Firefox web böngésző
25Summary(pl.UTF-8): Firefox - przeglądarka WWW
26Name: firefox
27Version: 45.0
9b34cc8c 28Release: 1
a9334f16 29License: MPL v2.0
51c0f20a 30Group: X11/Applications/Networking
54d6358a
JR
31Source0: http://releases.mozilla.org/pub/mozilla.org/firefox/releases/%{version}/source/firefox-%{version}.source.tar.xz
32# Source0-md5: 09cbada824841f9e1d77f095e7cd02c1
96ef4151
JB
33Source3: %{name}.desktop
34Source4: %{name}.sh
c5cd9be2
JB
35Source5: vendor.js
36Source6: vendor-ac.js
54d6358a
JR
37Patch1: idl-parser.patch
38Patch2: xulrunner-new-libxul.patch
39Patch3: xulrunner-paths.patch
40Patch4: xulrunner-pc.patch
41Patch5: install-pc-files.patch
42Patch6: %{name}-prefs.patch
43Patch7: %{name}-pld-bookmarks.patch
44Patch8: %{name}-no-subshell.patch
45Patch9: %{name}-middle_click_paste.patch
46Patch11: %{name}-system-virtualenv.patch
47Patch12: %{name}-Disable-Firefox-Health-Report.patch
48Patch14: freetype.patch
49URL: https://www.mozilla.org/firefox/
0fca8d8d 50BuildRequires: OpenGL-devel
54d6358a
JR
51BuildRequires: ImageMagick
52BuildRequires: ImageMagick-coder-png
53BuildRequires: ImageMagick-coder-svg
d97ddc70 54BuildRequires: alsa-lib-devel
e933d2a8 55BuildRequires: automake
d97ddc70 56BuildRequires: bzip2-devel
0fca8d8d 57BuildRequires: cairo-devel >= 1.10.2-5
09328230 58BuildRequires: dbus-glib-devel >= 0.60
37413542 59BuildRequires: freetype-devel >= 1:2.1.8
c5cd9be2 60BuildRequires: gcc-c++ >= 6:4.4
d0a1bb80 61BuildRequires: glib2-devel >= 1:2.22
08ccc3c5
JB
62BuildRequires: gstreamer-devel >= 1.0
63BuildRequires: gstreamer-plugins-base-devel >= 1.0
d0a1bb80
JB
64%{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.18.0}
65%{?with_gtk3:BuildRequires: gtk+3-devel >= 3.4.0}
2a673919 66%{?with_kerberos:BuildRequires: heimdal-devel >= 0.7.1}
37413542 67BuildRequires: hunspell-devel >= 1.2.3
8a88dcf7 68BuildRequires: libIDL-devel >= 0.8.0
d0a1bb80
JB
69# DECnet (dnprogs.spec), not dummy net (libdnet.spec)
70#BuildRequires: libdnet-devel
0fca8d8d 71BuildRequires: libevent-devel >= 1.4.7
4ac83cfe
JB
72# standalone libffi 3.0.9 or gcc's from 4.5(?)+
73BuildRequires: libffi-devel >= 6:3.0.9
a9334f16 74BuildRequires: libicu-devel >= 50.1
96ef4151 75# requires libjpeg-turbo implementing at least libjpeg 6b API
ea721d92 76BuildRequires: libjpeg-devel >= 6b
96ef4151 77BuildRequires: libjpeg-turbo-devel
54d6358a
JR
78# for rsvg-convert
79BuildRequires: librsvg
2a673919 80BuildRequires: libpng(APNG)-devel >= 0.10
d0a1bb80 81BuildRequires: libpng-devel >= 2:1.6.16
c5cd9be2 82BuildRequires: libstdc++-devel >= 6:4.4
a9334f16 83BuildRequires: libvpx-devel >= 1.3.0
54d6358a 84BuildRequires: libxslt-progs >= 1.1.28
96ef4151
JB
85BuildRequires: nspr-devel >= 1:%{nspr_ver}
86BuildRequires: nss-devel >= 1:%{nss_ver}
08ccc3c5 87BuildRequires: pango-devel >= 1:1.22.0
a9334f16 88BuildRequires: pixman-devel >= 0.19.2
56cf7ebf 89BuildRequires: perl-modules >= 5.004
1bb00684 90BuildRequires: pkgconfig
b73005e5 91BuildRequires: pkgconfig(libffi) >= 3.0.9
08ccc3c5 92BuildRequires: pulseaudio-devel
37413542 93BuildRequires: python-modules >= 1:2.5
54d6358a 94%{?with_pgo:BuildRequires: python-modules-sqlite}
a86b0951 95BuildRequires: python-simplejson
37413542 96BuildRequires: python-virtualenv >= 1.9.1-4
08ccc3c5 97BuildRequires: readline-devel
6b1581cf 98BuildRequires: rpm >= 4.4.9-56
9df03825 99BuildRequires: rpmbuild(macros) >= 1.601
54d6358a
JR
100BuildRequires: sed >= 4.0
101BuildRequires: sqlite3-devel >= 3.8.11.1-3
d97ddc70 102BuildRequires: startup-notification-devel >= 0.8
54d6358a 103BuildRequires: virtualenv
0fca8d8d 104BuildRequires: xorg-lib-libXScrnSaver-devel
446ffaab 105BuildRequires: xorg-lib-libXext-devel
446ffaab 106BuildRequires: xorg-lib-libXinerama-devel
de5abc0a 107BuildRequires: xorg-lib-libXt-devel
54d6358a 108%{?with_pgo:BuildRequires: xorg-xserver-Xvfb}
b0a3aa79 109BuildRequires: zip
1dd3785b 110BuildRequires: zlib-devel >= 1.2.3
54d6358a 111BuildConflicts: %{name}-devel < %{version}
f37c2ce5 112Requires(post): mktemp >= 1.5-18
82f4f456 113Requires: browser-plugins >= 2.0
96ef4151 114Requires: desktop-file-utils
c5cd9be2 115Requires: hicolor-icon-theme
d97ddc70 116Requires: myspell-common
96ef4151
JB
117Requires: nspr >= 1:%{nspr_ver}
118Requires: nss >= 1:%{nss_ver}
54d6358a 119Requires: %{name}-libs = %{version}-%{release}
0d52cac8 120Provides: wwwbrowser
54d6358a 121Obsoletes: iceweasel
51c0f20a 122Obsoletes: mozilla-firebird
54d6358a 123Obsoletes: mozilla-firefox
2620301e 124Obsoletes: mozilla-firefox-lang-en < 2.0.0.8-3
c2814220 125Obsoletes: mozilla-firefox-libs
54d6358a
JR
126Obsoletes: xulrunner
127Obsoletes: xulrunner-gnome
128Conflicts: firefox-lang-resources < %{version}
ea721d92 129BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
130
96ef4151
JB
131%define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+
132
54d6358a
JR
133# don't satisfy other packages
134%define _noautoprovfiles %{_libdir}/%{name}
135
4c7e703c 136# and as we don't provide them, don't require either
54d6358a 137%define _noautoreq libmozjs.so libxul.so
c14d6140 138
ea721d92 139%description
54d6358a
JR
140Firefox is an open-source web browser, designed for standards
141compliance, performance and portability.
142
143%description -l hu.UTF-8
144Firefox egy nyílt forrású webböngésző, hatékonyságra és
145hordozhatóságra tervezve.
ea721d92 146
eace6cdf 147%description -l pl.UTF-8
54d6358a
JR
148Firefox jest przeglądarką WWW rozpowszechnianą zgodnie z ideami
149ruchu otwartego oprogramowania oraz tworzoną z myślą o zgodności ze
150standardami, wydajnością i przenośnością.
151
152%package libs
153Summary: Firefox shared libraries
154Summary(pl.UTF-8): Biblioteki współdzielone Firefoxa
155Group: X11/Libraries
156Requires: cairo >= 1.10.2-5
157Requires: dbus-glib >= 0.60
158Requires: glib2 >= 1:2.22
159%{!?with_gtk3:Requires: gtk+2 >= 2:2.18.0}
160%{?with_gtk3:Requires: gtk+3 >= 3.4.0}
161Requires: libjpeg-turbo
162Requires: libpng >= 2:1.6.16
163Requires: libpng(APNG) >= 0.10
164Requires: libvpx >= 1.3.0
165Requires: pango >= 1:1.22.0
166Requires: sqlite3 >= %{sqlite_build_version}
167Requires: startup-notification >= 0.8
168Provides: xulrunner-libs = 2:%{version}-%{release}
169Obsoletes: iceweasel-libs
170Obsoletes: xulrunner-libs
171
172%description libs
173XULRunner shared libraries.
174
175%description libs -l pl.UTF-8
176Biblioteki współdzielone XULRunnera.
177
178%package devel
179Summary: Headers for developing programs that will use Firefox
180Summary(pl.UTF-8): Pliki nagłówkowe do tworzenia programów używających Firefox
181Group: X11/Development/Libraries
182Requires: %{name}-libs = %{version}-%{release}
183Requires: nspr-devel >= 1:%{nspr_ver}
184Requires: nss-devel >= 1:%{nss_ver}
185Requires: python-ply
186Provides: xulrunner-devel = 2:%{version}-%{release}
187Obsoletes: iceweasel-devel
188Obsoletes: mozilla-devel
189Obsoletes: mozilla-firefox-devel
190Obsoletes: seamonkey-devel
191Obsoletes: xulrunner-devel
192
193%description devel
194Firefox development package.
195
196%description devel -l pl.UTF-8
197Pakiet programistyczny Firefoxa.
ea721d92 198
199%prep
54d6358a
JR
200%setup -q
201
202# avoid using included headers (-I. is before HUNSPELL_CFLAGS)
203%{__rm} extensions/spellcheck/hunspell/src/{*.hxx,hunspell.h}
204# hunspell needed for factory including mozHunspell.h
205echo 'LOCAL_INCLUDES += $(MOZ_HUNSPELL_CFLAGS)' >> extensions/spellcheck/src/Makefile.in
206
207%patch1 -p2
208%patch2 -p1
209%patch3 -p2
210%patch4 -p1
211%patch5 -p2
212%patch6 -p1
d1eea1c3 213%patch7 -p1
54d6358a
JR
214%patch8 -p2
215#%patch9 -p2
96ef4151 216%patch11 -p2
534550cc 217%patch12 -p1
54d6358a
JR
218%patch14 -p2
219
220cp -a xulrunner/installer/*.pc.in browser/installer/
221
222%if %{with pgo}
223sed -i -e 's@__BROWSER_PATH__@"../../dist/bin/firefox-bin"@' build/automation.py.in
224%endif
29b16068 225
ea721d92 226%build
54d6358a 227cp -p %{_datadir}/automake/config.* build/autoconf
52befddb 228
08ccc3c5
JB
229cat << 'EOF' > .mozconfig
230. $topsrcdir/browser/config/mozconfig
52befddb 231
2620301e 232mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu}
2620301e 233
f37c2ce5 234# Options for 'configure' (same as command-line options).
c5cd9be2
JB
235ac_add_options --build=%{_target_platform}
236ac_add_options --host=%{_target_platform}
52befddb 237ac_add_options --prefix=%{_prefix}
238ac_add_options --exec-prefix=%{_exec_prefix}
239ac_add_options --bindir=%{_bindir}
240ac_add_options --sbindir=%{_sbindir}
241ac_add_options --sysconfdir=%{_sysconfdir}
242ac_add_options --datadir=%{_datadir}
243ac_add_options --includedir=%{_includedir}
244ac_add_options --libdir=%{_libdir}
245ac_add_options --libexecdir=%{_libexecdir}
246ac_add_options --localstatedir=%{_localstatedir}
247ac_add_options --sharedstatedir=%{_sharedstatedir}
248ac_add_options --mandir=%{_mandir}
249ac_add_options --infodir=%{_infodir}
cf471ce5 250%if %{?debug:1}0
f37c2ce5 251ac_add_options --disable-optimize
52befddb 252ac_add_options --enable-debug
253ac_add_options --enable-debug-modules
f37c2ce5
ER
254ac_add_options --enable-debugger-info-modules
255ac_add_options --enable-crash-on-assert
52befddb 256%else
257ac_add_options --disable-debug
2620301e 258ac_add_options --disable-debug-modules
2a673919 259ac_add_options --enable-optimize="%{rpmcflags} -Os"
52befddb 260%endif
d97ddc70
JB
261ac_add_options --disable-strip
262ac_add_options --disable-strip-libs
c5cd9be2 263ac_add_options --disable-install-strip
52befddb 264%if %{with tests}
265ac_add_options --enable-tests
a9334f16 266ac_add_options --enable-mochitest
c4f9bb37 267%else
54d6358a
JR
268%if %{with pgo}
269ac_add_options --enable-tests
270%else
52befddb 271ac_add_options --disable-tests
54d6358a 272%endif
a9334f16 273ac_add_options --disable-mochitest
c4f9bb37 274%endif
a9334f16 275ac_add_options --disable-cpp-exceptions
c5cd9be2
JB
276ac_add_options --disable-crashreporter
277ac_add_options --disable-elf-dynstr-gc
278ac_add_options --disable-gconf
f37c2ce5 279ac_add_options --disable-gnomeui
6800f9e1 280ac_add_options --disable-gnomevfs
52befddb 281ac_add_options --disable-installer
f37c2ce5 282ac_add_options --disable-javaxpcom
c5cd9be2 283ac_add_options --disable-long-long-warning
a9334f16 284ac_add_options --disable-necko-wifi
c5cd9be2 285ac_add_options --disable-pedantic
f37c2ce5 286ac_add_options --disable-updater
c5cd9be2
JB
287ac_add_options --disable-xterm-updates
288ac_add_options --enable-canvas
a9334f16
JB
289ac_add_options --enable-chrome-format=omni
290ac_add_options --enable-default-toolkit=%{?with_gtk3:cairo-gtk3}%{!?with_gtk3:cairo-gtk2}
08ccc3c5 291ac_add_options --enable-extensions=default
0fca8d8d 292ac_add_options --enable-gio
08ccc3c5 293ac_add_options --enable-gstreamer=1.0
d97ddc70 294ac_add_options --enable-libxul
c5cd9be2 295ac_add_options --enable-mathml
d97ddc70 296ac_add_options --enable-pango
c5cd9be2 297ac_add_options --enable-readline
a9334f16 298ac_add_options --enable-safe-browsing
08ccc3c5 299%{?with_shared_js:ac_add_options --enable-shared-js}
2a673919 300ac_add_options --enable-startup-notification
c5cd9be2 301ac_add_options --enable-svg
52befddb 302ac_add_options --enable-system-cairo
c5cd9be2 303ac_add_options --enable-system-ffi
d97ddc70 304ac_add_options --enable-system-hunspell
dfdf0ac8 305ac_add_options --enable-system-sqlite
c5cd9be2 306ac_add_options --enable-url-classifier
a9334f16 307ac_add_options --enable-xinerama
54d6358a 308ac_add_options --enable-official-branding
c5cd9be2 309ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
f37c2ce5 310ac_add_options --with-distribution-id=org.pld-linux
2a673919 311ac_add_options --with-pthreads
d97ddc70 312ac_add_options --with-system-bz2
a86b0951 313ac_add_options --with-system-icu
2620301e 314ac_add_options --with-system-jpeg
0fca8d8d
JB
315ac_add_options --with-system-libevent
316ac_add_options --with-system-libvpx
52befddb 317ac_add_options --with-system-nspr
f37c2ce5 318ac_add_options --with-system-nss
c5cd9be2 319ac_add_options --with-system-ply
f37c2ce5 320ac_add_options --with-system-png
2620301e 321ac_add_options --with-system-zlib
c5cd9be2 322ac_add_options --with-x
52befddb 323EOF
33f81726 324
54d6358a
JR
325%if %{with pgo}
326D=$(( RANDOM % (200 - 100 + 1 ) + 5 ))
327/usr/bin/Xvfb :${D} &
328XVFB_PID=$!
329[ -n "$XVFB_PID" ] || exit 1
330export DISPLAY=:${D}
331%{__make} -j1 -f client.mk profiledbuild \
332 DESTDIR=obj-%{_target_cpu}/dist \
333 CC="%{__cc}" \
334 CXX="%{__cxx}" \
335 MOZ_MAKE_FLAGS="%{_smp_mflags}"
336kill $XVFB_PID
337%else
08ccc3c5 338%{__make} -j1 -f client.mk build \
3d445135 339 CC="%{__cc}" \
08ccc3c5
JB
340 CXX="%{__cxx}" \
341 MOZ_MAKE_FLAGS="%{_smp_mflags}"
54d6358a 342%endif
ea721d92 343
344%install
345rm -rf $RPM_BUILD_ROOT
45f27404 346install -d \
f37c2ce5 347 $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}} \
c5cd9be2
JB
348 $RPM_BUILD_ROOT%{_desktopdir} \
349 $RPM_BUILD_ROOT%{_datadir}/%{name}/browser \
54d6358a
JR
350 $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/plugins \
351 $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/{lib,bin} \
352 $RPM_BUILD_ROOT%{_includedir}/%{name} \
353 $RPM_BUILD_ROOT%{_datadir}/idl/%{name} \
354 $RPM_BUILD_ROOT%{_pkgconfigdir}
75e09104 355
c5cd9be2 356%browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/browser/plugins
8bc15110 357
54d6358a
JR
358cd obj-%{_target_cpu}
359%{__make} -C browser/installer stage-package libxul.pc libxul-embedding.pc mozilla-js.pc mozilla-plugin.pc \
d541162e 360 DESTDIR=$RPM_BUILD_ROOT \
c5cd9be2 361 installdir=%{_libdir}/%{name} \
54d6358a 362 INSTALL_SDK=1 \
f37c2ce5 363 PKG_SKIP_STRIP=1
ea721d92 364
54d6358a
JR
365cp -aL browser/installer/*.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
366cp -aL dist/firefox/* $RPM_BUILD_ROOT%{_libdir}/%{name}/
367cp -aL dist/idl/* $RPM_BUILD_ROOT%{_datadir}/idl/%{name}
368cp -aL dist/include/* $RPM_BUILD_ROOT%{_includedir}/%{name}
369cp -aL dist/include/xpcom-config.h $RPM_BUILD_ROOT%{_libdir}/%{name}-devel
370cp -aL dist/sdk/lib/* $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/lib
371cp -aL dist/sdk/bin/* $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/bin
372find $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk -name "*.pyc" | xargs rm -f
373
374ln -s %{_libdir}/%{name} $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/bin
375ln -s %{_includedir}/%{name} $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/include
376ln -s %{_datadir}/idl/%{name} $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/idl
377ln -s %{_libdir}/%{name}-devel/sdk/lib $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/lib
378
379# replace copies with symlinks
380%{?with_shared_js:ln -sf %{_libdir}/%{name}/libmozjs.so $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/lib/libmozjs.so}
381ln -sf %{_libdir}/%{name}/libxul.so $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/lib/libxul.so
382# temp fix for https://bugzilla.mozilla.org/show_bug.cgi?id=63955
383chmod a+rx $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/bin/xpt.py
0fca8d8d 384
f86547d4 385# move arch independant ones to datadir
c5cd9be2 386mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/chrome
8e79a8c3 387mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/extensions $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/extensions
c5cd9be2 388mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/icons $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/icons
c5cd9be2
JB
389mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults
390mv $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/{pref,preferences}
d97ddc70 391
c5cd9be2
JB
392ln -s ../../../share/%{name}/browser/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/chrome
393ln -s ../../../share/%{name}/browser/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/defaults
8e79a8c3 394ln -s ../../../share/%{name}/browser/extensions $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/extensions
c5cd9be2 395ln -s ../../../share/%{name}/browser/icons $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/icons
f86547d4 396
f1613d3d 397%{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
4d687af8
ER
398ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
399
54d6358a
JR
400sed 's,@LIBDIR@,%{_libdir},' %{SOURCE4} > $RPM_BUILD_ROOT%{_bindir}/firefox
401chmod 755 $RPM_BUILD_ROOT%{_bindir}/firefox
ea721d92 402
c5cd9be2 403# install icons and desktop file
54d6358a 404for i in 16 22 24 32 48 256; do
c5cd9be2 405 install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps
54d6358a
JR
406 cp -a ../browser/branding/official/default${i}.png \
407 $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps/firefox.png
c5cd9be2
JB
408done
409
96ef4151 410cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
ea721d92 411
c5cd9be2
JB
412# install our settings
413%if "%{pld_release}" == "ac"
414cp -a %{SOURCE6} $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/preferences/vendor.js
415%else
416cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/preferences/vendor.js
417%endif
418
d97ddc70 419# files created by firefox -register
c5cd9be2
JB
420touch $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/components/compreg.dat
421touch $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/components/xpti.dat
f37c2ce5
ER
422
423cat << 'EOF' > $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate
6d77929c 424#!/bin/sh
050f03d2 425umask 022
c5cd9be2 426rm -f %{_libdir}/%{name}/browser/components/{compreg,xpti}.dat
3eeab518 427
f37c2ce5
ER
428# it attempts to touch files in $HOME/.mozilla
429# beware if you run this with sudo!!!
430export HOME=$(mktemp -d)
431# also TMPDIR could be pointing to sudo user's homedir
432unset TMPDIR TMP || :
3eeab518 433
6162f349 434%{_libdir}/%{name}/firefox -register
3eeab518 435
56143477 436rm -rf $HOME
6d77929c 437EOF
82f606de 438chmod 755 $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate
3eeab518 439
6d77929c
JB
440%clean
441rm -rf $RPM_BUILD_ROOT
3eeab518 442
6d77929c 443%post
f37c2ce5 444%{_sbindir}/%{name}-chrome+xpcom-generate
4d9eecad 445%update_browser_plugins
c5cd9be2 446%update_icon_cache hicolor
96ef4151 447%update_desktop_database
4d9eecad
ER
448
449%postun
450if [ "$1" = 0 ]; then
451 %update_browser_plugins
c5cd9be2 452 %update_icon_cache hicolor
4d9eecad 453fi
ea0245e6 454
ea721d92 455%files
456%defattr(644,root,root,755)
f37c2ce5 457%attr(755,root,root) %{_bindir}/%{name}
f37c2ce5
ER
458%attr(755,root,root) %{_sbindir}/%{name}-chrome+xpcom-generate
459
54d6358a
JR
460%{_desktopdir}/firefox.desktop
461%{_iconsdir}/hicolor/*/apps/firefox.png
c5cd9be2 462
4d9eecad
ER
463# browser plugins v2
464%{_browserpluginsconfdir}/browsers.d/%{name}.*
465%config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
466
c5cd9be2
JB
467%dir %{_libdir}/%{name}/browser
468%dir %{_libdir}/%{name}/browser/components
c5cd9be2 469%dir %{_libdir}/%{name}/browser/plugins
54d6358a 470%dir %{_libdir}/%{name}/browser/features
c5cd9be2
JB
471
472%dir %{_datadir}/%{name}
473%dir %{_datadir}/%{name}/browser
8e79a8c3 474%dir %{_datadir}/%{name}/browser/extensions
c5cd9be2
JB
475%{_datadir}/%{name}/browser/chrome
476%{_datadir}/%{name}/browser/defaults
477%{_datadir}/%{name}/browser/icons
2a673919 478
c5cd9be2 479# symlinks
8e79a8c3 480%{_libdir}/%{name}/browser/extensions
c5cd9be2
JB
481%{_libdir}/%{name}/browser/chrome
482%{_libdir}/%{name}/browser/icons
c5cd9be2 483%{_libdir}/%{name}/browser/defaults
2a673919 484
c5cd9be2
JB
485%attr(755,root,root) %{_libdir}/%{name}/firefox
486%attr(755,root,root) %{_libdir}/%{name}/firefox-bin
487%attr(755,root,root) %{_libdir}/%{name}/run-mozilla.sh
2a673919 488%{_libdir}/%{name}/application.ini
c5cd9be2
JB
489%{_libdir}/%{name}/browser/blocklist.xml
490%{_libdir}/%{name}/browser/chrome.manifest
491%{_libdir}/%{name}/browser/components/components.manifest
492%attr(755,root,root) %{_libdir}/%{name}/browser/components/libbrowsercomps.so
493# the signature of the default theme
54d6358a 494%{_datadir}/%{name}/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi
c5cd9be2
JB
495%{_libdir}/%{name}/browser/omni.ja
496%{_libdir}/%{name}/webapprt
497%attr(755,root,root) %{_libdir}/%{name}/webapprt-stub
0fca8d8d 498
54d6358a
JR
499%{_libdir}/%{name}/browser/features/loop@mozilla.org.xpi
500
c5cd9be2
JB
501# files created by firefox -register
502%ghost %{_libdir}/%{name}/browser/components/compreg.dat
503%ghost %{_libdir}/%{name}/browser/components/xpti.dat
0fca8d8d 504
82f606de 505%attr(755,root,root) %{_libdir}/%{name}/plugin-container
f99152f1 506%{_libdir}/%{name}/dictionaries
82f4f456
JB
507
508%dir %{_libdir}/%{name}/gmp-clearkey
509%dir %{_libdir}/%{name}/gmp-clearkey/0.1
510%{_libdir}/%{name}/gmp-clearkey/0.1/clearkey.info
511%attr(755,root,root) %{_libdir}/%{name}/gmp-clearkey/0.1/libclearkey.so
54d6358a
JR
512
513%files libs
514%defattr(644,root,root,755)
515%dir %{_libdir}/%{name}
516%{_libdir}/%{name}/platform.ini
517%{?with_shared_js:%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so}
518%attr(755,root,root) %{_libdir}/%{name}/liblgpllibs.so
519%attr(755,root,root) %{_libdir}/%{name}/libxul.so
520%{_libdir}/%{name}/dependentlibs.list
521%{_libdir}/%{name}/omni.ja
522
523%files devel
524%defattr(644,root,root,755)
525%{_includedir}/%{name}
526%{_datadir}/idl/%{name}
527%dir %{_libdir}/%{name}-devel
528%{_libdir}/%{name}-devel/bin
529%{_libdir}/%{name}-devel/idl
530%{_libdir}/%{name}-devel/lib
531%{_libdir}/%{name}-devel/include
532%{_libdir}/%{name}-devel/*.h
533%dir %{_libdir}/%{name}-devel/sdk
534%{_libdir}/%{name}-devel/sdk/lib
535%dir %{_libdir}/%{name}-devel/sdk/bin
536%attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/header.py
537%attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/run-mozilla.sh
538%attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/typelib.py
539%attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/xpcshell
540%attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/xpidl.py
541%{_libdir}/%{name}-devel/sdk/bin/xpidllex.py
542%{_libdir}/%{name}-devel/sdk/bin/xpidlyacc.py
543%attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/xpt.py
544%{_libdir}/%{name}-devel/sdk/bin/ply
545
546%{_pkgconfigdir}/libxul.pc
547%{_pkgconfigdir}/libxul-embedding.pc
548%{_pkgconfigdir}/mozilla-js.pc
549%{_pkgconfigdir}/mozilla-plugin.pc
This page took 0.172475 seconds and 4 git commands to generate.