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