]>
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] | |
edc68de2 | 12 | %bcond_with system_icu # build with system ICU (disabled due to crashes with system icu 58.2) |
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 | |
a9275cf8 JR |
22 | %define nspr_ver 4.13.1 |
23 | %define nss_ver 3.28.1 | |
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 | |
7ab9d54c JR |
29 | Version: 53.0 |
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 |
7ab9d54c | 34 | # Source0-md5: 73175f850d4ff6068c6af674df20477c |
96ef4151 JB |
35 | Source3: %{name}.desktop |
36 | Source4: %{name}.sh | |
c5cd9be2 JB |
37 | Source5: vendor.js |
38 | Source6: vendor-ac.js | |
f0a96e4f JR |
39 | Patch0: idl-parser.patch |
40 | Patch1: xulrunner-new-libxul.patch | |
41 | Patch2: xulrunner-paths.patch | |
42 | Patch3: xulrunner-pc.patch | |
43 | Patch4: %{name}-prefs.patch | |
44 | Patch5: %{name}-pld-bookmarks.patch | |
45 | Patch6: %{name}-no-subshell.patch | |
46 | Patch7: %{name}-middle_click_paste.patch | |
47 | Patch8: %{name}-system-virtualenv.patch | |
48 | Patch9: %{name}-Disable-Firefox-Health-Report.patch | |
49 | Patch10: freetype.patch | |
54d6358a | 50 | URL: https://www.mozilla.org/firefox/ |
0fca8d8d | 51 | BuildRequires: OpenGL-devel |
d97ddc70 | 52 | BuildRequires: alsa-lib-devel |
e933d2a8 | 53 | BuildRequires: automake |
f0a96e4f | 54 | BuildRequires: autoconf2_13 |
d97ddc70 | 55 | BuildRequires: bzip2-devel |
0fca8d8d | 56 | BuildRequires: cairo-devel >= 1.10.2-5 |
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} |
37413542 | 67 | BuildRequires: hunspell-devel >= 1.2.3 |
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 |
cf64da3b | 79 | BuildRequires: libpng-devel >= 2:1.6.25 |
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 |
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 |
96ef4151 | 117 | Requires: desktop-file-utils |
c5cd9be2 | 118 | Requires: hicolor-icon-theme |
d97ddc70 | 119 | Requires: myspell-common |
96ef4151 JB |
120 | Requires: nspr >= 1:%{nspr_ver} |
121 | Requires: nss >= 1:%{nss_ver} | |
54d6358a | 122 | Requires: %{name}-libs = %{version}-%{release} |
0d52cac8 | 123 | Provides: wwwbrowser |
54d6358a | 124 | Obsoletes: iceweasel |
51c0f20a | 125 | Obsoletes: mozilla-firebird |
54d6358a | 126 | Obsoletes: mozilla-firefox |
2620301e | 127 | Obsoletes: mozilla-firefox-lang-en < 2.0.0.8-3 |
c2814220 | 128 | Obsoletes: mozilla-firefox-libs |
54d6358a JR |
129 | Obsoletes: xulrunner |
130 | Obsoletes: xulrunner-gnome | |
131 | Conflicts: firefox-lang-resources < %{version} | |
ea721d92 | 132 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
133 | ||
96ef4151 JB |
134 | %define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+ |
135 | ||
54d6358a JR |
136 | # don't satisfy other packages |
137 | %define _noautoprovfiles %{_libdir}/%{name} | |
138 | ||
4c7e703c | 139 | # and as we don't provide them, don't require either |
54d6358a | 140 | %define _noautoreq libmozjs.so libxul.so |
c14d6140 | 141 | |
ea721d92 | 142 | %description |
54d6358a JR |
143 | Firefox is an open-source web browser, designed for standards |
144 | compliance, performance and portability. | |
145 | ||
146 | %description -l hu.UTF-8 | |
147 | Firefox egy nyílt forrású webböngésző, hatékonyságra és | |
148 | hordozhatóságra tervezve. | |
ea721d92 | 149 | |
eace6cdf | 150 | %description -l pl.UTF-8 |
54d6358a JR |
151 | Firefox jest przeglądarką WWW rozpowszechnianą zgodnie z ideami |
152 | ruchu otwartego oprogramowania oraz tworzoną z myślą o zgodności ze | |
153 | standardami, wydajnością i przenośnością. | |
154 | ||
155 | %package libs | |
156 | Summary: Firefox shared libraries | |
157 | Summary(pl.UTF-8): Biblioteki współdzielone Firefoxa | |
158 | Group: X11/Libraries | |
159 | Requires: cairo >= 1.10.2-5 | |
160 | Requires: dbus-glib >= 0.60 | |
504c563f | 161 | Requires: fontconfig-libs >= 1:2.7.0 |
54d6358a JR |
162 | Requires: glib2 >= 1:2.22 |
163 | %{!?with_gtk3:Requires: gtk+2 >= 2:2.18.0} | |
164 | %{?with_gtk3:Requires: gtk+3 >= 3.4.0} | |
165 | Requires: libjpeg-turbo | |
cf64da3b | 166 | Requires: libpng >= 2:1.6.25 |
54d6358a | 167 | Requires: libpng(APNG) >= 0.10 |
504c563f | 168 | Requires: libvpx >= 1.5.0 |
54d6358a JR |
169 | Requires: pango >= 1:1.22.0 |
170 | Requires: sqlite3 >= %{sqlite_build_version} | |
171 | Requires: startup-notification >= 0.8 | |
172 | Provides: xulrunner-libs = 2:%{version}-%{release} | |
173 | Obsoletes: iceweasel-libs | |
174 | Obsoletes: xulrunner-libs | |
175 | ||
176 | %description libs | |
177 | XULRunner shared libraries. | |
178 | ||
179 | %description libs -l pl.UTF-8 | |
180 | Biblioteki współdzielone XULRunnera. | |
181 | ||
182 | %package devel | |
183 | Summary: Headers for developing programs that will use Firefox | |
184 | Summary(pl.UTF-8): Pliki nagłówkowe do tworzenia programów używających Firefox | |
185 | Group: X11/Development/Libraries | |
186 | Requires: %{name}-libs = %{version}-%{release} | |
187 | Requires: nspr-devel >= 1:%{nspr_ver} | |
188 | Requires: nss-devel >= 1:%{nss_ver} | |
189 | Requires: python-ply | |
190 | Provides: xulrunner-devel = 2:%{version}-%{release} | |
191 | Obsoletes: iceweasel-devel | |
192 | Obsoletes: mozilla-devel | |
193 | Obsoletes: mozilla-firefox-devel | |
194 | Obsoletes: seamonkey-devel | |
195 | Obsoletes: xulrunner-devel | |
196 | ||
197 | %description devel | |
198 | Firefox development package. | |
199 | ||
200 | %description devel -l pl.UTF-8 | |
201 | Pakiet programistyczny Firefoxa. | |
ea721d92 | 202 | |
203 | %prep | |
54d6358a JR |
204 | %setup -q |
205 | ||
206 | # avoid using included headers (-I. is before HUNSPELL_CFLAGS) | |
207 | %{__rm} extensions/spellcheck/hunspell/src/{*.hxx,hunspell.h} | |
208 | # hunspell needed for factory including mozHunspell.h | |
209 | echo 'LOCAL_INCLUDES += $(MOZ_HUNSPELL_CFLAGS)' >> extensions/spellcheck/src/Makefile.in | |
210 | ||
f0a96e4f JR |
211 | %patch0 -p2 |
212 | %patch1 -p1 | |
213 | %patch2 -p2 | |
214 | %patch3 -p1 | |
54d6358a | 215 | %patch4 -p1 |
f0a96e4f JR |
216 | %patch5 -p1 |
217 | %patch6 -p2 | |
d1eea1c3 | 218 | %patch7 -p1 |
54d6358a | 219 | %patch8 -p2 |
3c8a14c2 | 220 | %patch9 -p1 |
f0a96e4f | 221 | %patch10 -p2 |
54d6358a | 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 | 230 | cp -p %{_datadir}/automake/config.* build/autoconf |
52befddb | 231 | |
08ccc3c5 JB |
232 | cat << 'EOF' > .mozconfig |
233 | . $topsrcdir/browser/config/mozconfig | |
52befddb | 234 | |
2620301e | 235 | mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu} |
2620301e | 236 | |
f37c2ce5 | 237 | # Options for 'configure' (same as command-line options). |
c5cd9be2 | 238 | ac_add_options --host=%{_target_platform} |
52befddb | 239 | ac_add_options --prefix=%{_prefix} |
cf471ce5 | 240 | %if %{?debug:1}0 |
f37c2ce5 | 241 | ac_add_options --disable-optimize |
52befddb | 242 | ac_add_options --enable-debug |
243 | ac_add_options --enable-debug-modules | |
f37c2ce5 ER |
244 | ac_add_options --enable-debugger-info-modules |
245 | ac_add_options --enable-crash-on-assert | |
52befddb | 246 | %else |
247 | ac_add_options --disable-debug | |
70982d6c | 248 | ac_add_options --enable-optimize="%{rpmcflags} -Os" |
52befddb | 249 | %endif |
d97ddc70 | 250 | ac_add_options --disable-strip |
c5cd9be2 | 251 | ac_add_options --disable-install-strip |
52befddb | 252 | %if %{with tests} |
253 | ac_add_options --enable-tests | |
a9334f16 | 254 | ac_add_options --enable-mochitest |
c4f9bb37 | 255 | %else |
54d6358a JR |
256 | %if %{with pgo} |
257 | ac_add_options --enable-tests | |
258 | %else | |
52befddb | 259 | ac_add_options --disable-tests |
54d6358a | 260 | %endif |
c4f9bb37 | 261 | %endif |
c5cd9be2 | 262 | ac_add_options --disable-crashreporter |
c5cd9be2 | 263 | ac_add_options --disable-gconf |
f37c2ce5 | 264 | ac_add_options --disable-gnomeui |
a9334f16 | 265 | ac_add_options --disable-necko-wifi |
f37c2ce5 | 266 | ac_add_options --disable-updater |
7ab9d54c | 267 | ac_add_options --disable-rust |
7d0bd05d | 268 | ac_add_options --enable-alsa |
a9334f16 JB |
269 | ac_add_options --enable-chrome-format=omni |
270 | ac_add_options --enable-default-toolkit=%{?with_gtk3:cairo-gtk3}%{!?with_gtk3:cairo-gtk2} | |
08ccc3c5 | 271 | ac_add_options --enable-extensions=default |
0fca8d8d | 272 | ac_add_options --enable-gio |
c5cd9be2 | 273 | ac_add_options --enable-readline |
a9334f16 | 274 | ac_add_options --enable-safe-browsing |
08ccc3c5 | 275 | %{?with_shared_js:ac_add_options --enable-shared-js} |
2a673919 | 276 | ac_add_options --enable-startup-notification |
52befddb | 277 | ac_add_options --enable-system-cairo |
c5cd9be2 | 278 | ac_add_options --enable-system-ffi |
d97ddc70 | 279 | ac_add_options --enable-system-hunspell |
dfdf0ac8 | 280 | ac_add_options --enable-system-sqlite |
c5cd9be2 | 281 | ac_add_options --enable-url-classifier |
89390b0e | 282 | %{?with_official:ac_add_options --enable-official-branding} |
c5cd9be2 | 283 | ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name} |
f37c2ce5 | 284 | ac_add_options --with-distribution-id=org.pld-linux |
2a673919 | 285 | ac_add_options --with-pthreads |
d97ddc70 | 286 | ac_add_options --with-system-bz2 |
edc68de2 | 287 | ac_add_options --with%{!?with_system_icu:out}-system-icu |
2620301e | 288 | ac_add_options --with-system-jpeg |
0fca8d8d JB |
289 | ac_add_options --with-system-libevent |
290 | ac_add_options --with-system-libvpx | |
52befddb | 291 | ac_add_options --with-system-nspr |
f37c2ce5 | 292 | ac_add_options --with-system-nss |
f37c2ce5 | 293 | ac_add_options --with-system-png |
2620301e | 294 | ac_add_options --with-system-zlib |
c5cd9be2 | 295 | ac_add_options --with-x |
52befddb | 296 | EOF |
33f81726 | 297 | |
54d6358a JR |
298 | %if %{with pgo} |
299 | D=$(( RANDOM % (200 - 100 + 1 ) + 5 )) | |
300 | /usr/bin/Xvfb :${D} & | |
301 | XVFB_PID=$! | |
302 | [ -n "$XVFB_PID" ] || exit 1 | |
303 | export DISPLAY=:${D} | |
304 | %{__make} -j1 -f client.mk profiledbuild \ | |
f0a96e4f | 305 | AUTOCONF=/usr/bin/autoconf2_13 \ |
54d6358a | 306 | DESTDIR=obj-%{_target_cpu}/dist \ |
54d6358a JR |
307 | MOZ_MAKE_FLAGS="%{_smp_mflags}" |
308 | kill $XVFB_PID | |
309 | %else | |
08ccc3c5 | 310 | %{__make} -j1 -f client.mk build \ |
f0a96e4f | 311 | AUTOCONF=/usr/bin/autoconf2_13 \ |
08ccc3c5 | 312 | MOZ_MAKE_FLAGS="%{_smp_mflags}" |
54d6358a | 313 | %endif |
ea721d92 | 314 | |
315 | %install | |
316 | rm -rf $RPM_BUILD_ROOT | |
45f27404 | 317 | install -d \ |
f37c2ce5 | 318 | $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}} \ |
c5cd9be2 JB |
319 | $RPM_BUILD_ROOT%{_desktopdir} \ |
320 | $RPM_BUILD_ROOT%{_datadir}/%{name}/browser \ | |
54d6358a JR |
321 | $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/plugins \ |
322 | $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/{lib,bin} \ | |
323 | $RPM_BUILD_ROOT%{_includedir}/%{name} \ | |
324 | $RPM_BUILD_ROOT%{_datadir}/idl/%{name} \ | |
325 | $RPM_BUILD_ROOT%{_pkgconfigdir} | |
75e09104 | 326 | |
c5cd9be2 | 327 | %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/browser/plugins |
8bc15110 | 328 | |
54d6358a JR |
329 | cd obj-%{_target_cpu} |
330 | %{__make} -C browser/installer stage-package libxul.pc libxul-embedding.pc mozilla-js.pc mozilla-plugin.pc \ | |
d541162e | 331 | DESTDIR=$RPM_BUILD_ROOT \ |
c5cd9be2 | 332 | installdir=%{_libdir}/%{name} \ |
54d6358a | 333 | INSTALL_SDK=1 \ |
f37c2ce5 | 334 | PKG_SKIP_STRIP=1 |
ea721d92 | 335 | |
54d6358a JR |
336 | cp -aL browser/installer/*.pc $RPM_BUILD_ROOT%{_pkgconfigdir} |
337 | cp -aL dist/firefox/* $RPM_BUILD_ROOT%{_libdir}/%{name}/ | |
338 | cp -aL dist/idl/* $RPM_BUILD_ROOT%{_datadir}/idl/%{name} | |
339 | cp -aL dist/include/* $RPM_BUILD_ROOT%{_includedir}/%{name} | |
340 | cp -aL dist/include/xpcom-config.h $RPM_BUILD_ROOT%{_libdir}/%{name}-devel | |
341 | cp -aL dist/sdk/lib/* $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/lib | |
342 | cp -aL dist/sdk/bin/* $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/bin | |
343 | find $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk -name "*.pyc" | xargs rm -f | |
344 | ||
345 | ln -s %{_libdir}/%{name} $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/bin | |
346 | ln -s %{_includedir}/%{name} $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/include | |
347 | ln -s %{_datadir}/idl/%{name} $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/idl | |
348 | ln -s %{_libdir}/%{name}-devel/sdk/lib $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/lib | |
349 | ||
350 | # replace copies with symlinks | |
351 | %{?with_shared_js:ln -sf %{_libdir}/%{name}/libmozjs.so $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/lib/libmozjs.so} | |
352 | ln -sf %{_libdir}/%{name}/libxul.so $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/lib/libxul.so | |
353 | # temp fix for https://bugzilla.mozilla.org/show_bug.cgi?id=63955 | |
354 | chmod a+rx $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/bin/xpt.py | |
0fca8d8d | 355 | |
f86547d4 | 356 | # move arch independant ones to datadir |
c5cd9be2 | 357 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/chrome |
8e79a8c3 | 358 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/extensions $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/extensions |
c5cd9be2 | 359 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/icons $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/icons |
c5cd9be2 JB |
360 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults |
361 | mv $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/{pref,preferences} | |
d97ddc70 | 362 | |
c5cd9be2 JB |
363 | ln -s ../../../share/%{name}/browser/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/chrome |
364 | ln -s ../../../share/%{name}/browser/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/defaults | |
8e79a8c3 | 365 | ln -s ../../../share/%{name}/browser/extensions $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/extensions |
c5cd9be2 | 366 | ln -s ../../../share/%{name}/browser/icons $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/icons |
f86547d4 | 367 | |
f1613d3d | 368 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries |
4d687af8 ER |
369 | ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries |
370 | ||
54d6358a JR |
371 | sed 's,@LIBDIR@,%{_libdir},' %{SOURCE4} > $RPM_BUILD_ROOT%{_bindir}/firefox |
372 | chmod 755 $RPM_BUILD_ROOT%{_bindir}/firefox | |
ea721d92 | 373 | |
c5cd9be2 | 374 | # install icons and desktop file |
89390b0e | 375 | for i in 16 32 48 %{?with_official:22 24 256}; do |
c5cd9be2 | 376 | install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps |
89390b0e | 377 | cp -a ../browser/branding/%{!?with_official:un}official/default${i}.png \ |
54d6358a | 378 | $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps/firefox.png |
c5cd9be2 JB |
379 | done |
380 | ||
96ef4151 | 381 | cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop |
ea721d92 | 382 | |
c5cd9be2 JB |
383 | # install our settings |
384 | %if "%{pld_release}" == "ac" | |
385 | cp -a %{SOURCE6} $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/preferences/vendor.js | |
386 | %else | |
387 | cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/preferences/vendor.js | |
388 | %endif | |
389 | ||
f37c2ce5 | 390 | cat << 'EOF' > $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate |
6d77929c | 391 | #!/bin/sh |
050f03d2 | 392 | umask 022 |
c5cd9be2 | 393 | rm -f %{_libdir}/%{name}/browser/components/{compreg,xpti}.dat |
3eeab518 | 394 | |
f37c2ce5 ER |
395 | # it attempts to touch files in $HOME/.mozilla |
396 | # beware if you run this with sudo!!! | |
397 | export HOME=$(mktemp -d) | |
398 | # also TMPDIR could be pointing to sudo user's homedir | |
399 | unset TMPDIR TMP || : | |
3eeab518 | 400 | |
6162f349 | 401 | %{_libdir}/%{name}/firefox -register |
3eeab518 | 402 | |
56143477 | 403 | rm -rf $HOME |
6d77929c | 404 | EOF |
82f606de | 405 | chmod 755 $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate |
3eeab518 | 406 | |
6d77929c JB |
407 | %clean |
408 | rm -rf $RPM_BUILD_ROOT | |
3eeab518 | 409 | |
6d77929c | 410 | %post |
f37c2ce5 | 411 | %{_sbindir}/%{name}-chrome+xpcom-generate |
4d9eecad | 412 | %update_browser_plugins |
c5cd9be2 | 413 | %update_icon_cache hicolor |
96ef4151 | 414 | %update_desktop_database |
4d9eecad ER |
415 | |
416 | %postun | |
417 | if [ "$1" = 0 ]; then | |
418 | %update_browser_plugins | |
c5cd9be2 | 419 | %update_icon_cache hicolor |
4d9eecad | 420 | fi |
ea0245e6 | 421 | |
ea721d92 | 422 | %files |
423 | %defattr(644,root,root,755) | |
f37c2ce5 | 424 | %attr(755,root,root) %{_bindir}/%{name} |
f37c2ce5 ER |
425 | %attr(755,root,root) %{_sbindir}/%{name}-chrome+xpcom-generate |
426 | ||
54d6358a JR |
427 | %{_desktopdir}/firefox.desktop |
428 | %{_iconsdir}/hicolor/*/apps/firefox.png | |
c5cd9be2 | 429 | |
4d9eecad ER |
430 | # browser plugins v2 |
431 | %{_browserpluginsconfdir}/browsers.d/%{name}.* | |
432 | %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist | |
433 | ||
c5cd9be2 | 434 | %dir %{_libdir}/%{name}/browser |
c5cd9be2 | 435 | %dir %{_libdir}/%{name}/browser/plugins |
54d6358a | 436 | %dir %{_libdir}/%{name}/browser/features |
c5cd9be2 JB |
437 | |
438 | %dir %{_datadir}/%{name} | |
439 | %dir %{_datadir}/%{name}/browser | |
8e79a8c3 | 440 | %dir %{_datadir}/%{name}/browser/extensions |
c5cd9be2 JB |
441 | %{_datadir}/%{name}/browser/chrome |
442 | %{_datadir}/%{name}/browser/defaults | |
443 | %{_datadir}/%{name}/browser/icons | |
2a673919 | 444 | |
c5cd9be2 | 445 | # symlinks |
8e79a8c3 | 446 | %{_libdir}/%{name}/browser/extensions |
c5cd9be2 JB |
447 | %{_libdir}/%{name}/browser/chrome |
448 | %{_libdir}/%{name}/browser/icons | |
c5cd9be2 | 449 | %{_libdir}/%{name}/browser/defaults |
2a673919 | 450 | |
c5cd9be2 JB |
451 | %attr(755,root,root) %{_libdir}/%{name}/firefox |
452 | %attr(755,root,root) %{_libdir}/%{name}/firefox-bin | |
453 | %attr(755,root,root) %{_libdir}/%{name}/run-mozilla.sh | |
2a673919 | 454 | %{_libdir}/%{name}/application.ini |
8323a6a7 | 455 | %{_libdir}/%{name}/chrome.manifest |
c5cd9be2 JB |
456 | %{_libdir}/%{name}/browser/blocklist.xml |
457 | %{_libdir}/%{name}/browser/chrome.manifest | |
c5cd9be2 | 458 | # the signature of the default theme |
54d6358a | 459 | %{_datadir}/%{name}/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi |
c5cd9be2 | 460 | %{_libdir}/%{name}/browser/omni.ja |
0fca8d8d | 461 | |
a7284ee8 | 462 | %{_libdir}/%{name}/browser/features/aushelper@mozilla.org.xpi |
b1598639 JR |
463 | %{_libdir}/%{name}/browser/features/e10srollout@mozilla.org.xpi |
464 | %{_libdir}/%{name}/browser/features/firefox@getpocket.com.xpi | |
f632a004 | 465 | %{_libdir}/%{name}/browser/features/webcompat@mozilla.org.xpi |
54d6358a | 466 | |
82f606de | 467 | %attr(755,root,root) %{_libdir}/%{name}/plugin-container |
f99152f1 | 468 | %{_libdir}/%{name}/dictionaries |
82f4f456 | 469 | |
a7284ee8 JR |
470 | %dir %{_libdir}/%{name}/fonts |
471 | %{_libdir}/%{name}/fonts/EmojiOneMozilla.ttf | |
472 | ||
82f4f456 JB |
473 | %dir %{_libdir}/%{name}/gmp-clearkey |
474 | %dir %{_libdir}/%{name}/gmp-clearkey/0.1 | |
475 | %{_libdir}/%{name}/gmp-clearkey/0.1/clearkey.info | |
476 | %attr(755,root,root) %{_libdir}/%{name}/gmp-clearkey/0.1/libclearkey.so | |
edc68de2 | 477 | %{!?with_system_icu:%{_libdir}/%{name}//icudt58l.dat} |
54d6358a JR |
478 | |
479 | %files libs | |
480 | %defattr(644,root,root,755) | |
481 | %dir %{_libdir}/%{name} | |
482 | %{_libdir}/%{name}/platform.ini | |
483 | %{?with_shared_js:%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so} | |
484 | %attr(755,root,root) %{_libdir}/%{name}/liblgpllibs.so | |
485 | %attr(755,root,root) %{_libdir}/%{name}/libxul.so | |
b1598639 JR |
486 | %attr(755,root,root) %{_libdir}/%{name}/libmozavcodec.so |
487 | %attr(755,root,root) %{_libdir}/%{name}/libmozavutil.so | |
8323a6a7 | 488 | %attr(755,root,root) %{_libdir}/%{name}/libmozsandbox.so |
54d6358a JR |
489 | %{_libdir}/%{name}/dependentlibs.list |
490 | %{_libdir}/%{name}/omni.ja | |
4264118a JR |
491 | %if %{with gtk3} |
492 | %dir %{_libdir}/%{name}/gtk2 | |
493 | %attr(755,root,root) %{_libdir}/%{name}/gtk2/libmozgtk.so | |
494 | %attr(755,root,root) %{_libdir}/%{name}/libmozgtk.so | |
495 | %endif | |
54d6358a JR |
496 | |
497 | %files devel | |
498 | %defattr(644,root,root,755) | |
499 | %{_includedir}/%{name} | |
500 | %{_datadir}/idl/%{name} | |
501 | %dir %{_libdir}/%{name}-devel | |
502 | %{_libdir}/%{name}-devel/bin | |
503 | %{_libdir}/%{name}-devel/idl | |
504 | %{_libdir}/%{name}-devel/lib | |
505 | %{_libdir}/%{name}-devel/include | |
506 | %{_libdir}/%{name}-devel/*.h | |
507 | %dir %{_libdir}/%{name}-devel/sdk | |
508 | %{_libdir}/%{name}-devel/sdk/lib | |
509 | %dir %{_libdir}/%{name}-devel/sdk/bin | |
510 | %attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/header.py | |
511 | %attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/run-mozilla.sh | |
512 | %attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/typelib.py | |
513 | %attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/xpcshell | |
514 | %attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/xpidl.py | |
515 | %{_libdir}/%{name}-devel/sdk/bin/xpidllex.py | |
516 | %{_libdir}/%{name}-devel/sdk/bin/xpidlyacc.py | |
517 | %attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/xpt.py | |
518 | %{_libdir}/%{name}-devel/sdk/bin/ply | |
519 | ||
520 | %{_pkgconfigdir}/libxul.pc | |
521 | %{_pkgconfigdir}/libxul-embedding.pc | |
522 | %{_pkgconfigdir}/mozilla-js.pc | |
523 | %{_pkgconfigdir}/mozilla-plugin.pc |