]>
Commit | Line | Data |
---|---|---|
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 |
86c073e4 | 9 | %bcond_with pgo # PGO-enabled build (requires working $DISPLAY == :100) |
54d6358a JR |
10 | # - disabled shared_js - https://bugzilla.mozilla.org/show_bug.cgi?id=1039964 |
11 | %bcond_with shared_js # shared libmozjs library [broken] | |
51667f5d | 12 | %bcond_without system_icu # build without system ICU |
5086fbc4 | 13 | %bcond_with clang # build using Clang/LLVM |
54d6358a JR |
14 | |
15 | # On updating version, grab CVE links from: | |
16 | # https://www.mozilla.org/security/known-vulnerabilities/firefox.html | |
17 | # Release Notes: | |
18 | # https://developer.mozilla.org/en-US/Firefox/Releases | |
2a673919 | 19 | |
d97ddc70 JB |
20 | # The actual sqlite version (see RHBZ#480989): |
21 | %define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR) | |
d97ddc70 | 22 | |
ae1a4597 JB |
23 | %define nspr_ver 4.14 |
24 | %define nss_ver 3.30.2 | |
54d6358a JR |
25 | |
26 | Summary: Firefox web browser | |
27 | Summary(hu.UTF-8): Firefox web böngésző | |
28 | Summary(pl.UTF-8): Firefox - przeglądarka WWW | |
29 | Name: firefox | |
ac574042 | 30 | Version: 55.0.2 |
18a7a80a | 31 | Release: 1 |
a9334f16 | 32 | License: MPL v2.0 |
51c0f20a | 33 | Group: X11/Applications/Networking |
54d6358a | 34 | Source0: http://releases.mozilla.org/pub/mozilla.org/firefox/releases/%{version}/source/firefox-%{version}.source.tar.xz |
ac574042 | 35 | # Source0-md5: d1e65708db51034d2ad090b4bfba7f1c |
96ef4151 JB |
36 | Source3: %{name}.desktop |
37 | Source4: %{name}.sh | |
c5cd9be2 JB |
38 | Source5: vendor.js |
39 | Source6: vendor-ac.js | |
f0a96e4f | 40 | Patch0: idl-parser.patch |
f0a96e4f | 41 | Patch2: xulrunner-paths.patch |
f0a96e4f JR |
42 | Patch4: %{name}-prefs.patch |
43 | Patch5: %{name}-pld-bookmarks.patch | |
44 | Patch6: %{name}-no-subshell.patch | |
45 | Patch7: %{name}-middle_click_paste.patch | |
46 | Patch8: %{name}-system-virtualenv.patch | |
47 | Patch9: %{name}-Disable-Firefox-Health-Report.patch | |
48 | Patch10: freetype.patch | |
54d6358a | 49 | URL: https://www.mozilla.org/firefox/ |
0fca8d8d | 50 | BuildRequires: OpenGL-devel |
d97ddc70 | 51 | BuildRequires: alsa-lib-devel |
e933d2a8 | 52 | BuildRequires: automake |
f0a96e4f | 53 | BuildRequires: autoconf2_13 |
d97ddc70 | 54 | BuildRequires: bzip2-devel |
0fca8d8d | 55 | BuildRequires: cairo-devel >= 1.10.2-5 |
daa24698 | 56 | BuildRequires: cargo |
09328230 | 57 | BuildRequires: dbus-glib-devel >= 0.60 |
504c563f | 58 | BuildRequires: fontconfig-devel >= 1:2.7.0 |
37413542 | 59 | BuildRequires: freetype-devel >= 1:2.1.8 |
c5cd9be2 | 60 | BuildRequires: gcc-c++ >= 6:4.4 |
d0a1bb80 | 61 | BuildRequires: glib2-devel >= 1:2.22 |
08ccc3c5 JB |
62 | BuildRequires: gstreamer-devel >= 1.0 |
63 | BuildRequires: 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} |
76f62688 | 67 | BuildRequires: hunspell-devel >= 1.6.1 |
8a88dcf7 | 68 | BuildRequires: libIDL-devel >= 0.8.0 |
d0a1bb80 JB |
69 | # DECnet (dnprogs.spec), not dummy net (libdnet.spec) |
70 | #BuildRequires: libdnet-devel | |
0fca8d8d | 71 | BuildRequires: libevent-devel >= 1.4.7 |
4ac83cfe JB |
72 | # standalone libffi 3.0.9 or gcc's from 4.5(?)+ |
73 | BuildRequires: libffi-devel >= 6:3.0.9 | |
edc68de2 | 74 | %{?with_system_icu:BuildRequires: libicu-devel >= 58.1} |
96ef4151 | 75 | # requires libjpeg-turbo implementing at least libjpeg 6b API |
ea721d92 | 76 | BuildRequires: libjpeg-devel >= 6b |
96ef4151 | 77 | BuildRequires: libjpeg-turbo-devel |
2a673919 | 78 | BuildRequires: libpng(APNG)-devel >= 0.10 |
18a7a80a | 79 | BuildRequires: libpng-devel >= 2:1.6.28 |
c5cd9be2 | 80 | BuildRequires: libstdc++-devel >= 6:4.4 |
504c563f | 81 | BuildRequires: libvpx-devel >= 1.5.0 |
96ef4151 JB |
82 | BuildRequires: nspr-devel >= 1:%{nspr_ver} |
83 | BuildRequires: nss-devel >= 1:%{nss_ver} | |
08ccc3c5 | 84 | BuildRequires: pango-devel >= 1:1.22.0 |
a9334f16 | 85 | BuildRequires: pixman-devel >= 0.19.2 |
56cf7ebf | 86 | BuildRequires: perl-modules >= 5.004 |
1bb00684 | 87 | BuildRequires: pkgconfig |
b73005e5 | 88 | BuildRequires: pkgconfig(libffi) >= 3.0.9 |
08ccc3c5 | 89 | BuildRequires: pulseaudio-devel |
37413542 | 90 | BuildRequires: python-modules >= 1:2.5 |
54d6358a | 91 | %{?with_pgo:BuildRequires: python-modules-sqlite} |
a86b0951 | 92 | BuildRequires: python-simplejson |
89390b0e | 93 | BuildRequires: python-virtualenv >= 15 |
08ccc3c5 | 94 | BuildRequires: readline-devel |
6b1581cf | 95 | BuildRequires: rpm >= 4.4.9-56 |
9df03825 | 96 | BuildRequires: rpmbuild(macros) >= 1.601 |
daa24698 | 97 | BuildRequires: rust |
54d6358a | 98 | BuildRequires: sed >= 4.0 |
8323a6a7 | 99 | BuildRequires: sqlite3-devel >= 3.17.0 |
d97ddc70 | 100 | BuildRequires: startup-notification-devel >= 0.8 |
7bfe3691 | 101 | BuildRequires: xorg-lib-libX11-devel |
0fca8d8d | 102 | BuildRequires: xorg-lib-libXScrnSaver-devel |
7bfe3691 JB |
103 | BuildRequires: xorg-lib-libXcomposite-devel |
104 | BuildRequires: xorg-lib-libXdamage-devel | |
446ffaab | 105 | BuildRequires: xorg-lib-libXext-devel |
7bfe3691 | 106 | BuildRequires: xorg-lib-libXfixes-devel |
446ffaab | 107 | BuildRequires: xorg-lib-libXinerama-devel |
de5abc0a | 108 | BuildRequires: xorg-lib-libXt-devel |
54d6358a | 109 | %{?with_pgo:BuildRequires: xorg-xserver-Xvfb} |
7bfe3691 JB |
110 | %ifarch %{x8664} |
111 | BuildRequires: yasm >= 1.0.1 | |
112 | %endif | |
b0a3aa79 | 113 | BuildRequires: zip |
1dd3785b | 114 | BuildRequires: zlib-devel >= 1.2.3 |
54d6358a | 115 | BuildConflicts: %{name}-devel < %{version} |
f37c2ce5 | 116 | Requires(post): mktemp >= 1.5-18 |
82f4f456 | 117 | Requires: browser-plugins >= 2.0 |
76f62688 JR |
118 | Requires: cairo >= 1.10.2-5 |
119 | Requires: dbus-glib >= 0.60 | |
96ef4151 | 120 | Requires: desktop-file-utils |
76f62688 JR |
121 | Requires: fontconfig-libs >= 1:2.7.0 |
122 | Requires: glib2 >= 1:2.22 | |
123 | %{!?with_gtk3:Requires: gtk+2 >= 2:2.18.0} | |
124 | %{?with_gtk3:Requires: gtk+3 >= 3.4.0} | |
c5cd9be2 | 125 | Requires: hicolor-icon-theme |
76f62688 | 126 | Requires: libjpeg-turbo |
18a7a80a | 127 | Requires: libpng >= 2:1.6.28 |
76f62688 JR |
128 | Requires: libpng(APNG) >= 0.10 |
129 | Requires: libvpx >= 1.5.0 | |
d97ddc70 | 130 | Requires: myspell-common |
96ef4151 JB |
131 | Requires: nspr >= 1:%{nspr_ver} |
132 | Requires: nss >= 1:%{nss_ver} | |
76f62688 JR |
133 | Requires: pango >= 1:1.22.0 |
134 | Requires: sqlite3 >= %{sqlite_build_version} | |
135 | Requires: startup-notification >= 0.8 | |
136 | Provides: xulrunner-libs = 2:%{version}-%{release} | |
0d52cac8 | 137 | Provides: wwwbrowser |
76f62688 | 138 | Obsoletes: firefox-devel |
df016d82 | 139 | Obsoletes: firefox-libs |
54d6358a | 140 | Obsoletes: iceweasel |
76f62688 | 141 | Obsoletes: iceweasel-libs |
51c0f20a | 142 | Obsoletes: mozilla-firebird |
54d6358a | 143 | Obsoletes: mozilla-firefox |
2620301e | 144 | Obsoletes: mozilla-firefox-lang-en < 2.0.0.8-3 |
c2814220 | 145 | Obsoletes: mozilla-firefox-libs |
54d6358a JR |
146 | Obsoletes: xulrunner |
147 | Obsoletes: xulrunner-gnome | |
76f62688 | 148 | Obsoletes: xulrunner-libs |
54d6358a | 149 | Conflicts: firefox-lang-resources < %{version} |
ea721d92 | 150 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
151 | ||
96ef4151 JB |
152 | %define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+ |
153 | ||
959fde77 | 154 | %if %{with clang} |
0922859c | 155 | %define filterout -fvar-tracking-assignments |
959fde77 JR |
156 | %endif |
157 | ||
54d6358a JR |
158 | # don't satisfy other packages |
159 | %define _noautoprovfiles %{_libdir}/%{name} | |
160 | ||
4c7e703c | 161 | # and as we don't provide them, don't require either |
18a7a80a | 162 | %define _noautoreq liblgpllibs.so libmozavcodec.so libmozavutil.so libmozgtk.so libmozjs.so libmozsandbox.so libxul.so |
c14d6140 | 163 | |
ea721d92 | 164 | %description |
54d6358a JR |
165 | Firefox is an open-source web browser, designed for standards |
166 | compliance, performance and portability. | |
167 | ||
168 | %description -l hu.UTF-8 | |
169 | Firefox egy nyílt forrású webböngésző, hatékonyságra és | |
170 | hordozhatóságra tervezve. | |
ea721d92 | 171 | |
eace6cdf | 172 | %description -l pl.UTF-8 |
54d6358a JR |
173 | Firefox jest przeglądarką WWW rozpowszechnianą zgodnie z ideami |
174 | ruchu otwartego oprogramowania oraz tworzoną z myślą o zgodności ze | |
175 | standardami, wydajnością i przenośnością. | |
176 | ||
ae1a4597 JB |
177 | %package -n gmp-api |
178 | Summary: GeckoMediaPlugins API header files | |
179 | Summary(pl.UTF-8): Pliki nagłówkowe API GeckoMediaPlugins | |
180 | Group: Development/Libraries | |
181 | URL: https://wiki.mozilla.org/GeckoMediaPlugins | |
182 | # actually C++ compiler; STL is not even used | |
183 | Requires: libstdc++-devel | |
184 | ||
185 | %description -n gmp-api | |
186 | GeckoMediaPlugins API header files. | |
187 | ||
188 | %description -n gmp-api -l pl.UTF-8 | |
189 | Pliki nagłówkowe API GeckoMediaPlugins. | |
190 | ||
ea721d92 | 191 | %prep |
54d6358a JR |
192 | %setup -q |
193 | ||
194 | # avoid using included headers (-I. is before HUNSPELL_CFLAGS) | |
195 | %{__rm} extensions/spellcheck/hunspell/src/{*.hxx,hunspell.h} | |
196 | # hunspell needed for factory including mozHunspell.h | |
197 | echo 'LOCAL_INCLUDES += $(MOZ_HUNSPELL_CFLAGS)' >> extensions/spellcheck/src/Makefile.in | |
198 | ||
f0a96e4f | 199 | %patch0 -p2 |
f0a96e4f | 200 | %patch2 -p2 |
54d6358a | 201 | %patch4 -p1 |
f0a96e4f JR |
202 | %patch5 -p1 |
203 | %patch6 -p2 | |
d1eea1c3 | 204 | %patch7 -p1 |
54d6358a | 205 | %patch8 -p2 |
3c8a14c2 | 206 | %patch9 -p1 |
f0a96e4f | 207 | %patch10 -p2 |
54d6358a | 208 | |
89390b0e JB |
209 | %{__sed} -i -e '1s,/usr/bin/env python,%{__python},' xpcom/typelib/xpt/tools/xpt.py xpcom/idl-parser/xpidl/xpidl.py |
210 | ||
54d6358a | 211 | %if %{with pgo} |
89390b0e | 212 | %{__sed} -i -e 's@__BROWSER_PATH__@"../../dist/bin/firefox-bin"@' build/automation.py.in |
54d6358a | 213 | %endif |
29b16068 | 214 | |
ea721d92 | 215 | %build |
54d6358a | 216 | cp -p %{_datadir}/automake/config.* build/autoconf |
52befddb | 217 | |
08ccc3c5 JB |
218 | cat << 'EOF' > .mozconfig |
219 | . $topsrcdir/browser/config/mozconfig | |
52befddb | 220 | |
5086fbc4 JR |
221 | %if %{with clang} |
222 | export CC="clang" | |
223 | export CXX="clang++" | |
224 | %else | |
b3d69600 JP |
225 | export CC="%{__cc}" |
226 | export CXX="%{__cxx}" | |
959fde77 | 227 | %endif |
e783e2fa | 228 | export CFLAGS="%{rpmcflags} -D_FILE_OFFSET_BITS=64" |
c7de1677 | 229 | export CXXFLAGS="%{rpmcxxflags} -D_FILE_OFFSET_BITS=64" |
e783e2fa | 230 | |
2620301e | 231 | mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu} |
2620301e | 232 | |
f37c2ce5 | 233 | # Options for 'configure' (same as command-line options). |
c5cd9be2 | 234 | ac_add_options --host=%{_target_platform} |
52befddb | 235 | ac_add_options --prefix=%{_prefix} |
cf471ce5 | 236 | %if %{?debug:1}0 |
f37c2ce5 | 237 | ac_add_options --disable-optimize |
52befddb | 238 | ac_add_options --enable-debug |
239 | ac_add_options --enable-debug-modules | |
f37c2ce5 ER |
240 | ac_add_options --enable-debugger-info-modules |
241 | ac_add_options --enable-crash-on-assert | |
52befddb | 242 | %else |
243 | ac_add_options --disable-debug | |
4c3cba6f | 244 | ac_add_options --enable-optimize="%{rpmcflags}%{?with_pgo: -Os}" |
52befddb | 245 | %endif |
d97ddc70 | 246 | ac_add_options --disable-strip |
c5cd9be2 | 247 | ac_add_options --disable-install-strip |
52befddb | 248 | %if %{with tests} |
249 | ac_add_options --enable-tests | |
a9334f16 | 250 | ac_add_options --enable-mochitest |
c4f9bb37 | 251 | %else |
54d6358a JR |
252 | %if %{with pgo} |
253 | ac_add_options --enable-tests | |
254 | %else | |
52befddb | 255 | ac_add_options --disable-tests |
54d6358a | 256 | %endif |
c4f9bb37 | 257 | %endif |
c5cd9be2 | 258 | ac_add_options --disable-crashreporter |
c5cd9be2 | 259 | ac_add_options --disable-gconf |
a9334f16 | 260 | ac_add_options --disable-necko-wifi |
f37c2ce5 | 261 | ac_add_options --disable-updater |
7d0bd05d | 262 | ac_add_options --enable-alsa |
a9334f16 JB |
263 | ac_add_options --enable-chrome-format=omni |
264 | ac_add_options --enable-default-toolkit=%{?with_gtk3:cairo-gtk3}%{!?with_gtk3:cairo-gtk2} | |
08ccc3c5 | 265 | ac_add_options --enable-extensions=default |
c5cd9be2 | 266 | ac_add_options --enable-readline |
a9334f16 | 267 | ac_add_options --enable-safe-browsing |
08ccc3c5 | 268 | %{?with_shared_js:ac_add_options --enable-shared-js} |
2a673919 | 269 | ac_add_options --enable-startup-notification |
52befddb | 270 | ac_add_options --enable-system-cairo |
c5cd9be2 | 271 | ac_add_options --enable-system-ffi |
d97ddc70 | 272 | ac_add_options --enable-system-hunspell |
dfdf0ac8 | 273 | ac_add_options --enable-system-sqlite |
c5cd9be2 | 274 | ac_add_options --enable-url-classifier |
89390b0e | 275 | %{?with_official:ac_add_options --enable-official-branding} |
c5cd9be2 | 276 | ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name} |
f37c2ce5 | 277 | ac_add_options --with-distribution-id=org.pld-linux |
2a673919 | 278 | ac_add_options --with-pthreads |
d97ddc70 | 279 | ac_add_options --with-system-bz2 |
edc68de2 | 280 | ac_add_options --with%{!?with_system_icu:out}-system-icu |
2620301e | 281 | ac_add_options --with-system-jpeg |
0fca8d8d JB |
282 | ac_add_options --with-system-libevent |
283 | ac_add_options --with-system-libvpx | |
52befddb | 284 | ac_add_options --with-system-nspr |
f37c2ce5 | 285 | ac_add_options --with-system-nss |
f37c2ce5 | 286 | ac_add_options --with-system-png |
2620301e | 287 | ac_add_options --with-system-zlib |
c5cd9be2 | 288 | ac_add_options --with-x |
52befddb | 289 | EOF |
33f81726 | 290 | |
54d6358a JR |
291 | %if %{with pgo} |
292 | D=$(( RANDOM % (200 - 100 + 1 ) + 5 )) | |
293 | /usr/bin/Xvfb :${D} & | |
294 | XVFB_PID=$! | |
295 | [ -n "$XVFB_PID" ] || exit 1 | |
296 | export DISPLAY=:${D} | |
297 | %{__make} -j1 -f client.mk profiledbuild \ | |
f0a96e4f | 298 | AUTOCONF=/usr/bin/autoconf2_13 \ |
54d6358a | 299 | DESTDIR=obj-%{_target_cpu}/dist \ |
54d6358a JR |
300 | MOZ_MAKE_FLAGS="%{_smp_mflags}" |
301 | kill $XVFB_PID | |
302 | %else | |
08ccc3c5 | 303 | %{__make} -j1 -f client.mk build \ |
f0a96e4f | 304 | AUTOCONF=/usr/bin/autoconf2_13 \ |
08ccc3c5 | 305 | MOZ_MAKE_FLAGS="%{_smp_mflags}" |
54d6358a | 306 | %endif |
ea721d92 | 307 | |
308 | %install | |
309 | rm -rf $RPM_BUILD_ROOT | |
45f27404 | 310 | install -d \ |
f37c2ce5 | 311 | $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}} \ |
c5cd9be2 JB |
312 | $RPM_BUILD_ROOT%{_desktopdir} \ |
313 | $RPM_BUILD_ROOT%{_datadir}/%{name}/browser \ | |
54d6358a | 314 | $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/plugins \ |
54d6358a | 315 | $RPM_BUILD_ROOT%{_includedir}/%{name} \ |
54d6358a | 316 | $RPM_BUILD_ROOT%{_pkgconfigdir} |
75e09104 | 317 | |
c5cd9be2 | 318 | %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/browser/plugins |
8bc15110 | 319 | |
ae1a4597 JB |
320 | OBJDIR=obj-%{_target_cpu} |
321 | %{__make} -C ${OBJDIR}/browser/installer stage-package \ | |
d541162e | 322 | DESTDIR=$RPM_BUILD_ROOT \ |
c5cd9be2 | 323 | installdir=%{_libdir}/%{name} \ |
f37c2ce5 | 324 | PKG_SKIP_STRIP=1 |
ea721d92 | 325 | |
ae1a4597 | 326 | cp -aL ${OBJDIR}/dist/firefox/* $RPM_BUILD_ROOT%{_libdir}/%{name}/ |
0fca8d8d | 327 | |
f86547d4 | 328 | # move arch independant ones to datadir |
ae1a4597 JB |
329 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/chrome |
330 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/extensions $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/extensions | |
331 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/icons $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/icons | |
332 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults | |
333 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/{pref,preferences} | |
d97ddc70 | 334 | |
c5cd9be2 JB |
335 | ln -s ../../../share/%{name}/browser/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/chrome |
336 | ln -s ../../../share/%{name}/browser/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/defaults | |
8e79a8c3 | 337 | ln -s ../../../share/%{name}/browser/extensions $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/extensions |
c5cd9be2 | 338 | ln -s ../../../share/%{name}/browser/icons $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/icons |
f86547d4 | 339 | |
f1613d3d | 340 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries |
4d687af8 ER |
341 | ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries |
342 | ||
54d6358a JR |
343 | sed 's,@LIBDIR@,%{_libdir},' %{SOURCE4} > $RPM_BUILD_ROOT%{_bindir}/firefox |
344 | chmod 755 $RPM_BUILD_ROOT%{_bindir}/firefox | |
ea721d92 | 345 | |
c5cd9be2 | 346 | # install icons and desktop file |
89390b0e | 347 | for i in 16 32 48 %{?with_official:22 24 256}; do |
c5cd9be2 | 348 | install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps |
ae1a4597 | 349 | cp -a browser/branding/%{!?with_official:un}official/default${i}.png \ |
54d6358a | 350 | $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps/firefox.png |
c5cd9be2 JB |
351 | done |
352 | ||
96ef4151 | 353 | cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop |
ea721d92 | 354 | |
c5cd9be2 JB |
355 | # install our settings |
356 | %if "%{pld_release}" == "ac" | |
357 | cp -a %{SOURCE6} $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/preferences/vendor.js | |
358 | %else | |
359 | cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/preferences/vendor.js | |
360 | %endif | |
361 | ||
f37c2ce5 | 362 | cat << 'EOF' > $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate |
6d77929c | 363 | #!/bin/sh |
050f03d2 | 364 | umask 022 |
c5cd9be2 | 365 | rm -f %{_libdir}/%{name}/browser/components/{compreg,xpti}.dat |
3eeab518 | 366 | |
f37c2ce5 ER |
367 | # it attempts to touch files in $HOME/.mozilla |
368 | # beware if you run this with sudo!!! | |
369 | export HOME=$(mktemp -d) | |
370 | # also TMPDIR could be pointing to sudo user's homedir | |
371 | unset TMPDIR TMP || : | |
3eeab518 | 372 | |
6162f349 | 373 | %{_libdir}/%{name}/firefox -register |
3eeab518 | 374 | |
56143477 | 375 | rm -rf $HOME |
6d77929c | 376 | EOF |
82f606de | 377 | chmod 755 $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate |
3eeab518 | 378 | |
ae1a4597 JB |
379 | # GeckoMediaPlugin API headers |
380 | install -d $RPM_BUILD_ROOT%{_includedir} | |
381 | cp -pr dom/media/gmp/gmp-api $RPM_BUILD_ROOT%{_includedir} | |
382 | ||
6d77929c JB |
383 | %clean |
384 | rm -rf $RPM_BUILD_ROOT | |
3eeab518 | 385 | |
6d77929c | 386 | %post |
f37c2ce5 | 387 | %{_sbindir}/%{name}-chrome+xpcom-generate |
4d9eecad | 388 | %update_browser_plugins |
c5cd9be2 | 389 | %update_icon_cache hicolor |
96ef4151 | 390 | %update_desktop_database |
4d9eecad ER |
391 | |
392 | %postun | |
393 | if [ "$1" = 0 ]; then | |
394 | %update_browser_plugins | |
c5cd9be2 | 395 | %update_icon_cache hicolor |
4d9eecad | 396 | fi |
ea0245e6 | 397 | |
ea721d92 | 398 | %files |
399 | %defattr(644,root,root,755) | |
f37c2ce5 | 400 | %attr(755,root,root) %{_bindir}/%{name} |
f37c2ce5 ER |
401 | %attr(755,root,root) %{_sbindir}/%{name}-chrome+xpcom-generate |
402 | ||
54d6358a JR |
403 | %{_desktopdir}/firefox.desktop |
404 | %{_iconsdir}/hicolor/*/apps/firefox.png | |
c5cd9be2 | 405 | |
4d9eecad ER |
406 | # browser plugins v2 |
407 | %{_browserpluginsconfdir}/browsers.d/%{name}.* | |
408 | %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist | |
409 | ||
c5cd9be2 | 410 | %dir %{_libdir}/%{name}/browser |
c5cd9be2 | 411 | %dir %{_libdir}/%{name}/browser/plugins |
54d6358a | 412 | %dir %{_libdir}/%{name}/browser/features |
c5cd9be2 JB |
413 | |
414 | %dir %{_datadir}/%{name} | |
415 | %dir %{_datadir}/%{name}/browser | |
8e79a8c3 | 416 | %dir %{_datadir}/%{name}/browser/extensions |
c5cd9be2 JB |
417 | %{_datadir}/%{name}/browser/chrome |
418 | %{_datadir}/%{name}/browser/defaults | |
419 | %{_datadir}/%{name}/browser/icons | |
2a673919 | 420 | |
c5cd9be2 | 421 | # symlinks |
8e79a8c3 | 422 | %{_libdir}/%{name}/browser/extensions |
c5cd9be2 JB |
423 | %{_libdir}/%{name}/browser/chrome |
424 | %{_libdir}/%{name}/browser/icons | |
c5cd9be2 | 425 | %{_libdir}/%{name}/browser/defaults |
2a673919 | 426 | |
c5cd9be2 JB |
427 | %attr(755,root,root) %{_libdir}/%{name}/firefox |
428 | %attr(755,root,root) %{_libdir}/%{name}/firefox-bin | |
daa24698 | 429 | %attr(755,root,root) %{_libdir}/%{name}/pingsender |
c5cd9be2 | 430 | %attr(755,root,root) %{_libdir}/%{name}/run-mozilla.sh |
2a673919 | 431 | %{_libdir}/%{name}/application.ini |
8323a6a7 | 432 | %{_libdir}/%{name}/chrome.manifest |
c5cd9be2 JB |
433 | %{_libdir}/%{name}/browser/blocklist.xml |
434 | %{_libdir}/%{name}/browser/chrome.manifest | |
c5cd9be2 | 435 | # the signature of the default theme |
54d6358a | 436 | %{_datadir}/%{name}/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi |
c5cd9be2 | 437 | %{_libdir}/%{name}/browser/omni.ja |
0fca8d8d | 438 | |
a7284ee8 | 439 | %{_libdir}/%{name}/browser/features/aushelper@mozilla.org.xpi |
7bdd344a | 440 | %{_libdir}/%{name}/browser/features/clicktoplay-rollout@mozilla.org.xpi |
b1598639 JR |
441 | %{_libdir}/%{name}/browser/features/e10srollout@mozilla.org.xpi |
442 | %{_libdir}/%{name}/browser/features/firefox@getpocket.com.xpi | |
7bdd344a | 443 | %{_libdir}/%{name}/browser/features/followonsearch@mozilla.com.xpi |
daa24698 | 444 | %{_libdir}/%{name}/browser/features/screenshots@mozilla.org.xpi |
7bdd344a JR |
445 | %{_libdir}/%{name}/browser/features/shield-recipe-client@mozilla.org.xpi |
446 | %{_libdir}/%{name}/browser/features/webcompat@mozilla.org.xpi | |
54d6358a | 447 | |
82f606de | 448 | %attr(755,root,root) %{_libdir}/%{name}/plugin-container |
f99152f1 | 449 | %{_libdir}/%{name}/dictionaries |
82f4f456 | 450 | |
a7284ee8 JR |
451 | %dir %{_libdir}/%{name}/fonts |
452 | %{_libdir}/%{name}/fonts/EmojiOneMozilla.ttf | |
453 | ||
82f4f456 JB |
454 | %dir %{_libdir}/%{name}/gmp-clearkey |
455 | %dir %{_libdir}/%{name}/gmp-clearkey/0.1 | |
76f62688 | 456 | %{_libdir}/%{name}/gmp-clearkey/0.1/manifest.json |
82f4f456 | 457 | %attr(755,root,root) %{_libdir}/%{name}/gmp-clearkey/0.1/libclearkey.so |
76f62688 | 458 | %{!?with_system_icu:%{_libdir}/%{name}/icudt58l.dat} |
54d6358a | 459 | |
54d6358a JR |
460 | %dir %{_libdir}/%{name} |
461 | %{_libdir}/%{name}/platform.ini | |
462 | %{?with_shared_js:%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so} | |
463 | %attr(755,root,root) %{_libdir}/%{name}/liblgpllibs.so | |
464 | %attr(755,root,root) %{_libdir}/%{name}/libxul.so | |
b1598639 JR |
465 | %attr(755,root,root) %{_libdir}/%{name}/libmozavcodec.so |
466 | %attr(755,root,root) %{_libdir}/%{name}/libmozavutil.so | |
8323a6a7 | 467 | %attr(755,root,root) %{_libdir}/%{name}/libmozsandbox.so |
54d6358a JR |
468 | %{_libdir}/%{name}/dependentlibs.list |
469 | %{_libdir}/%{name}/omni.ja | |
4264118a JR |
470 | %if %{with gtk3} |
471 | %dir %{_libdir}/%{name}/gtk2 | |
472 | %attr(755,root,root) %{_libdir}/%{name}/gtk2/libmozgtk.so | |
473 | %attr(755,root,root) %{_libdir}/%{name}/libmozgtk.so | |
474 | %endif | |
ae1a4597 JB |
475 | |
476 | %files -n gmp-api | |
477 | %defattr(644,root,root,755) | |
478 | %{_includedir}/gmp-api |