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