]>
Commit | Line | Data |
---|---|---|
a4803e5e AO |
1 | # TODO: |
2 | # - consider --enable-libproxy | |
3 | # | |
4 | # Conditional build: | |
5 | %bcond_with tests # enable tests (whatever they check) | |
6 | %bcond_without gtk3 # GTK+ 3.x instead of 2.x | |
7 | %bcond_without kerberos # disable krb5 support | |
8 | %bcond_without official # official Firefox branding | |
9 | %bcond_without 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 | %bcond_with system_icu # build with system ICU (disabled due to crashes with system icu 58.2) | |
13 | ||
14 | # On updating version, grab CVE links from: | |
15 | # https://www.mozilla.org/security/known-vulnerabilities/firefox.html | |
16 | # Release Notes: | |
17 | # https://developer.mozilla.org/en-US/Firefox/Releases | |
18 | ||
19 | # The actual sqlite version (see RHBZ#480989): | |
20 | %define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR) | |
21 | ||
22 | %define _basename firefox | |
23 | %define nspr_ver 4.13.1 | |
ed1a48e8 | 24 | %define nss_ver 3.28.5 |
a4803e5e AO |
25 | |
26 | Summary: Firefox web browser | |
27 | Summary(hu.UTF-8): Firefox web böngésző | |
28 | Summary(pl.UTF-8): Firefox - przeglądarka WWW | |
29 | Name: firefox52-esr | |
96a4c58c | 30 | Version: 52.3.0 |
a4803e5e AO |
31 | Release: 1 |
32 | License: MPL v2.0 | |
33 | Group: X11/Applications/Networking | |
34 | Source0: http://releases.mozilla.org/pub/mozilla.org/firefox/releases/%{version}esr/source/firefox-%{version}esr.source.tar.xz | |
96a4c58c | 35 | # Source0-md5: 585e88d84f2e183dca1dee3235efe0d1 |
a4803e5e AO |
36 | Source3: %{_basename}.desktop |
37 | Source4: %{_basename}.sh | |
38 | Source5: vendor.js | |
39 | Source6: vendor-ac.js | |
40 | Patch0: idl-parser.patch | |
41 | Patch1: xulrunner-new-libxul.patch | |
42 | Patch2: xulrunner-paths.patch | |
43 | Patch3: xulrunner-pc.patch | |
44 | Patch4: %{_basename}-prefs.patch | |
45 | Patch5: %{_basename}-pld-bookmarks.patch | |
46 | Patch6: %{_basename}-no-subshell.patch | |
47 | Patch7: %{_basename}-middle_click_paste.patch | |
48 | Patch8: %{_basename}-system-virtualenv.patch | |
49 | Patch9: %{_basename}-Disable-Firefox-Health-Report.patch | |
50 | Patch10: freetype.patch | |
51 | URL: https://www.mozilla.org/firefox/ | |
52 | BuildRequires: OpenGL-devel | |
53 | BuildRequires: alsa-lib-devel | |
54 | BuildRequires: automake | |
55 | BuildRequires: autoconf2_13 | |
56 | BuildRequires: bzip2-devel | |
57 | BuildRequires: cairo-devel >= 1.10.2-5 | |
58 | BuildRequires: dbus-glib-devel >= 0.60 | |
59 | BuildRequires: fontconfig-devel >= 1:2.7.0 | |
60 | BuildRequires: freetype-devel >= 1:2.1.8 | |
61 | BuildRequires: gcc-c++ >= 6:4.4 | |
62 | BuildRequires: glib2-devel >= 1:2.22 | |
63 | BuildRequires: gstreamer-devel >= 1.0 | |
64 | BuildRequires: gstreamer-plugins-base-devel >= 1.0 | |
65 | %{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.18.0} | |
66 | %{?with_gtk3:BuildRequires: gtk+3-devel >= 3.4.0} | |
67 | %{?with_kerberos:BuildRequires: heimdal-devel >= 0.7.1} | |
68 | BuildRequires: hunspell-devel >= 1.2.3 | |
69 | BuildRequires: libIDL-devel >= 0.8.0 | |
70 | # DECnet (dnprogs.spec), not dummy net (libdnet.spec) | |
71 | #BuildRequires: libdnet-devel | |
72 | BuildRequires: libevent-devel >= 1.4.7 | |
73 | # standalone libffi 3.0.9 or gcc's from 4.5(?)+ | |
74 | BuildRequires: libffi-devel >= 6:3.0.9 | |
75 | %{?with_system_icu:BuildRequires: libicu-devel >= 58.1} | |
76 | # requires libjpeg-turbo implementing at least libjpeg 6b API | |
77 | BuildRequires: libjpeg-devel >= 6b | |
78 | BuildRequires: libjpeg-turbo-devel | |
79 | BuildRequires: libpng(APNG)-devel >= 0.10 | |
80 | BuildRequires: libpng-devel >= 2:1.6.25 | |
81 | BuildRequires: libstdc++-devel >= 6:4.4 | |
82 | BuildRequires: libvpx-devel >= 1.5.0 | |
83 | BuildRequires: nspr-devel >= 1:%{nspr_ver} | |
84 | BuildRequires: nss-devel >= 1:%{nss_ver} | |
85 | BuildRequires: pango-devel >= 1:1.22.0 | |
86 | BuildRequires: pixman-devel >= 0.19.2 | |
87 | BuildRequires: perl-modules >= 5.004 | |
88 | BuildRequires: pkgconfig | |
89 | BuildRequires: pkgconfig(libffi) >= 3.0.9 | |
90 | BuildRequires: pulseaudio-devel | |
91 | BuildRequires: python-modules >= 1:2.5 | |
92 | %{?with_pgo:BuildRequires: python-modules-sqlite} | |
93 | BuildRequires: python-simplejson | |
94 | BuildRequires: python-virtualenv >= 15 | |
95 | BuildRequires: readline-devel | |
96 | BuildRequires: rpm >= 4.4.9-56 | |
97 | BuildRequires: rpmbuild(macros) >= 1.601 | |
98 | BuildRequires: sed >= 4.0 | |
99 | BuildRequires: sqlite3-devel >= 3.17.0 | |
100 | BuildRequires: startup-notification-devel >= 0.8 | |
101 | BuildRequires: xorg-lib-libX11-devel | |
102 | BuildRequires: xorg-lib-libXScrnSaver-devel | |
103 | BuildRequires: xorg-lib-libXcomposite-devel | |
104 | BuildRequires: xorg-lib-libXdamage-devel | |
105 | BuildRequires: xorg-lib-libXext-devel | |
106 | BuildRequires: xorg-lib-libXfixes-devel | |
107 | BuildRequires: xorg-lib-libXinerama-devel | |
108 | BuildRequires: xorg-lib-libXt-devel | |
109 | %{?with_pgo:BuildRequires: xorg-xserver-Xvfb} | |
110 | %ifarch %{x8664} | |
111 | BuildRequires: yasm >= 1.0.1 | |
112 | %endif | |
113 | BuildRequires: zip | |
114 | BuildRequires: zlib-devel >= 1.2.3 | |
115 | BuildConflicts: %{name}-devel < %{version} | |
116 | Requires(post): mktemp >= 1.5-18 | |
117 | Requires: browser-plugins >= 2.0 | |
118 | Requires: desktop-file-utils | |
119 | Requires: hicolor-icon-theme | |
120 | Requires: myspell-common | |
a4803e5e AO |
121 | Requires: %{name}-libs = %{version}-%{release} |
122 | Provides: wwwbrowser | |
123 | Obsoletes: iceweasel | |
124 | Obsoletes: mozilla-firebird | |
125 | Obsoletes: mozilla-firefox | |
126 | Obsoletes: mozilla-firefox-lang-en < 2.0.0.8-3 | |
127 | Obsoletes: mozilla-firefox-libs | |
128 | Obsoletes: xulrunner | |
129 | Obsoletes: xulrunner-gnome | |
130 | Conflicts: firefox-lang-resources < %{version} | |
131 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
132 | ||
133 | %define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+ | |
134 | ||
135 | # don't satisfy other packages | |
136 | %define _noautoprovfiles %{_libdir}/%{name} | |
137 | ||
138 | # and as we don't provide them, don't require either | |
ed1a48e8 | 139 | %define _noautoreq liblgpllibs.so libmozavcodec.so libmozavutil.so libmozgtk.so libmozjs.so libmozsandbox.so libxul.so |
a4803e5e AO |
140 | |
141 | %description | |
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. | |
148 | ||
149 | %description -l pl.UTF-8 | |
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 | |
ed1a48e8 | 156 | Summary(pl.UTF-8): Biblioteki współdzielone Firefoksa |
a4803e5e AO |
157 | Group: X11/Libraries |
158 | Requires: cairo >= 1.10.2-5 | |
159 | Requires: dbus-glib >= 0.60 | |
160 | Requires: fontconfig-libs >= 1:2.7.0 | |
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 | |
165 | Requires: libpng >= 2:1.6.25 | |
166 | Requires: libpng(APNG) >= 0.10 | |
167 | Requires: libvpx >= 1.5.0 | |
ed1a48e8 JB |
168 | Requires: nspr >= 1:%{nspr_ver} |
169 | Requires: nss >= 1:%{nss_ver} | |
a4803e5e AO |
170 | Requires: pango >= 1:1.22.0 |
171 | Requires: sqlite3 >= %{sqlite_build_version} | |
172 | Requires: startup-notification >= 0.8 | |
173 | Provides: xulrunner-libs = 2:%{version}-%{release} | |
174 | Obsoletes: iceweasel-libs | |
ed1a48e8 | 175 | Obsoletes: xulrunner-libs < 2:%{version} |
a4803e5e AO |
176 | |
177 | %description libs | |
178 | XULRunner shared libraries. | |
179 | ||
180 | %description libs -l pl.UTF-8 | |
181 | Biblioteki współdzielone XULRunnera. | |
182 | ||
183 | %package devel | |
184 | Summary: Headers for developing programs that will use Firefox | |
ed1a48e8 | 185 | Summary(pl.UTF-8): Pliki nagłówkowe do tworzenia programów używających Firefoksa |
a4803e5e AO |
186 | Group: X11/Development/Libraries |
187 | Requires: %{name}-libs = %{version}-%{release} | |
188 | Requires: nspr-devel >= 1:%{nspr_ver} | |
189 | Requires: nss-devel >= 1:%{nss_ver} | |
190 | Requires: python-ply | |
191 | Provides: xulrunner-devel = 2:%{version}-%{release} | |
192 | Obsoletes: iceweasel-devel | |
193 | Obsoletes: mozilla-devel | |
194 | Obsoletes: mozilla-firefox-devel | |
195 | Obsoletes: seamonkey-devel | |
196 | Obsoletes: xulrunner-devel | |
197 | ||
198 | %description devel | |
199 | Firefox development package. | |
200 | ||
201 | %description devel -l pl.UTF-8 | |
ed1a48e8 | 202 | Pakiet programistyczny Firefoksa. |
a4803e5e AO |
203 | |
204 | %prep | |
205 | %setup -q -n %{_basename}-%{version}esr | |
206 | ||
207 | # avoid using included headers (-I. is before HUNSPELL_CFLAGS) | |
208 | %{__rm} extensions/spellcheck/hunspell/src/{*.hxx,hunspell.h} | |
209 | # hunspell needed for factory including mozHunspell.h | |
210 | echo 'LOCAL_INCLUDES += $(MOZ_HUNSPELL_CFLAGS)' >> extensions/spellcheck/src/Makefile.in | |
211 | ||
212 | %patch0 -p2 | |
213 | %patch1 -p1 | |
214 | %patch2 -p2 | |
215 | %patch3 -p1 | |
216 | %patch4 -p1 | |
217 | %patch5 -p1 | |
218 | %patch6 -p2 | |
219 | %patch7 -p1 | |
220 | %patch8 -p2 | |
221 | %patch9 -p1 | |
222 | %patch10 -p2 | |
223 | ||
224 | %{__sed} -i -e '1s,/usr/bin/env python,%{__python},' xpcom/typelib/xpt/tools/xpt.py xpcom/idl-parser/xpidl/xpidl.py | |
225 | ||
226 | %if %{with pgo} | |
227 | %{__sed} -i -e 's@__BROWSER_PATH__@"../../dist/bin/firefox-bin"@' build/automation.py.in | |
228 | %endif | |
229 | ||
230 | %build | |
231 | cp -p %{_datadir}/automake/config.* build/autoconf | |
232 | ||
233 | cat << 'EOF' > .mozconfig | |
234 | . $topsrcdir/browser/config/mozconfig | |
235 | ||
236 | mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu} | |
237 | ||
238 | # Options for 'configure' (same as command-line options). | |
239 | ac_add_options --host=%{_target_platform} | |
240 | ac_add_options --prefix=%{_prefix} | |
241 | %if %{?debug:1}0 | |
242 | ac_add_options --disable-optimize | |
243 | ac_add_options --enable-debug | |
244 | ac_add_options --enable-debug-modules | |
245 | ac_add_options --enable-debugger-info-modules | |
246 | ac_add_options --enable-crash-on-assert | |
247 | %else | |
248 | ac_add_options --disable-debug | |
249 | ac_add_options --enable-optimize="%{rpmcflags} -Os" | |
250 | %endif | |
251 | ac_add_options --disable-strip | |
252 | ac_add_options --disable-install-strip | |
253 | %if %{with tests} | |
254 | ac_add_options --enable-tests | |
255 | ac_add_options --enable-mochitest | |
256 | %else | |
257 | %if %{with pgo} | |
258 | ac_add_options --enable-tests | |
259 | %else | |
260 | ac_add_options --disable-tests | |
261 | %endif | |
262 | %endif | |
263 | ac_add_options --disable-crashreporter | |
264 | ac_add_options --disable-gconf | |
265 | ac_add_options --disable-gnomeui | |
266 | ac_add_options --disable-necko-wifi | |
267 | ac_add_options --disable-updater | |
268 | ac_add_options --enable-alsa | |
269 | ac_add_options --enable-chrome-format=omni | |
270 | ac_add_options --enable-default-toolkit=%{?with_gtk3:cairo-gtk3}%{!?with_gtk3:cairo-gtk2} | |
271 | ac_add_options --enable-extensions=default | |
272 | ac_add_options --enable-gio | |
273 | ac_add_options --enable-readline | |
274 | ac_add_options --enable-safe-browsing | |
275 | %{?with_shared_js:ac_add_options --enable-shared-js} | |
276 | ac_add_options --enable-startup-notification | |
277 | ac_add_options --enable-system-cairo | |
278 | ac_add_options --enable-system-ffi | |
279 | ac_add_options --enable-system-hunspell | |
280 | ac_add_options --enable-system-sqlite | |
281 | ac_add_options --enable-url-classifier | |
282 | %{?with_official:ac_add_options --enable-official-branding} | |
283 | ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name} | |
284 | ac_add_options --with-distribution-id=org.pld-linux | |
285 | ac_add_options --with-pthreads | |
286 | ac_add_options --with-system-bz2 | |
287 | ac_add_options --with%{!?with_system_icu:out}-system-icu | |
288 | ac_add_options --with-system-jpeg | |
289 | ac_add_options --with-system-libevent | |
290 | ac_add_options --with-system-libvpx | |
291 | ac_add_options --with-system-nspr | |
292 | ac_add_options --with-system-nss | |
293 | ac_add_options --with-system-png | |
294 | ac_add_options --with-system-zlib | |
295 | ac_add_options --with-x | |
296 | EOF | |
297 | ||
298 | %if %{with pgo} | |
299 | D=$(( RANDOM % (200 - 100 + 1 ) + 5 )) | |
300 | /usr/bin/Xvfb :${D} & | |
301 | XVFB_PID=$! | |
302 | [ -n "$XVFB_PID" ] || exit 1 | |
303 | export DISPLAY=:${D} | |
304 | %{__make} -j1 -f client.mk profiledbuild \ | |
305 | AUTOCONF=/usr/bin/autoconf2_13 \ | |
306 | DESTDIR=obj-%{_target_cpu}/dist \ | |
307 | MOZ_MAKE_FLAGS="%{_smp_mflags}" | |
308 | kill $XVFB_PID | |
309 | %else | |
310 | %{__make} -j1 -f client.mk build \ | |
311 | AUTOCONF=/usr/bin/autoconf2_13 \ | |
312 | MOZ_MAKE_FLAGS="%{_smp_mflags}" | |
313 | %endif | |
314 | ||
315 | %install | |
316 | rm -rf $RPM_BUILD_ROOT | |
317 | install -d \ | |
318 | $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}} \ | |
319 | $RPM_BUILD_ROOT%{_desktopdir} \ | |
320 | $RPM_BUILD_ROOT%{_datadir}/%{name}/browser \ | |
321 | $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/plugins \ | |
322 | $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/{lib,bin} \ | |
323 | $RPM_BUILD_ROOT%{_includedir}/%{name} \ | |
324 | $RPM_BUILD_ROOT%{_datadir}/idl/%{name} \ | |
325 | $RPM_BUILD_ROOT%{_pkgconfigdir} | |
326 | ||
327 | %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/browser/plugins | |
328 | ||
329 | cd obj-%{_target_cpu} | |
330 | %{__make} -C browser/installer stage-package libxul.pc libxul-embedding.pc mozilla-js.pc mozilla-plugin.pc \ | |
331 | DESTDIR=$RPM_BUILD_ROOT \ | |
a4803e5e | 332 | INSTALL_SDK=1 \ |
6ab32e1e JB |
333 | PKG_SKIP_STRIP=1 \ |
334 | idldir=%{_datadir}/idl/%{name} \ | |
335 | includedir=%{_includedir}/%{name} \ | |
336 | installdir=%{_libdir}/%{name} \ | |
337 | sdkdir=%{_libdir}/%{name}-devel | |
a4803e5e AO |
338 | |
339 | cp -aL browser/installer/*.pc $RPM_BUILD_ROOT%{_pkgconfigdir} | |
340 | cp -aL dist/firefox/* $RPM_BUILD_ROOT%{_libdir}/%{name}/ | |
341 | cp -aL dist/idl/* $RPM_BUILD_ROOT%{_datadir}/idl/%{name} | |
342 | cp -aL dist/include/* $RPM_BUILD_ROOT%{_includedir}/%{name} | |
343 | cp -aL dist/include/xpcom-config.h $RPM_BUILD_ROOT%{_libdir}/%{name}-devel | |
344 | cp -aL dist/sdk/lib/* $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/lib | |
345 | cp -aL dist/sdk/bin/* $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/bin | |
346 | find $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk -name "*.pyc" | xargs rm -f | |
347 | ||
348 | ln -s %{_libdir}/%{name} $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/bin | |
349 | ln -s %{_includedir}/%{name} $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/include | |
350 | ln -s %{_datadir}/idl/%{name} $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/idl | |
351 | ln -s %{_libdir}/%{name}-devel/sdk/lib $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/lib | |
352 | ||
353 | # replace copies with symlinks | |
354 | %{?with_shared_js:ln -sf %{_libdir}/%{name}/libmozjs.so $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/lib/libmozjs.so} | |
355 | ln -sf %{_libdir}/%{name}/libxul.so $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/lib/libxul.so | |
356 | # temp fix for https://bugzilla.mozilla.org/show_bug.cgi?id=63955 | |
357 | chmod a+rx $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/bin/xpt.py | |
358 | ||
359 | # move arch independant ones to datadir | |
ed1a48e8 JB |
360 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/chrome |
361 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/extensions $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/extensions | |
362 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/icons $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/icons | |
363 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults | |
364 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/{pref,preferences} | |
a4803e5e AO |
365 | |
366 | ln -s ../../../share/%{name}/browser/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/chrome | |
367 | ln -s ../../../share/%{name}/browser/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/defaults | |
368 | ln -s ../../../share/%{name}/browser/extensions $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/extensions | |
369 | ln -s ../../../share/%{name}/browser/icons $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/icons | |
370 | ||
371 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries | |
372 | ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries | |
373 | ||
374 | sed 's,@LIBDIR@,%{_libdir},;s,@NAME@,%{name},' %{SOURCE4} > $RPM_BUILD_ROOT%{_bindir}/%{name} | |
375 | chmod 755 $RPM_BUILD_ROOT%{_bindir}/%{name} | |
376 | ||
377 | # install icons and desktop file | |
378 | for i in 16 32 48 %{?with_official:22 24 256}; do | |
379 | install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps | |
380 | cp -a ../browser/branding/%{!?with_official:un}official/default${i}.png \ | |
381 | $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps/%{name}.png | |
382 | done | |
383 | ||
384 | cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop | |
385 | ||
386 | # install our settings | |
387 | %if "%{pld_release}" == "ac" | |
388 | cp -a %{SOURCE6} $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/preferences/vendor.js | |
389 | %else | |
390 | cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/preferences/vendor.js | |
391 | %endif | |
392 | ||
393 | cat << 'EOF' > $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate | |
394 | #!/bin/sh | |
395 | umask 022 | |
396 | rm -f %{_libdir}/%{name}/browser/components/{compreg,xpti}.dat | |
397 | ||
398 | # it attempts to touch files in $HOME/.mozilla | |
399 | # beware if you run this with sudo!!! | |
400 | export HOME=$(mktemp -d) | |
401 | # also TMPDIR could be pointing to sudo user's homedir | |
402 | unset TMPDIR TMP || : | |
403 | ||
404 | %{_libdir}/%{name}/firefox -register | |
405 | ||
406 | rm -rf $HOME | |
407 | EOF | |
408 | chmod 755 $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate | |
409 | ||
410 | %clean | |
411 | rm -rf $RPM_BUILD_ROOT | |
412 | ||
413 | %post | |
414 | %{_sbindir}/%{name}-chrome+xpcom-generate | |
415 | %update_browser_plugins | |
416 | %update_icon_cache hicolor | |
417 | %update_desktop_database | |
418 | ||
419 | %postun | |
420 | if [ "$1" = 0 ]; then | |
421 | %update_browser_plugins | |
422 | %update_icon_cache hicolor | |
423 | fi | |
424 | ||
425 | %files | |
426 | %defattr(644,root,root,755) | |
427 | %attr(755,root,root) %{_bindir}/%{name} | |
428 | %attr(755,root,root) %{_sbindir}/%{name}-chrome+xpcom-generate | |
429 | ||
430 | %{_desktopdir}/%{name}.desktop | |
431 | %{_iconsdir}/hicolor/*/apps/%{name}.png | |
432 | ||
433 | # browser plugins v2 | |
434 | %{_browserpluginsconfdir}/browsers.d/%{name}.* | |
435 | %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist | |
436 | ||
437 | %dir %{_libdir}/%{name}/browser | |
438 | %dir %{_libdir}/%{name}/browser/plugins | |
439 | %dir %{_libdir}/%{name}/browser/features | |
440 | ||
441 | %dir %{_datadir}/%{name} | |
442 | %dir %{_datadir}/%{name}/browser | |
443 | %dir %{_datadir}/%{name}/browser/extensions | |
444 | %{_datadir}/%{name}/browser/chrome | |
445 | %{_datadir}/%{name}/browser/defaults | |
446 | %{_datadir}/%{name}/browser/icons | |
447 | ||
448 | # symlinks | |
449 | %{_libdir}/%{name}/browser/extensions | |
450 | %{_libdir}/%{name}/browser/chrome | |
451 | %{_libdir}/%{name}/browser/icons | |
452 | %{_libdir}/%{name}/browser/defaults | |
453 | ||
454 | %attr(755,root,root) %{_libdir}/%{name}/firefox | |
455 | %attr(755,root,root) %{_libdir}/%{name}/firefox-bin | |
456 | %attr(755,root,root) %{_libdir}/%{name}/run-mozilla.sh | |
457 | %{_libdir}/%{name}/application.ini | |
458 | %{_libdir}/%{name}/chrome.manifest | |
459 | %{_libdir}/%{name}/browser/blocklist.xml | |
460 | %{_libdir}/%{name}/browser/chrome.manifest | |
461 | # the signature of the default theme | |
462 | %{_datadir}/%{name}/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi | |
463 | %{_libdir}/%{name}/browser/omni.ja | |
464 | ||
465 | %{_libdir}/%{name}/browser/features/aushelper@mozilla.org.xpi | |
466 | %{_libdir}/%{name}/browser/features/e10srollout@mozilla.org.xpi | |
467 | %{_libdir}/%{name}/browser/features/firefox@getpocket.com.xpi | |
468 | %{_libdir}/%{name}/browser/features/webcompat@mozilla.org.xpi | |
469 | ||
470 | %attr(755,root,root) %{_libdir}/%{name}/plugin-container | |
471 | %{_libdir}/%{name}/dictionaries | |
472 | ||
473 | %dir %{_libdir}/%{name}/fonts | |
474 | %{_libdir}/%{name}/fonts/EmojiOneMozilla.ttf | |
475 | ||
476 | %dir %{_libdir}/%{name}/gmp-clearkey | |
477 | %dir %{_libdir}/%{name}/gmp-clearkey/0.1 | |
478 | %{_libdir}/%{name}/gmp-clearkey/0.1/clearkey.info | |
479 | %attr(755,root,root) %{_libdir}/%{name}/gmp-clearkey/0.1/libclearkey.so | |
480 | %{!?with_system_icu:%{_libdir}/%{name}//icudt58l.dat} | |
481 | ||
482 | %files libs | |
483 | %defattr(644,root,root,755) | |
484 | %dir %{_libdir}/%{name} | |
485 | %{_libdir}/%{name}/platform.ini | |
486 | %{?with_shared_js:%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so} | |
487 | %attr(755,root,root) %{_libdir}/%{name}/liblgpllibs.so | |
488 | %attr(755,root,root) %{_libdir}/%{name}/libxul.so | |
489 | %attr(755,root,root) %{_libdir}/%{name}/libmozavcodec.so | |
490 | %attr(755,root,root) %{_libdir}/%{name}/libmozavutil.so | |
491 | %attr(755,root,root) %{_libdir}/%{name}/libmozsandbox.so | |
492 | %{_libdir}/%{name}/dependentlibs.list | |
493 | %{_libdir}/%{name}/omni.ja | |
494 | %if %{with gtk3} | |
495 | %dir %{_libdir}/%{name}/gtk2 | |
496 | %attr(755,root,root) %{_libdir}/%{name}/gtk2/libmozgtk.so | |
497 | %attr(755,root,root) %{_libdir}/%{name}/libmozgtk.so | |
498 | %endif | |
499 | ||
500 | %files devel | |
501 | %defattr(644,root,root,755) | |
502 | %{_includedir}/%{name} | |
503 | %{_datadir}/idl/%{name} | |
504 | %dir %{_libdir}/%{name}-devel | |
505 | %{_libdir}/%{name}-devel/bin | |
506 | %{_libdir}/%{name}-devel/idl | |
507 | %{_libdir}/%{name}-devel/lib | |
508 | %{_libdir}/%{name}-devel/include | |
509 | %{_libdir}/%{name}-devel/*.h | |
510 | %dir %{_libdir}/%{name}-devel/sdk | |
511 | %{_libdir}/%{name}-devel/sdk/lib | |
512 | %dir %{_libdir}/%{name}-devel/sdk/bin | |
513 | %attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/header.py | |
514 | %attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/run-mozilla.sh | |
515 | %attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/typelib.py | |
516 | %attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/xpcshell | |
517 | %attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/xpidl.py | |
518 | %{_libdir}/%{name}-devel/sdk/bin/xpidllex.py | |
519 | %{_libdir}/%{name}-devel/sdk/bin/xpidlyacc.py | |
520 | %attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/xpt.py | |
521 | %{_libdir}/%{name}-devel/sdk/bin/ply | |
522 | ||
523 | %{_pkgconfigdir}/libxul.pc | |
524 | %{_pkgconfigdir}/libxul-embedding.pc | |
525 | %{_pkgconfigdir}/mozilla-js.pc | |
526 | %{_pkgconfigdir}/mozilla-plugin.pc |