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