]> git.pld-linux.org Git - SPECS.git/blob - iceape.spec
SPECS updated Mon 29 Apr 22:05:02 CEST 2024
[SPECS.git] / iceape.spec
1 # TODO: consider --enable-libproxy
2 #
3 # Conditional build:
4 %bcond_without  gtk3            # GTK+ 3.x instead of 2.x
5 %bcond_without  ldap            # disable e-mail address lookups in LDAP directories
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)
9
10 %define         nspr_ver        4.12
11 %define         nss_ver         3.25
12
13 # The actual sqlite version (see RHBZ#480989):
14 %define         sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR)
15
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
20 Name:           iceape
21 Version:        2.46
22 Release:        5
23 License:        MPL v2.0
24 Group:          X11/Applications/Networking
25 Source0:        http://ftp.mozilla.org/pub/seamonkey/releases/%{version}/source/seamonkey-%{version}.source.tar.xz
26 # Source0-md5:  436a158e16eee151b97f96c053b82d45
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 Source7:        %{name}-mail.desktop
33 Source8:        %{name}.sh
34 Patch0:         %{name}-branding.patch
35 Patch1:         %{name}-pld-branding.patch
36 Patch2:         %{name}-agent.patch
37 Patch3:         enable-addons.patch
38 # Edit patch below and restore --system-site-packages when system virtualenv gets 1.7 upgrade
39 Patch4:         system-virtualenv.patch
40 Patch5:         icu-detect.patch
41 Patch6:         nss-http2.patch
42 Patch7:         libevent21.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:  autoconf2_13 >= 2.13
48 BuildRequires:  bzip2-devel
49 BuildRequires:  cairo-devel >= 1.10.2-5
50 BuildRequires:  dbus-glib-devel >= 0.60
51 BuildRequires:  fontconfig-devel >= 1:2.7.0
52 BuildRequires:  freetype-devel >= 1:2.1.8
53 BuildRequires:  glib2-devel >= 1:2.22
54 %{!?with_gtk3:BuildRequires:    gtk+2-devel >= 2:2.18}
55 %{?with_gtk3:BuildRequires:     gtk+3-devel >= 3.4.0}
56 %{?with_kerberos:BuildRequires: heimdal-devel >= 0.7.1}
57 BuildRequires:  hunspell-devel
58 # DECnet (dnprogs.spec), not dummy net (libdnet.spec)
59 #BuildRequires: libdnet-devel
60 BuildRequires:  libevent-devel >= 1.4.7
61 # standalone libffi 3.0.9 or gcc's from 4.5(?)+
62 BuildRequires:  libffi-devel >= 6:3.0.9
63 BuildRequires:  libicu-devel >= 50.1
64 # requires libjpeg-turbo implementing at least libjpeg 6b API
65 BuildRequires:  libjpeg-devel >= 6b
66 BuildRequires:  libjpeg-turbo-devel
67 BuildRequires:  libnotify-devel >= 0.4
68 BuildRequires:  libpng(APNG)-devel >= 0.10
69 BuildRequires:  libpng-devel >= 2:1.6.21
70 # rsvg-convert for iceape/branding
71 BuildRequires:  librsvg
72 BuildRequires:  libstdc++-devel >= 6:4.7
73 BuildRequires:  libvpx-devel >= 1.5.0
74 BuildRequires:  mozldap-devel >= 6.0
75 BuildRequires:  nspr-devel >= 1:%{nspr_ver}
76 BuildRequires:  nss-devel >= 1:%{nss_ver}
77 BuildRequires:  pango-devel >= 1:1.22.0
78 BuildRequires:  perl-base >= 1:5.6
79 BuildRequires:  perl-modules >= 5.004
80 BuildRequires:  pixman-devel >= 0.19.2
81 BuildRequires:  pkgconfig
82 BuildRequires:  python >= 1:2.7
83 BuildRequires:  python-modules >= 1:2.7
84 BuildRequires:  python-virtualenv >= 15
85 BuildRequires:  rpm >= 4.4.9-56
86 BuildRequires:  rpmbuild(macros) >= 1.601
87 BuildRequires:  sed >= 4.0
88 BuildRequires:  sqlite3-devel >= 3.13.0
89 BuildRequires:  startup-notification-devel >= 0.8
90 BuildRequires:  tar >= 1:1.22
91 BuildRequires:  xorg-lib-libX11-devel
92 BuildRequires:  xorg-lib-libXcomposite-devel
93 BuildRequires:  xorg-lib-libXdamage-devel
94 BuildRequires:  xorg-lib-libXext-devel
95 BuildRequires:  xorg-lib-libXfixes-devel
96 BuildRequires:  xorg-lib-libXt-devel
97 BuildRequires:  xz
98 %ifarch %{ix86} %{x8664}
99 BuildRequires:  yasm >= 1.0.1
100 %endif
101 BuildRequires:  zip
102 BuildRequires:  zlib-devel >= 1.2.3
103 Requires(post): mktemp >= 1.5-18
104 Requires:       desktop-file-utils
105 Requires:       fontconfig >= 1:2.7.0
106 Requires:       hicolor-icon-theme
107 Requires:       browser-plugins >= 2.0
108 Requires:       cairo >= 1.10.2-5
109 Requires:       dbus-glib >= 0.60
110 Requires:       glib2 >= 1:2.22
111 %{!?with_gtk3:Requires: gtk+2 >= 2:2.18}
112 %{?with_gtk3:Requires:  gtk+3 >= 3.4.0}
113 Requires:       libjpeg-turbo
114 Requires:       libpng >= 2:1.6.21
115 Requires:       libpng(APNG) >= 0.10
116 Requires:       libvpx >= 1.5.0
117 Requires:       myspell-common
118 Requires:       nspr >= 1:%{nspr_ver}
119 Requires:       nss >= 1:%{nss_ver}
120 Requires:       pango >= 1:1.22.0
121 Requires:       pixman >= 0.19.2
122 Requires:       sqlite3 >= %{sqlite_build_version}
123 Requires:       startup-notification >= 0.8
124 Provides:       iceape-embedded = %{version}-%{release}
125 Provides:       wwwbrowser
126 Obsoletes:      iceape-addon-lightning < 2.46-1
127 Obsoletes:      iceape-chat < 2.46-1
128 Obsoletes:      iceape-dom-inspector < 2.46-1
129 Obsoletes:      iceape-js-debugger
130 Obsoletes:      iceape-mailnews
131 Obsoletes:      iceape-gnomevfs
132 Obsoletes:      light
133 Obsoletes:      mozilla
134 Obsoletes:      mozilla-gnomevfs
135 Obsoletes:      seamonkey
136 Obsoletes:      seamonkey-calendar
137 Obsoletes:      seamonkey-libs
138 Obsoletes:      seamonkey-mailnews
139 Obsoletes:      seamonkey-gnomevfs
140 Conflicts:      iceape-lang-resources < %{version}
141 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
142
143 %define         topdir          %{_builddir}/seamonkey-%{version}
144 %define         objdir          %{topdir}/obj-%{_target_cpu}
145
146 %define         filterout_cpp   -D_FORTIFY_SOURCE=[0-9]+
147
148 # don't satisfy other packages
149 %define         _noautoprovfiles        %{_libdir}/%{name}
150 # and as we don't provide them, don't require either
151 %define         _noautoreq      liblgpllibs.so libmozgtk.so libmozjs.so libxul.so
152
153 %description
154 Iceape is an open-source web browser, designed for standards
155 compliance, performance and portability.
156
157 %description -l es.UTF-8
158 Iceape es un navegador de Internet que se basa en una versión inicial
159 de Netscape Communicator.
160
161 %description -l pl.UTF-8
162 Iceape jest potężną graficzną przeglądarką WWW, która jest następcą
163 Mozilli, która następnie była następczynią Netscape Communikatora.
164
165 %description -l pt_BR.UTF-8
166 O Iceape é um web browser baseado numa versão inicial do Netscape
167 Communicator.
168
169 %description -l ru.UTF-8
170 Iceape - полнофункциональный web-browser с открытыми исходными
171 текстами, разработанный для максимального соотвествия стандартам,
172 максмимальной переносимости и скорости работы
173
174 %prep
175 %setup -q -a1 -n seamonkey-%{version}
176 %patch0 -p1
177 %patch1 -p1
178 %patch2 -p1
179 %patch3 -p1
180 %patch4 -p1
181 %patch5 -p1
182 %patch6 -p1
183 %patch7 -p1
184
185 %build
186 cat << EOF > .mozconfig
187 mk_add_options MOZ_OBJDIR=%{objdir}
188
189 %if %{with crashreporter}
190 export MOZ_DEBUG_SYMBOLS=1
191 %endif
192
193 # Options for 'configure' (same as command-line options).
194 ac_add_options --prefix=%{_prefix}
195 %if %{?debug:1}0
196 ac_add_options --disable-optimize
197 ac_add_options --enable-debug
198 ac_add_options --enable-debug-modules
199 ac_add_options --enable-debugger-info-modules
200 ac_add_options --enable-crash-on-assert
201 %else
202 ac_add_options --disable-debug
203 ac_add_options --enable-optimize="%{rpmcflags} -Os"
204 %endif
205 ac_add_options --disable-strip
206 %if %{with tests}
207 ac_add_options --enable-tests
208 %else
209 ac_add_options --disable-tests
210 %endif
211 %if %{with crashreporter}
212 ac_add_options --enable-crashreporter
213 %else
214 ac_add_options --disable-crashreporter
215 %endif
216 ac_add_options --disable-elf-hack
217 ac_add_options --disable-gnomeui
218 ac_add_options --disable-necko-wifi
219 ac_add_options --disable-updater
220 ac_add_options --enable-application=suite
221 ac_add_options --enable-chrome-format=omni
222 ac_add_options --enable-default-toolkit=%{?with_gtk3:cairo-gtk3}%{!?with_gtk3:cairo-gtk2}
223 ac_add_options --enable-extensions=default,irc
224 ac_add_options --enable-gio
225 %if %{with ldap}
226 ac_add_options --enable-ldap
227 %else
228 ac_add_options --disable-ldap
229 %endif
230 ac_add_options --enable-safe-browsing
231 # breaks build
232 #ac_add_options --enable-shared-js
233 ac_add_options --enable-startup-notification
234 ac_add_options --enable-system-cairo
235 ac_add_options --enable-system-hunspell
236 ac_add_options --enable-system-sqlite
237 ac_add_options --with-branding=iceape/branding
238 ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
239 ac_add_options --with-distribution-id=org.pld-linux
240 ac_add_options --with-pthreads
241 ac_add_options --with-system-bz2
242 ac_add_options --with-system-ffi
243 ac_add_options --with-system-icu
244 ac_add_options --with-system-jpeg
245 ac_add_options --with-system-libevent
246 ac_add_options --with-system-libvpx
247 ac_add_options --with-system-nspr
248 ac_add_options --with-system-nss
249 ac_add_options --with-system-png
250 ac_add_options --with-system-zlib
251 EOF
252
253 %{__make} -j1 -f client.mk build \
254         AUTOCONF=/usr/bin/autoconf2_13 \
255         STRIP="/bin/true" \
256         MOZ_MAKE_FLAGS="%{?_smp_mflags}" \
257         installdir=%{_libdir}/%{name} \
258         XLIBS="-lX11 -lXt" \
259         CC="%{__cc}" \
260         CXX="%{__cxx} -std=gnu++11"
261
262 %if %{with crashreporter}
263 # create debuginfo for crash-stats.mozilla.com
264 %{__make} -j1 -C obj-%{_target_cpu} buildsymbols
265 %endif
266
267 %install
268 rm -rf $RPM_BUILD_ROOT
269 install -d \
270         $RPM_BUILD_ROOT{%{_bindir},%{_libdir}} \
271         $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}} \
272         $RPM_BUILD_ROOT%{_datadir}/%{name} \
273         $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins \
274         $RPM_BUILD_ROOT%{_mandir}/man1
275
276 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins
277
278 cd %{objdir}
279 cwd=`pwd`
280 %{__make} -C suite/installer stage-package \
281         DESTDIR=$RPM_BUILD_ROOT \
282         installdir=%{_libdir}/%{name} \
283         PKG_SKIP_STRIP=1
284
285 %{__make} -C iceape/branding install \
286         DESTDIR=$RPM_BUILD_ROOT
287
288 cp -a dist/iceape/* $RPM_BUILD_ROOT%{_libdir}/%{name}/
289 cp -p dist/man/man1/iceape.1 $RPM_BUILD_ROOT%{_mandir}/man1
290
291 # Enable crash reporter for Thunderbird application
292 %if %{with crashreporter}
293 %{__sed} -i -e 's/\[Crash Reporter\]/[Crash Reporter]\nEnabled=1/' $RPM_BUILD_ROOT%{_libdir}/%{name}/application.ini
294
295 # Add debuginfo for crash-stats.mozilla.com
296 install -d $RPM_BUILD_ROOT%{_exec_prefix}/lib/debug%{_libdir}/%{name}
297 cp -a dist/%{name}-%{version}.en-US.linux-*.crashreporter-symbols.zip $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/%{name}
298 %endif
299
300 # move arch independant ones to datadir
301 %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome
302 %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults
303 %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins $RPM_BUILD_ROOT%{_datadir}/%{name}/searchplugins
304
305 ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome
306 ln -s ../../share/%{name}/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults
307 ln -s ../../share/%{name}/searchplugins $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins
308
309 %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/isp $RPM_BUILD_ROOT%{_datadir}/%{name}/isp
310 ln -s ../../share/%{name}/isp $RPM_BUILD_ROOT%{_libdir}/%{name}/isp
311
312 # dir for arch independant extensions besides arch dependant extensions
313 # see mozilla/xpcom/build/nsXULAppAPI.h
314 # XRE_SYS_LOCAL_EXTENSION_PARENT_DIR and XRE_SYS_SHARE_EXTENSION_PARENT_DIR
315 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions
316  
317 %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
318 ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
319
320 %{__sed} -e "s|%MOZAPPDIR%|%{_libdir}/%{name}|" \
321          -e "s|%MOZ_APP_DISPLAYNAME%|Iceape|" \
322         %{topdir}/mozilla/build/unix/mozilla.in > $RPM_BUILD_ROOT%{_libdir}/%{name}/iceape
323
324 sed 's,@LIBDIR@,%{_libdir},' %{SOURCE8} > $RPM_BUILD_ROOT%{_bindir}/iceape
325 chmod a+rx $RPM_BUILD_ROOT%{_bindir}/iceape
326
327 install %{SOURCE4} %{SOURCE5} %{SOURCE7} \
328         $RPM_BUILD_ROOT%{_desktopdir}
329
330 # files created by iceape -register
331 touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat
332 touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat
333
334 cat << 'EOF' > $RPM_BUILD_ROOT%{_libdir}/%{name}/register
335 #!/bin/sh
336 umask 022
337 rm -f %{_libdir}/%{name}/components/{compreg,xpti}.dat
338
339 # it attempts to touch files in $HOME/.mozilla
340 # beware if you run this with sudo!!!
341 export HOME=$(mktemp -d)
342 # also TMPDIR could be pointing to sudo user's homedir
343 unset TMPDIR TMP || :
344
345 %{_libdir}/%{name}/iceape -register
346
347 rm -rf $HOME
348 EOF
349 chmod 755 $RPM_BUILD_ROOT%{_libdir}/%{name}/register
350
351 # don't package, rely on system mozldap libraries
352 %{__sed} -i '/lib\(ldap\|ldif\|prldap\)60.so/d' $RPM_BUILD_ROOT%{_libdir}/%{name}/dependentlibs.list
353 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{ldap,ldif,prldap}60.so
354
355 %clean
356 rm -rf $RPM_BUILD_ROOT
357
358 %post
359 %{_libdir}/%{name}/register || :
360 %update_browser_plugins
361 %update_icon_cache hicolor
362 %update_desktop_database
363
364 %postun
365 if [ "$1" = 0 ]; then
366         %update_browser_plugins
367         %update_icon_cache hicolor
368 fi
369
370 %files
371 %defattr(644,root,root,755)
372 %doc AUTHORS
373 %attr(755,root,root) %{_bindir}/iceape
374 %{_mandir}/man1/iceape.1*
375
376 # browser plugins v2
377 %{_browserpluginsconfdir}/browsers.d/%{name}.*
378 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
379
380 %dir %{_libdir}/%{name}
381 %attr(755,root,root) %{_libdir}/%{name}/liblgpllibs.so
382 %attr(755,root,root) %{_libdir}/%{name}/libmozgtk.so
383 %attr(755,root,root) %{_libdir}/%{name}/libxul.so
384 %dir %{_libdir}/%{name}/gtk2
385 %attr(755,root,root) %{_libdir}/%{name}/gtk2/libmozgtk.so
386
387 %{_libdir}/%{name}/blocklist.xml
388 %{_libdir}/%{name}/omni.ja
389 %attr(755,root,root) %{_libdir}/%{name}/register
390
391 %if %{with crashreporter}
392 %{_libdir}/%{name}/crashreporter
393 %{_libdir}/%{name}/crashreporter-override.ini
394 %{_libdir}/%{name}/crashreporter.ini
395 %{_libdir}/%{name}/Throbber-small.gif
396 %endif
397
398 # config?
399 %{_libdir}/%{name}/application.ini
400 %{_libdir}/%{name}/chrome.manifest
401
402 %dir %{_libdir}/%{name}/components
403 %{_libdir}/%{name}/components/components.manifest
404 %attr(755,root,root) %{_libdir}/%{name}/components/libsuite.so
405
406 %{_libdir}/%{name}/dependentlibs.list
407 %{_libdir}/%{name}/platform.ini
408 %attr(755,root,root) %{_libdir}/%{name}/run-mozilla.sh
409 %attr(755,root,root) %{_libdir}/%{name}/iceape-bin
410 %attr(755,root,root) %{_libdir}/%{name}/plugin-container
411
412 %attr(755,root,root) %{_libdir}/%{name}/iceape
413 %dir %{_libdir}/%{name}/plugins
414
415 # symlinks
416 %{_libdir}/%{name}/chrome
417 %{_libdir}/%{name}/defaults
418 %{_libdir}/%{name}/searchplugins
419 %{_libdir}/%{name}/dictionaries
420
421 %dir %{_datadir}/%{name}
422 %{_datadir}/%{name}/chrome
423 %{_datadir}/%{name}/defaults
424 %{_datadir}/%{name}/searchplugins
425
426 %dir %{_datadir}/%{name}/extensions
427 %dir %{_libdir}/%{name}/extensions
428 # the signature of the default theme
429 %{_libdir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi
430 %{_libdir}/%{name}/extensions/modern@themes.mozilla.org.xpi
431
432 # files created by iceape -register
433 %ghost %{_libdir}/%{name}/components/compreg.dat
434 %ghost %{_libdir}/%{name}/components/xpti.dat
435
436 %{_libdir}/%{name}/isp
437 %dir %{_datadir}/%{name}/isp
438 %{_datadir}/%{name}/isp/Bogofilter.sfd
439 %{_datadir}/%{name}/isp/DSPAM.sfd
440 %{_datadir}/%{name}/isp/POPFile.sfd
441 %{_datadir}/%{name}/isp/SpamAssassin.sfd
442 %{_datadir}/%{name}/isp/SpamPal.sfd
443 %{_datadir}/%{name}/isp/movemail.rdf
444 %{_datadir}/%{name}/isp/rss.rdf
445
446 %{_iconsdir}/hicolor/*/apps/iceape.png
447 %{_iconsdir}/hicolor/scalable/apps/iceape.svg
448 %{_desktopdir}/%{name}.desktop
449 %{_desktopdir}/%{name}-composer.desktop
450 %{_desktopdir}/%{name}-mail.desktop
This page took 0.263697 seconds and 3 git commands to generate.