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