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