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