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