3 %bcond_with gtk3 # GTK+ 3.x instead of 2.x
4 %bcond_without ldap # disable e-mail address lookups in LDAP directories
5 %bcond_without lightning # disable Sunbird/Lightning calendar
6 %bcond_without kerberos # disable krb5 support
7 %bcond_with crashreporter # report crashes to crash-stats.mozilla.com
8 %bcond_with tests # enable tests (whatever they check)
10 %define nspr_ver 4.10.3
13 # The actual sqlite version (see RHBZ#480989):
14 %define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR)
16 Summary: Iceape - web browser
17 Summary(es.UTF-8): Navegador de Internet Iceape
18 Summary(pl.UTF-8): Iceape - przeglądarka WWW
19 Summary(pt_BR.UTF-8): Navegador Iceape
24 Group: X11/Applications/Networking
25 Source0: http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/%{version}/source/seamonkey-%{version}.source.tar.xz
26 # Source0-md5: 5789df8f96e14577c275f10fdf8462f3
27 Source1: %{name}-branding.tar.xz
28 # Source1-md5: 2eca62062b4d1022f94b5cf49bc024d3
29 Source3: %{name}-rm_nonfree.sh
30 Source4: %{name}.desktop
31 Source5: %{name}-composer.desktop
32 Source6: %{name}-chat.desktop
33 Source7: %{name}-mail.desktop
35 Patch0: %{name}-branding.patch
36 Patch1: %{name}-pld-branding.patch
37 Patch2: %{name}-agent.patch
38 Patch3: enable-addons.patch
39 # Edit patch below and restore --system-site-packages when system virtualenv gets 1.7 upgrade
40 Patch4: system-virtualenv.patch
41 Patch5: no-logging.patch
42 Patch6: libsuite.patch
43 URL: http://www.pld-linux.org/Packages/Iceape
44 BuildRequires: GConf2-devel >= 1.2.1
45 BuildRequires: OpenGL-devel
46 BuildRequires: alsa-lib-devel
47 BuildRequires: automake
48 BuildRequires: bzip2-devel
49 BuildRequires: cairo-devel >= 1.10.2-5
50 BuildRequires: dbus-glib-devel >= 0.60
51 BuildRequires: freetype-devel >= 1:2.1.8
52 BuildRequires: glib2-devel >= 1:2.20
53 %{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.18}
54 %{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0.0}
55 %{?with_kerberos:BuildRequires: heimdal-devel >= 0.7.1}
56 BuildRequires: hunspell-devel
57 BuildRequires: libIDL-devel >= 0.8.0
58 BuildRequires: libdnet-devel
59 BuildRequires: libevent-devel >= 1.4.7
60 # standalone libffi 3.0.9 or gcc's from 4.5(?)+
61 BuildRequires: libffi-devel >= 6:3.0.9
62 BuildRequires: libicu-devel >= 50.1
63 # requires libjpeg-turbo implementing at least libjpeg 6b API
64 BuildRequires: libjpeg-devel >= 6b
65 BuildRequires: libjpeg-turbo-devel
66 BuildRequires: libnotify-devel >= 0.4
67 BuildRequires: libpng(APNG)-devel >= 0.10
68 BuildRequires: libpng-devel >= 2:1.6.7
69 # rsvg-convert for iceape/branding
70 BuildRequires: librsvg
71 BuildRequires: libstdc++-devel
72 BuildRequires: libvpx-devel >= 1.3.0
73 BuildRequires: mozldap-devel
74 BuildRequires: nspr-devel >= 1:%{nspr_ver}
75 BuildRequires: nss-devel >= 1:%{nss_ver}
76 BuildRequires: pango-devel >= 1:1.14.0
77 BuildRequires: perl-base >= 1:5.6
78 BuildRequires: perl-modules >= 5.004
79 BuildRequires: pkgconfig
80 BuildRequires: python >= 1:2.5
81 BuildRequires: python-modules
82 BuildRequires: python-simplejson
83 BuildRequires: python-virtualenv >= 15
84 BuildRequires: rpm >= 4.4.9-56
85 BuildRequires: rpmbuild(macros) >= 1.601
86 BuildRequires: sed >= 4.0
87 BuildRequires: sqlite3-devel >= 3.8.2
88 BuildRequires: startup-notification-devel >= 0.8
89 BuildRequires: xorg-lib-libX11-devel
90 BuildRequires: xorg-lib-libXScrnSaver-devel
91 BuildRequires: xorg-lib-libXext-devel
92 BuildRequires: xorg-lib-libXinerama-devel
93 BuildRequires: xorg-lib-libXt-devel
96 BuildRequires: zlib-devel >= 1.2.3
97 Requires(post): mktemp >= 1.5-18
98 Requires: desktop-file-utils
99 Requires: hicolor-icon-theme
100 Requires: browser-plugins >= 2.0
101 Requires: cairo >= 1.10.2-5
102 Requires: dbus-glib >= 0.60
103 Requires: glib2 >= 1:2.20
104 %{!?with_gtk3:Requires: gtk+2 >= 2:2.18}
105 %{?with_gtk3:Requires: gtk+3 >= 3.0.0}
106 Requires: libjpeg-turbo
107 Requires: libpng >= 2:1.6.7
108 Requires: libpng(APNG) >= 0.10
109 Requires: libvpx >= 1.3.0
110 Requires: myspell-common
111 Requires: nspr >= 1:%{nspr_ver}
112 Requires: nss >= 1:%{nss_ver}
113 Requires: pango >= 1:1.14.0
114 Requires: sqlite3 >= %{sqlite_build_version}
115 Requires: startup-notification >= 0.8
116 Provides: iceape-embedded = %{version}-%{release}
118 Obsoletes: iceape-mailnews
119 Obsoletes: iceape-gnomevfs
122 Obsoletes: mozilla-gnomevfs
124 Obsoletes: seamonkey-calendar
125 Obsoletes: seamonkey-libs
126 Obsoletes: seamonkey-mailnews
127 Obsoletes: seamonkey-gnomevfs
128 Conflicts: iceape-lang-resources < %{version}
129 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
131 %define topdir %{_builddir}/seamonkey-%{version}
132 %define objdir %{topdir}/obj-%{_target_cpu}
134 %define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+
136 # don't satisfy other packages
137 %define _noautoprovfiles %{_libdir}/%{name}
138 # and as we don't provide them, don't require either
139 %define _noautoreq libmozjs.so libxpcom.so libxul.so libjemalloc.so libmozalloc.so
140 %define _noautoreqdep libgfxpsshar.so libgkgfx.so libgtkxtbin.so libjsj.so libxpcom_compat.so libxpistub.so
143 Iceape is an open-source web browser, designed for standards
144 compliance, performance and portability.
146 %description -l es.UTF-8
147 Iceape es un navegador de Internet que se basa en una versión inicial
148 de Netscape Communicator.
150 %description -l pl.UTF-8
151 Iceape jest potężną graficzną przeglądarką WWW, która jest następcą
152 Mozilli, która następnie była następczynią Netscape Communikatora.
154 %description -l pt_BR.UTF-8
155 O Iceape é um web browser baseado numa versão inicial do Netscape
158 %description -l ru.UTF-8
159 Iceape - полнофункциональный web-browser с открытыми исходными
160 текстами, разработанный для максимального соотвествия стандартам,
161 максмимальной переносимости и скорости работы
163 %package addon-lightning
164 Summary: An integrated calendar for Iceape
165 Summary(pl.UTF-8): Zintegrowany kalendarz dla Iceape
166 License: MPL 1.1 or GPL v2+ or LGPL v2.1+
167 Group: Applications/Networking
168 Requires: %{name} = %{version}-%{release}
169 Obsoletes: seamonkey-addon-lightning
171 %description addon-lightning
172 Lightning is an calendar extension to Icedove email client.
174 %description addon-lightning -l pl.UTF-8
175 Lightning to rozszerzenie do klienta poczty Icedove dodające
176 funkcjonalność kalendarza.
179 Summary: Iceape Chat - integrated IRC client
180 Summary(pl.UTF-8): Iceape Chat - zintegrowany klient IRC-a
181 Group: X11/Applications/Networking
182 Requires(post,postun): %{name} = %{version}-%{release}
183 Requires: %{name} = %{version}-%{release}
184 Obsoletes: mozilla-chat
185 Obsoletes: seamonkey-chat
188 Iceape Chat - IRC client that is integrated with the Iceape web
191 %description chat -l pl.UTF-8
192 Iceape - klient IRC-a zintegrowany z przeglądarką Iceape.
194 %package dom-inspector
195 Summary: A tool for inspecting the DOM of pages in Iceape
196 Summary(pl.UTF-8): Narzędzie do oglądania DOM stron w Iceape
197 Group: X11/Applications/Networking
198 Requires(post,postun): %{name} = %{version}-%{release}
199 Requires: %{name} = %{version}-%{release}
200 Obsoletes: mozilla-dom-inspector
201 Obsoletes: seamonkey-dom-inspector
203 %description dom-inspector
204 This is a tool that allows you to inspect the DOM for web pages in
205 Iceape. This is of great use to people who are doing Iceape chrome
206 development or web page development.
208 %description dom-inspector -l pl.UTF-8
209 To narzędzie pozwala na oglądanie DOM dla stron WWW w Iceape. Jest
210 bardzo przydatne dla ludzi rozwijających chrome w Iceape lub
211 tworzących strony WWW.
214 %setup -q -a1 -n seamonkey-%{version}
224 cat << EOF > .mozconfig
225 mk_add_options MOZ_OBJDIR=%{objdir}
227 %if %{with crashreporter}
228 export MOZ_DEBUG_SYMBOLS=1
231 # Options for 'configure' (same as command-line options).
232 ac_add_options --prefix=%{_prefix}
233 ac_add_options --exec-prefix=%{_exec_prefix}
234 ac_add_options --bindir=%{_bindir}
235 ac_add_options --sbindir=%{_sbindir}
236 ac_add_options --sysconfdir=%{_sysconfdir}
237 ac_add_options --datadir=%{_datadir}
238 ac_add_options --includedir=%{_includedir}
239 ac_add_options --libdir=%{_libdir}
240 ac_add_options --libexecdir=%{_libexecdir}
241 ac_add_options --localstatedir=%{_localstatedir}
242 ac_add_options --sharedstatedir=%{_sharedstatedir}
243 ac_add_options --mandir=%{_mandir}
244 ac_add_options --infodir=%{_infodir}
246 ac_add_options --disable-optimize
247 ac_add_options --enable-debug
248 ac_add_options --enable-debug-modules
249 ac_add_options --enable-debugger-info-modules
250 ac_add_options --enable-crash-on-assert
252 ac_add_options --disable-debug
253 ac_add_options --disable-debug-modules
254 ac_add_options --enable-optimize="%{rpmcflags} -Os"
256 ac_add_options --disable-strip
257 ac_add_options --disable-strip-libs
259 ac_add_options --enable-tests
261 ac_add_options --disable-tests
263 %if %{with lightning}
264 ac_add_options --enable-calendar
266 ac_add_options --disable-calendar
268 %if %{with crashreporter}
269 ac_add_options --enable-crashreporter
271 ac_add_options --disable-crashreporter
273 ac_add_options --disable-elf-dynstr-gc
274 ac_add_options --disable-elf-hack
275 ac_add_options --disable-gnomeui
276 ac_add_options --disable-gnomevfs
277 ac_add_options --disable-installer
278 ac_add_options --disable-javaxpcom
279 ac_add_options --disable-updater
280 ac_add_options --disable-xterm-updates
281 ac_add_options --enable-application=suite
282 ac_add_options --enable-crypto
283 ac_add_options --enable-default-toolkit=%{?with_gtk3:cairo-gtk3}%{!?with_gtk3:cairo-gtk2}
284 ac_add_options --enable-extensions=default,irc
285 ac_add_options --enable-gio
287 ac_add_options --enable-ldap
288 ac_add_options --with-system-ldap
290 ac_add_options --disable-ldap
292 ac_add_options --enable-libxul
293 ac_add_options --enable-pango
294 ac_add_options --enable-postscript
296 #ac_add_options --enable-shared-js
297 ac_add_options --enable-startup-notification
298 ac_add_options --enable-system-cairo
299 ac_add_options --enable-system-hunspell
300 ac_add_options --enable-system-sqlite
301 ac_add_options --with-branding=iceape/branding
302 ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
303 ac_add_options --with-distribution-id=org.pld-linux
304 ac_add_options --with-pthreads
305 ac_add_options --with-system-bz2
306 ac_add_options --with-system-ffi
307 ac_add_options --with-system-icu
308 ac_add_options --with-system-jpeg
309 ac_add_options --with-system-libevent
310 ac_add_options --with-system-libvpx
311 ac_add_options --with-system-nspr
312 ac_add_options --with-system-nss
313 ac_add_options --with-system-png
314 ac_add_options --with-system-zlib
315 ac_add_options --enable-xinerama
316 ac_add_options --disable-xprint
317 ac_add_options --enable-svg
318 ac_add_options --enable-canvas
319 ac_add_options --enable-safe-browsing
320 ac_add_options --enable-chrome-format=omni
321 ac_add_options --disable-necko-wifi
324 %{__make} -j1 -f client.mk build \
326 MOZ_MAKE_FLAGS="%{?_smp_mflags}" \
327 installdir=%{_libdir}/%{name} \
332 %if %{with crashreporter}
333 # create debuginfo for crash-stats.mozilla.com
334 %{__make} -j1 -C obj-%{_target_cpu} buildsymbols
338 rm -rf $RPM_BUILD_ROOT
340 $RPM_BUILD_ROOT{%{_bindir},%{_libdir}} \
341 $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}} \
342 $RPM_BUILD_ROOT%{_datadir}/%{name} \
343 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins
345 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins
349 %{__make} -C suite/installer stage-package \
350 DESTDIR=$RPM_BUILD_ROOT \
351 installdir=%{_libdir}/%{name} \
354 %{__make} -C iceape/branding install \
355 DESTDIR=$RPM_BUILD_ROOT
357 cp -a dist/iceape/* $RPM_BUILD_ROOT%{_libdir}/%{name}/
359 # Enable crash reporter for Thunderbird application
360 %if %{with crashreporter}
361 %{__sed} -i -e 's/\[Crash Reporter\]/[Crash Reporter]\nEnabled=1/' $RPM_BUILD_ROOT%{_libdir}/%{name}/application.ini
363 # Add debuginfo for crash-stats.mozilla.com
364 install -d $RPM_BUILD_ROOT%{_exec_prefix}/lib/debug%{_libdir}/%{name}
365 cp -a dist/%{name}-%{version}.en-US.linux-*.crashreporter-symbols.zip $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/%{name}
368 %if %{with lightning}
369 # copy manually lightning files, somewhy they are not installed by make
370 cp -a dist/bin/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}.xpi \
371 $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions
374 # move arch independant ones to datadir
375 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome
376 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults
377 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins $RPM_BUILD_ROOT%{_datadir}/%{name}/searchplugins
379 ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome
380 ln -s ../../share/%{name}/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults
381 ln -s ../../share/%{name}/searchplugins $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins
383 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/isp $RPM_BUILD_ROOT%{_datadir}/%{name}/isp
384 ln -s ../../share/%{name}/isp $RPM_BUILD_ROOT%{_libdir}/%{name}/isp
386 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/distribution/extensions/* \
387 $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/
389 # dir for arch independant extensions besides arch dependant extensions
390 # see mozilla/xpcom/build/nsXULAppAPI.h
391 # XRE_SYS_LOCAL_EXTENSION_PARENT_DIR and XRE_SYS_SHARE_EXTENSION_PARENT_DIR
392 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions
394 %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
395 ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
397 %{__sed} -e "s|%MOZAPPDIR%|%{_libdir}/%{name}|" \
398 -e "s|%MOZ_APP_DISPLAYNAME%|Iceape|" \
399 %{topdir}/mozilla/build/unix/mozilla.in > $RPM_BUILD_ROOT%{_libdir}/%{name}/iceape
401 sed 's,@LIBDIR@,%{_libdir},' %{SOURCE8} > $RPM_BUILD_ROOT%{_bindir}/iceape
402 chmod a+rx $RPM_BUILD_ROOT%{_bindir}/iceape
404 install %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} \
405 $RPM_BUILD_ROOT%{_desktopdir}
407 # files created by iceape -register
408 touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat
409 touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat
411 cat << 'EOF' > $RPM_BUILD_ROOT%{_libdir}/%{name}/register
414 rm -f %{_libdir}/%{name}/components/{compreg,xpti}.dat
416 # it attempts to touch files in $HOME/.mozilla
417 # beware if you run this with sudo!!!
418 export HOME=$(mktemp -d)
419 # also TMPDIR could be pointing to sudo user's homedir
420 unset TMPDIR TMP || :
422 %{_libdir}/%{name}/iceape -register
426 chmod 755 $RPM_BUILD_ROOT%{_libdir}/%{name}/register
428 # never package these. always remove
430 %{__sed} -i '/lib\(ldap\|ldif\|prldap\)60.so/d' $RPM_BUILD_ROOT%{_libdir}/%{name}/dependentlibs.list
431 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{ldap,ldif,prldap}60.so
434 rm -rf $RPM_BUILD_ROOT
437 %{_libdir}/%{name}/register || :
438 %update_browser_plugins
439 %update_icon_cache hicolor
440 %update_desktop_database
443 if [ "$1" = 0 ]; then
444 %update_browser_plugins
445 %update_icon_cache hicolor
449 %defattr(644,root,root,755)
450 %attr(755,root,root) %{_bindir}/iceape
453 %{_browserpluginsconfdir}/browsers.d/%{name}.*
454 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
456 %dir %{_libdir}/%{name}
457 %attr(755,root,root) %{_libdir}/%{name}/liblgpllibs.so
458 #%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so
459 %attr(755,root,root) %{_libdir}/%{name}/libxul.so
461 %{_libdir}/%{name}/blocklist.xml
462 %{_libdir}/%{name}/omni.ja
463 %attr(755,root,root) %{_libdir}/%{name}/register
465 %if %{with crashreporter}
466 %{_libdir}/%{name}/crashreporter
467 %{_libdir}/%{name}/crashreporter-override.ini
468 %{_libdir}/%{name}/crashreporter.ini
469 %{_libdir}/%{name}/Throbber-small.gif
473 %{_libdir}/%{name}/application.ini
474 %{_libdir}/%{name}/chrome.manifest
476 %dir %{_libdir}/%{name}/components
477 %{_libdir}/%{name}/components/components.manifest
478 %attr(755,root,root) %{_libdir}/%{name}/components/libsuite.so
480 %{_libdir}/%{name}/dependentlibs.list
481 %{_libdir}/%{name}/platform.ini
482 %attr(755,root,root) %{_libdir}/%{name}/components/libmozgnome.so
483 %attr(755,root,root) %{_libdir}/%{name}/run-mozilla.sh
484 %attr(755,root,root) %{_libdir}/%{name}/iceape-bin
485 %attr(755,root,root) %{_libdir}/%{name}/plugin-container
487 %attr(755,root,root) %{_libdir}/%{name}/iceape
488 %dir %{_libdir}/%{name}/plugins
491 %{_libdir}/%{name}/chrome
492 %{_libdir}/%{name}/defaults
493 %{_libdir}/%{name}/searchplugins
494 %{_libdir}/%{name}/dictionaries
496 %dir %{_datadir}/%{name}
497 %{_datadir}/%{name}/chrome
498 %{_datadir}/%{name}/defaults
499 %{_datadir}/%{name}/searchplugins
501 %dir %{_datadir}/%{name}/extensions
502 %dir %{_libdir}/%{name}/extensions
503 # the signature of the default theme
504 %{_libdir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi
505 %{_libdir}/%{name}/extensions/modern@themes.mozilla.org.xpi
507 # files created by iceape -register
508 %ghost %{_libdir}/%{name}/components/compreg.dat
509 %ghost %{_libdir}/%{name}/components/xpti.dat
511 %{_libdir}/%{name}/isp
512 %dir %{_datadir}/%{name}/isp
513 %{_datadir}/%{name}/isp/Bogofilter.sfd
514 %{_datadir}/%{name}/isp/DSPAM.sfd
515 %{_datadir}/%{name}/isp/POPFile.sfd
516 %{_datadir}/%{name}/isp/SpamAssassin.sfd
517 %{_datadir}/%{name}/isp/SpamPal.sfd
518 %{_datadir}/%{name}/isp/movemail.rdf
519 %{_datadir}/%{name}/isp/rss.rdf
521 %{_iconsdir}/hicolor/*/apps/iceape.png
522 %{_iconsdir}/hicolor/scalable/apps/iceape.svg
523 %{_desktopdir}/%{name}.desktop
524 %{_desktopdir}/%{name}-composer.desktop
525 %{_desktopdir}/%{name}-mail.desktop
527 %if %{with lightning}
528 %files addon-lightning
529 %defattr(644,root,root,755)
530 %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}.xpi
534 %defattr(644,root,root,755)
535 %{_libdir}/%{name}/extensions/{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}.xpi
536 %{_desktopdir}/%{name}-chat.desktop
539 %defattr(644,root,root,755)
540 %{_libdir}/%{name}/extensions/inspector@mozilla.org.xpi