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