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