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