]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - consider --enable-libproxy | |
3 | # | |
4 | # Conditional build: | |
5 | %bcond_with tests # enable tests (whatever they check) | |
6 | %bcond_with gtk3 # GTK+ 3.x instead of 2.x | |
7 | %bcond_without kerberos # disable krb5 support | |
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 | |
16 | ||
17 | # The actual sqlite version (see RHBZ#480989): | |
18 | %define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR) | |
19 | ||
20 | %define nspr_ver 4.10.8 | |
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 | |
27 | Version: 45.0 | |
28 | Release: 1 | |
29 | License: MPL v2.0 | |
30 | Group: X11/Applications/Networking | |
31 | Source0: http://releases.mozilla.org/pub/mozilla.org/firefox/releases/%{version}/source/firefox-%{version}.source.tar.xz | |
32 | # Source0-md5: 09cbada824841f9e1d77f095e7cd02c1 | |
33 | Source3: %{name}.desktop | |
34 | Source4: %{name}.sh | |
35 | Source5: vendor.js | |
36 | Source6: vendor-ac.js | |
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/ | |
50 | BuildRequires: OpenGL-devel | |
51 | BuildRequires: ImageMagick | |
52 | BuildRequires: ImageMagick-coder-png | |
53 | BuildRequires: ImageMagick-coder-svg | |
54 | BuildRequires: alsa-lib-devel | |
55 | BuildRequires: automake | |
56 | BuildRequires: bzip2-devel | |
57 | BuildRequires: cairo-devel >= 1.10.2-5 | |
58 | BuildRequires: dbus-glib-devel >= 0.60 | |
59 | BuildRequires: freetype-devel >= 1:2.1.8 | |
60 | BuildRequires: gcc-c++ >= 6:4.4 | |
61 | BuildRequires: glib2-devel >= 1:2.22 | |
62 | BuildRequires: gstreamer-devel >= 1.0 | |
63 | BuildRequires: gstreamer-plugins-base-devel >= 1.0 | |
64 | %{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.18.0} | |
65 | %{?with_gtk3:BuildRequires: gtk+3-devel >= 3.4.0} | |
66 | %{?with_kerberos:BuildRequires: heimdal-devel >= 0.7.1} | |
67 | BuildRequires: hunspell-devel >= 1.2.3 | |
68 | BuildRequires: libIDL-devel >= 0.8.0 | |
69 | # DECnet (dnprogs.spec), not dummy net (libdnet.spec) | |
70 | #BuildRequires: libdnet-devel | |
71 | BuildRequires: libevent-devel >= 1.4.7 | |
72 | # standalone libffi 3.0.9 or gcc's from 4.5(?)+ | |
73 | BuildRequires: libffi-devel >= 6:3.0.9 | |
74 | BuildRequires: libicu-devel >= 50.1 | |
75 | # requires libjpeg-turbo implementing at least libjpeg 6b API | |
76 | BuildRequires: libjpeg-devel >= 6b | |
77 | BuildRequires: libjpeg-turbo-devel | |
78 | # for rsvg-convert | |
79 | BuildRequires: librsvg | |
80 | BuildRequires: libpng(APNG)-devel >= 0.10 | |
81 | BuildRequires: libpng-devel >= 2:1.6.16 | |
82 | BuildRequires: libstdc++-devel >= 6:4.4 | |
83 | BuildRequires: libvpx-devel >= 1.3.0 | |
84 | BuildRequires: libxslt-progs >= 1.1.28 | |
85 | BuildRequires: nspr-devel >= 1:%{nspr_ver} | |
86 | BuildRequires: nss-devel >= 1:%{nss_ver} | |
87 | BuildRequires: pango-devel >= 1:1.22.0 | |
88 | BuildRequires: pixman-devel >= 0.19.2 | |
89 | BuildRequires: perl-modules >= 5.004 | |
90 | BuildRequires: pkgconfig | |
91 | BuildRequires: pkgconfig(libffi) >= 3.0.9 | |
92 | BuildRequires: pulseaudio-devel | |
93 | BuildRequires: python-modules >= 1:2.5 | |
94 | %{?with_pgo:BuildRequires: python-modules-sqlite} | |
95 | BuildRequires: python-simplejson | |
96 | BuildRequires: python-virtualenv >= 1.9.1-4 | |
97 | BuildRequires: readline-devel | |
98 | BuildRequires: rpm >= 4.4.9-56 | |
99 | BuildRequires: rpmbuild(macros) >= 1.601 | |
100 | BuildRequires: sed >= 4.0 | |
101 | BuildRequires: sqlite3-devel >= 3.8.11.1-3 | |
102 | BuildRequires: startup-notification-devel >= 0.8 | |
103 | BuildRequires: virtualenv | |
104 | BuildRequires: xorg-lib-libXScrnSaver-devel | |
105 | BuildRequires: xorg-lib-libXext-devel | |
106 | BuildRequires: xorg-lib-libXinerama-devel | |
107 | BuildRequires: xorg-lib-libXt-devel | |
108 | %{?with_pgo:BuildRequires: xorg-xserver-Xvfb} | |
109 | BuildRequires: zip | |
110 | BuildRequires: zlib-devel >= 1.2.3 | |
111 | BuildConflicts: %{name}-devel < %{version} | |
112 | Requires(post): mktemp >= 1.5-18 | |
113 | Requires: browser-plugins >= 2.0 | |
114 | Requires: desktop-file-utils | |
115 | Requires: hicolor-icon-theme | |
116 | Requires: myspell-common | |
117 | Requires: nspr >= 1:%{nspr_ver} | |
118 | Requires: nss >= 1:%{nss_ver} | |
119 | Requires: %{name}-libs = %{version}-%{release} | |
120 | Provides: wwwbrowser | |
121 | Obsoletes: iceweasel | |
122 | Obsoletes: mozilla-firebird | |
123 | Obsoletes: mozilla-firefox | |
124 | Obsoletes: mozilla-firefox-lang-en < 2.0.0.8-3 | |
125 | Obsoletes: mozilla-firefox-libs | |
126 | Obsoletes: xulrunner | |
127 | Obsoletes: xulrunner-gnome | |
128 | Conflicts: firefox-lang-resources < %{version} | |
129 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
130 | ||
131 | %define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+ | |
132 | ||
133 | # don't satisfy other packages | |
134 | %define _noautoprovfiles %{_libdir}/%{name} | |
135 | ||
136 | # and as we don't provide them, don't require either | |
137 | %define _noautoreq libmozjs.so libxul.so | |
138 | ||
139 | %description | |
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. | |
146 | ||
147 | %description -l pl.UTF-8 | |
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. | |
198 | ||
199 | %prep | |
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 | |
213 | %patch7 -p1 | |
214 | %patch8 -p2 | |
215 | #%patch9 -p2 | |
216 | %patch11 -p2 | |
217 | %patch12 -p1 | |
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 | |
225 | ||
226 | %build | |
227 | cp -p %{_datadir}/automake/config.* build/autoconf | |
228 | ||
229 | cat << 'EOF' > .mozconfig | |
230 | . $topsrcdir/browser/config/mozconfig | |
231 | ||
232 | mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu} | |
233 | ||
234 | # Options for 'configure' (same as command-line options). | |
235 | ac_add_options --build=%{_target_platform} | |
236 | ac_add_options --host=%{_target_platform} | |
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} | |
250 | %if %{?debug:1}0 | |
251 | ac_add_options --disable-optimize | |
252 | ac_add_options --enable-debug | |
253 | ac_add_options --enable-debug-modules | |
254 | ac_add_options --enable-debugger-info-modules | |
255 | ac_add_options --enable-crash-on-assert | |
256 | %else | |
257 | ac_add_options --disable-debug | |
258 | ac_add_options --disable-debug-modules | |
259 | ac_add_options --enable-optimize="%{rpmcflags} -Os" | |
260 | %endif | |
261 | ac_add_options --disable-strip | |
262 | ac_add_options --disable-strip-libs | |
263 | ac_add_options --disable-install-strip | |
264 | %if %{with tests} | |
265 | ac_add_options --enable-tests | |
266 | ac_add_options --enable-mochitest | |
267 | %else | |
268 | %if %{with pgo} | |
269 | ac_add_options --enable-tests | |
270 | %else | |
271 | ac_add_options --disable-tests | |
272 | %endif | |
273 | ac_add_options --disable-mochitest | |
274 | %endif | |
275 | ac_add_options --disable-cpp-exceptions | |
276 | ac_add_options --disable-crashreporter | |
277 | ac_add_options --disable-elf-dynstr-gc | |
278 | ac_add_options --disable-gconf | |
279 | ac_add_options --disable-gnomeui | |
280 | ac_add_options --disable-gnomevfs | |
281 | ac_add_options --disable-installer | |
282 | ac_add_options --disable-javaxpcom | |
283 | ac_add_options --disable-long-long-warning | |
284 | ac_add_options --disable-necko-wifi | |
285 | ac_add_options --disable-pedantic | |
286 | ac_add_options --disable-updater | |
287 | ac_add_options --disable-xterm-updates | |
288 | ac_add_options --enable-canvas | |
289 | ac_add_options --enable-chrome-format=omni | |
290 | ac_add_options --enable-default-toolkit=%{?with_gtk3:cairo-gtk3}%{!?with_gtk3:cairo-gtk2} | |
291 | ac_add_options --enable-extensions=default | |
292 | ac_add_options --enable-gio | |
293 | ac_add_options --enable-gstreamer=1.0 | |
294 | ac_add_options --enable-libxul | |
295 | ac_add_options --enable-mathml | |
296 | ac_add_options --enable-pango | |
297 | ac_add_options --enable-readline | |
298 | ac_add_options --enable-safe-browsing | |
299 | %{?with_shared_js:ac_add_options --enable-shared-js} | |
300 | ac_add_options --enable-startup-notification | |
301 | ac_add_options --enable-svg | |
302 | ac_add_options --enable-system-cairo | |
303 | ac_add_options --enable-system-ffi | |
304 | ac_add_options --enable-system-hunspell | |
305 | ac_add_options --enable-system-sqlite | |
306 | ac_add_options --enable-url-classifier | |
307 | ac_add_options --enable-xinerama | |
308 | ac_add_options --enable-official-branding | |
309 | ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name} | |
310 | ac_add_options --with-distribution-id=org.pld-linux | |
311 | ac_add_options --with-pthreads | |
312 | ac_add_options --with-system-bz2 | |
313 | ac_add_options --with-system-icu | |
314 | ac_add_options --with-system-jpeg | |
315 | ac_add_options --with-system-libevent | |
316 | ac_add_options --with-system-libvpx | |
317 | ac_add_options --with-system-nspr | |
318 | ac_add_options --with-system-nss | |
319 | ac_add_options --with-system-ply | |
320 | ac_add_options --with-system-png | |
321 | ac_add_options --with-system-zlib | |
322 | ac_add_options --with-x | |
323 | EOF | |
324 | ||
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 | |
338 | %{__make} -j1 -f client.mk build \ | |
339 | CC="%{__cc}" \ | |
340 | CXX="%{__cxx}" \ | |
341 | MOZ_MAKE_FLAGS="%{_smp_mflags}" | |
342 | %endif | |
343 | ||
344 | %install | |
345 | rm -rf $RPM_BUILD_ROOT | |
346 | install -d \ | |
347 | $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}} \ | |
348 | $RPM_BUILD_ROOT%{_desktopdir} \ | |
349 | $RPM_BUILD_ROOT%{_datadir}/%{name}/browser \ | |
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} | |
355 | ||
356 | %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/browser/plugins | |
357 | ||
358 | cd obj-%{_target_cpu} | |
359 | %{__make} -C browser/installer stage-package libxul.pc libxul-embedding.pc mozilla-js.pc mozilla-plugin.pc \ | |
360 | DESTDIR=$RPM_BUILD_ROOT \ | |
361 | installdir=%{_libdir}/%{name} \ | |
362 | INSTALL_SDK=1 \ | |
363 | PKG_SKIP_STRIP=1 | |
364 | ||
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 | |
384 | ||
385 | # move arch independant ones to datadir | |
386 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/chrome | |
387 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/extensions $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/extensions | |
388 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/icons $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/icons | |
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} | |
391 | ||
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 | |
394 | ln -s ../../../share/%{name}/browser/extensions $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/extensions | |
395 | ln -s ../../../share/%{name}/browser/icons $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/icons | |
396 | ||
397 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries | |
398 | ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries | |
399 | ||
400 | sed 's,@LIBDIR@,%{_libdir},' %{SOURCE4} > $RPM_BUILD_ROOT%{_bindir}/firefox | |
401 | chmod 755 $RPM_BUILD_ROOT%{_bindir}/firefox | |
402 | ||
403 | # install icons and desktop file | |
404 | for i in 16 22 24 32 48 256; do | |
405 | install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps | |
406 | cp -a ../browser/branding/official/default${i}.png \ | |
407 | $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps/firefox.png | |
408 | done | |
409 | ||
410 | cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop | |
411 | ||
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 | ||
419 | # files created by firefox -register | |
420 | touch $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/components/compreg.dat | |
421 | touch $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/components/xpti.dat | |
422 | ||
423 | cat << 'EOF' > $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate | |
424 | #!/bin/sh | |
425 | umask 022 | |
426 | rm -f %{_libdir}/%{name}/browser/components/{compreg,xpti}.dat | |
427 | ||
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 || : | |
433 | ||
434 | %{_libdir}/%{name}/firefox -register | |
435 | ||
436 | rm -rf $HOME | |
437 | EOF | |
438 | chmod 755 $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate | |
439 | ||
440 | %clean | |
441 | rm -rf $RPM_BUILD_ROOT | |
442 | ||
443 | %post | |
444 | %{_sbindir}/%{name}-chrome+xpcom-generate | |
445 | %update_browser_plugins | |
446 | %update_icon_cache hicolor | |
447 | %update_desktop_database | |
448 | ||
449 | %postun | |
450 | if [ "$1" = 0 ]; then | |
451 | %update_browser_plugins | |
452 | %update_icon_cache hicolor | |
453 | fi | |
454 | ||
455 | %files | |
456 | %defattr(644,root,root,755) | |
457 | %attr(755,root,root) %{_bindir}/%{name} | |
458 | %attr(755,root,root) %{_sbindir}/%{name}-chrome+xpcom-generate | |
459 | ||
460 | %{_desktopdir}/firefox.desktop | |
461 | %{_iconsdir}/hicolor/*/apps/firefox.png | |
462 | ||
463 | # browser plugins v2 | |
464 | %{_browserpluginsconfdir}/browsers.d/%{name}.* | |
465 | %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist | |
466 | ||
467 | %dir %{_libdir}/%{name}/browser | |
468 | %dir %{_libdir}/%{name}/browser/components | |
469 | %dir %{_libdir}/%{name}/browser/plugins | |
470 | %dir %{_libdir}/%{name}/browser/features | |
471 | ||
472 | %dir %{_datadir}/%{name} | |
473 | %dir %{_datadir}/%{name}/browser | |
474 | %dir %{_datadir}/%{name}/browser/extensions | |
475 | %{_datadir}/%{name}/browser/chrome | |
476 | %{_datadir}/%{name}/browser/defaults | |
477 | %{_datadir}/%{name}/browser/icons | |
478 | ||
479 | # symlinks | |
480 | %{_libdir}/%{name}/browser/extensions | |
481 | %{_libdir}/%{name}/browser/chrome | |
482 | %{_libdir}/%{name}/browser/icons | |
483 | %{_libdir}/%{name}/browser/defaults | |
484 | ||
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 | |
488 | %{_libdir}/%{name}/application.ini | |
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 | |
494 | %{_datadir}/%{name}/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi | |
495 | %{_libdir}/%{name}/browser/omni.ja | |
496 | %{_libdir}/%{name}/webapprt | |
497 | %attr(755,root,root) %{_libdir}/%{name}/webapprt-stub | |
498 | ||
499 | %{_libdir}/%{name}/browser/features/loop@mozilla.org.xpi | |
500 | ||
501 | # files created by firefox -register | |
502 | %ghost %{_libdir}/%{name}/browser/components/compreg.dat | |
503 | %ghost %{_libdir}/%{name}/browser/components/xpti.dat | |
504 | ||
505 | %attr(755,root,root) %{_libdir}/%{name}/plugin-container | |
506 | %{_libdir}/%{name}/dictionaries | |
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 | |
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 |