]> git.pld-linux.org Git - packages/thunderbird.git/blame_incremental - icedove.spec
- updated required version of some packages
[packages/thunderbird.git] / icedove.spec
... / ...
CommitLineData
1# TODO:
2# - build with system mozldap
3#
4# Conditional builds
5%bcond_with gtk3 # GTK+ 3.x instead of 2.x
6%bcond_without ldap # disable e-mail address lookups in LDAP directories
7%bcond_without lightning # disable Sunbird/Lightning calendar
8%bcond_with xulrunner # system xulrunner
9%bcond_with crashreporter # report crashes to crash-stats.mozilla.com
10# - disabled shared_js - https://bugzilla.mozilla.org/show_bug.cgi?id=1039964
11%bcond_with shared_js # shared libmozjs library [broken]
12
13%if 0%{?_enable_debug_packages} != 1
14%undefine crashreporter
15%endif
16
17%define nspr_ver 4.10.6
18%define nss_ver 3.17.0
19
20%define xulrunner_ver 2:31.3.0
21
22%if %{without xulrunner}
23# The actual sqlite version (see RHBZ#480989):
24%define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR)
25%endif
26
27Summary: Icedove - email client
28Summary(pl.UTF-8): Icedove - klient poczty
29Name: icedove
30Version: 31.3.0
31Release: 1
32License: MPL v2.0
33Group: X11/Applications/Mail
34Source0: http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/thunderbird-%{version}.source.tar.bz2
35# Source0-md5: 3781dfb541412c7f6b530a654b834ce5
36Source2: %{name}-branding.tar.xz
37# Source2-md5: 85992ebd22e36ba69743b06b4c53fb2a
38Source3: %{name}-rm_nonfree.sh
39Source4: %{name}.desktop
40Source5: %{name}.sh
41Patch0: %{name}-branding.patch
42Patch3: %{name}-fonts.patch
43Patch6: %{name}-prefs.patch
44Patch7: system-mozldap.patch
45Patch8: %{name}-makefile.patch
46Patch10: %{name}-extensiondir.patch
47Patch12: no-subshell.patch
48# Edit patch below and restore --system-site-packages when system virtualenv gets 1.7 upgrade
49Patch13: system-virtualenv.patch
50Patch15: enable-addons.patch
51Patch16: bump-nss-req.patch
52URL: http://www.pld-linux.org/Packages/Icedove
53BuildRequires: GConf2-devel >= 1.2.1
54BuildRequires: alsa-lib-devel
55BuildRequires: automake
56BuildRequires: bzip2-devel
57BuildRequires: cairo-devel >= 1.10
58BuildRequires: dbus-glib-devel >= 0.60
59BuildRequires: freetype-devel >= 1:2.1.8
60BuildRequires: glib2-devel >= 1:2.20
61BuildRequires: gstreamer0.10-devel
62BuildRequires: gstreamer0.10-plugins-base-devel
63%{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.14}
64%{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0.0}
65BuildRequires: hunspell-devel
66BuildRequires: libIDL-devel >= 0.8.0
67BuildRequires: libevent-devel
68BuildRequires: libiw-devel
69# requires libjpeg-turbo implementing at least libjpeg 6b API
70BuildRequires: libjpeg-devel >= 6b
71BuildRequires: libjpeg-turbo-devel
72BuildRequires: libpng-devel >= 1.4.1
73BuildRequires: libstdc++-devel
74BuildRequires: mozldap-devel
75BuildRequires: nspr-devel >= 1:%{nspr_ver}
76BuildRequires: nss-devel >= 1:%{nss_ver}
77BuildRequires: pango-devel >= 1:1.22.0
78BuildRequires: perl-base >= 1:5.6
79BuildRequires: python-virtualenv
80BuildRequires: pkgconfig
81BuildRequires: python >= 1:2.5
82BuildRequires: sed >= 4.0
83BuildRequires: sqlite3-devel >= 3.8.4.2
84BuildRequires: startup-notification-devel >= 0.8
85BuildRequires: libvpx-devel >= 1.3.0
86BuildRequires: xorg-lib-libXext-devel
87BuildRequires: xorg-lib-libXinerama-devel
88BuildRequires: xorg-lib-libXt-devel
89BuildRequires: yasm
90BuildRequires: zip
91%if %{with xulrunner}
92BuildRequires: xulrunner-devel >= %{xulrunner_ver}
93BuildRequires: xulrunner-devel < 2:32
94%else
95Requires: glib2 >= 1:2.20
96%{!?with_gtk3:Requires: gtk+2 >= 2:2.14}
97%{?with_gtk3:Requires: gtk+3 >= 3.0.0}
98Requires: libvpx >= 1.3.0
99Requires: myspell-common
100Requires: nspr >= 1:%{nspr_ver}
101Requires: nss >= 1:%{nss_ver}
102Requires: pango >= 1:1.22.0
103Requires: sqlite3 >= %{sqlite_build_version}
104%endif
105Requires(post): mktemp >= 1.5-18
106%if %{with xulrunner}
107%requires_eq_to xulrunner xulrunner-devel
108%endif
109Requires: libjpeg-turbo
110Obsoletes: mozilla-thunderbird
111Obsoletes: mozilla-thunderbird-dictionary-en-US
112Conflicts: icedove-lang-resources < %{version}
113BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
114
115%define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+
116
117# iceweasel/icedove/iceape provide their own versions
118%define _noautoprovfiles %{_libdir}/%{name}/components
119%if %{without xulrunner}
120# we don't want these to satisfy packages depending on xulrunner
121%define _noautoprov libmozalloc.so libmozjs.so libxul.so
122# and as we don't provide them, don't require either
123%define _noautoreq libmozalloc.so libmozjs.so libxul.so
124%endif
125
126%define topdir %{_builddir}/%{name}-%{version}
127%define objdir %{topdir}/obj-%{_target_cpu}
128
129%description
130Icedove is an open-source, fast and portable email client.
131
132%description -l pl.UTF-8
133Icedove jest mającym otwarte źródła, szybkim i przenośnym klientem
134poczty.
135
136%package addon-lightning
137Summary: An integrated calendar for Icedove
138Summary(pl.UTF-8): Zintegrowany kalendarz dla Icedove
139License: MPL 1.1 or GPL v2+ or LGPL v2.1+
140Group: Applications/Networking
141Requires: %{name} = %{version}-%{release}
142
143%description addon-lightning
144Lightning is an calendar extension to Icedove email client.
145
146%description addon-lightning -l pl.UTF-8
147Lightning to rozszerzenie do klienta poczty Icedove dodające
148funkcjonalność kalendarza.
149
150%prep
151%setup -qc
152%{__mv} comm-esr31 mozilla
153%setup -q -T -D -a2
154cd mozilla
155/bin/sh %{SOURCE3}
156%patch0 -p1
157%patch3 -p1
158%patch6 -p1
159%patch7 -p1
160%patch8 -p2
161%patch10 -p2
162%patch12 -p1
163%patch13 -p1
164%patch15 -p1
165%patch16 -p2
166
167%build
168cd mozilla
169cp -f %{_datadir}/automake/config.* mozilla/build/autoconf
170cp -f %{_datadir}/automake/config.* mozilla/nsprpub/build/autoconf
171cp -f %{_datadir}/automake/config.* ldap/sdks/c-sdk/config/autoconf
172
173cat << EOF > .mozconfig
174mk_add_options MOZ_OBJDIR=%{objdir}
175
176export CFLAGS="%{rpmcflags}"
177export CXXFLAGS="%{rpmcflags}"
178
179%if %{with crashreporter}
180export MOZ_DEBUG_SYMBOLS=1
181%endif
182
183# Options for 'configure' (same as command-line options).
184ac_add_options --prefix=%{_prefix}
185ac_add_options --exec-prefix=%{_exec_prefix}
186ac_add_options --bindir=%{_bindir}
187ac_add_options --sbindir=%{_sbindir}
188ac_add_options --sysconfdir=%{_sysconfdir}
189ac_add_options --datadir=%{_datadir}
190ac_add_options --includedir=%{_includedir}
191ac_add_options --libdir=%{_libdir}
192ac_add_options --libexecdir=%{_libexecdir}
193ac_add_options --localstatedir=%{_localstatedir}
194ac_add_options --sharedstatedir=%{_sharedstatedir}
195ac_add_options --mandir=%{_mandir}
196ac_add_options --infodir=%{_infodir}
197%if %{?debug:1}0
198ac_add_options --disable-optimize
199ac_add_options --enable-debug
200ac_add_options --enable-debug-modules
201ac_add_options --enable-debugger-info-modules
202ac_add_options --enable-crash-on-assert
203%else
204ac_add_options --disable-debug
205ac_add_options --disable-debug-modules
206ac_add_options --disable-logging
207ac_add_options --enable-optimize="%{rpmcflags} -Os"
208%endif
209ac_add_options --disable-strip
210ac_add_options --disable-strip-libs
211%if %{with tests}
212ac_add_options --enable-tests
213%else
214ac_add_options --disable-tests
215%endif
216%if %{with lightning}
217ac_add_options --enable-calendar
218%else
219ac_add_options --disable-calendar
220%endif
221%if %{with crashreporter}
222ac_add_options --enable-crashreporter
223%else
224ac_add_options --disable-crashreporter
225%endif
226ac_add_options --disable-elf-dynstr-gc
227ac_add_options --disable-gnomeui
228ac_add_options --disable-gnomevfs
229ac_add_options --disable-installer
230ac_add_options --disable-javaxpcom
231ac_add_options --disable-profilesharing
232ac_add_options --disable-updater
233ac_add_options --disable-xterm-updates
234ac_add_options --enable-application=mail
235ac_add_options --enable-crypto
236ac_add_options --enable-default-toolkit=%{?with_gtk3:cairo-gtk3}%{!?with_gtk3:cairo-gtk2}
237ac_add_options --enable-gio
238%if %{with ldap}
239ac_add_options --enable-ldap
240ac_add_options --with-system-ldap
241%else
242ac_add_options --disable-ldap
243%endif
244ac_add_options --enable-libxul
245ac_add_options --enable-pango
246ac_add_options --enable-postscript
247%{?with_shared_js:ac_add_options --enable-shared-js}
248ac_add_options --enable-single-profile
249ac_add_options --enable-startup-notification
250ac_add_options --enable-system-cairo
251ac_add_options --enable-system-hunspell
252ac_add_options --enable-system-sqlite
253ac_add_options --with-branding=icedove/branding
254ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
255ac_add_options --with-distribution-id=org.pld-linux
256%if %{with xulrunner}
257ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul)
258ac_add_options --with-system-libxul
259%endif
260ac_add_options --with-pthreads
261ac_add_options --with-system-bz2
262ac_add_options --with-system-ffi
263ac_add_options --with-system-jpeg
264ac_add_options --with-system-libevent
265ac_add_options --with-system-libvpx
266ac_add_options --with-system-nspr
267ac_add_options --with-system-nss
268ac_add_options --with-system-png
269ac_add_options --with-system-zlib
270EOF
271
272mkdir -p %{objdir}/config
273ln -s %{topdir}/mozilla/config/*.mk %{objdir}/config
274
275%{__make} -j1 -f client.mk build \
276 STRIP="/bin/true" \
277 MOZ_MAKE_FLAGS="%{?_smp_mflags}" \
278 installdir=%{_libdir}/%{name} \
279 XLIBS="-lX11 -lXt" \
280 CC="%{__cc}" \
281 CXX="%{__cxx}"
282
283%if %{with crashreporter}
284# create debuginfo for crash-stats.mozilla.com
285%{__make} -j1 -C obj-%{_target_cpu} buildsymbols
286%endif
287
288%install
289rm -rf $RPM_BUILD_ROOT
290install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name},%{_datadir}/%{name},%{_pixmapsdir},%{_desktopdir}}
291
292cd %{objdir}
293%{__make} -C mail/installer stage-package \
294 DESTDIR=$RPM_BUILD_ROOT \
295 installdir=%{_libdir}/%{name} \
296 PKG_SKIP_STRIP=1
297
298%{__make} -C icedove/branding install \
299 DESTDIR=$RPM_BUILD_ROOT
300
301cp -a mozilla/dist/icedove/* $RPM_BUILD_ROOT%{_libdir}/%{name}/
302
303%if %{with xulrunner}
304# needed to find mozilla runtime
305ln -s ../xulrunner $RPM_BUILD_ROOT%{_libdir}/%{name}/xulrunner
306%endif
307
308# Enable crash reporter for Thunderbird application
309%if %{with crashreporter}
310%{__sed} -i -e 's/\[Crash Reporter\]/[Crash Reporter]\nEnabled=1/' $RPM_BUILD_ROOT%{_libdir}/%{name}/application.ini
311
312# Add debuginfo for crash-stats.mozilla.com
313install -d $RPM_BUILD_ROOT%{_exec_prefix}/lib/debug%{_libdir}/%{name}
314cp -a mozilla/dist/%{name}-%{version}.en-US.linux-*.crashreporter-symbols.zip $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/%{name}
315%endif
316
317# copy manually lightning files, somewhy they are not installed by make
318cp -a mozilla/dist/bin/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103} \
319 $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions
320
321# move arch independant ones to datadir
322mv $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins $RPM_BUILD_ROOT%{_datadir}/%{name}/searchplugins
323ln -s ../../share/%{name}/searchplugins $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins
324
325# dir for arch independant extensions besides arch dependant extensions
326# see mozilla/xpcom/build/nsXULAppAPI.h
327# XRE_SYS_LOCAL_EXTENSION_PARENT_DIR and XRE_SYS_SHARE_EXTENSION_PARENT_DIR
328install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions
329
330%if %{without xulrunner}
331%{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
332ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
333%endif
334
335%{__sed} -e "s|%MOZAPPDIR%|%{_libdir}/%{name}|" \
336 -e "s|%MOZ_APP_DISPLAYNAME%|Icedove|" \
337 %{topdir}/mozilla/mozilla/build/unix/mozilla.in > $RPM_BUILD_ROOT%{_libdir}/%{name}/icedove
338
339%{__sed} -e 's,@LIBDIR@,%{_libdir},' %{SOURCE5} > $RPM_BUILD_ROOT%{_bindir}/icedove
340ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/thunderbird
341ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/mozilla-thunderbird
342
343# install icons and desktop file
344cp -p %{topdir}/mozilla/icedove/branding/content/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
345for i in 16 32 48 64 128 256; do
346 install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps
347 cp -a %{topdir}/mozilla/icedove/branding/icedove${i}.png \
348 $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps/icedove.png
349done
350install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable/apps
351cp -a %{topdir}/mozilla/icedove/branding/icedove.svg $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable/apps/icedove.svg
352
353cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
354
355# files created by regxpcom -register in post
356touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat
357touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat
358cat << 'EOF' > $RPM_BUILD_ROOT%{_libdir}/%{name}/register
359#!/bin/sh
360umask 022
361# make temporary HOME, as it attempts to touch files in $HOME/.mozilla
362# dangerous if you run this with sudo with keep_env += HOME
363# also TMPDIR could be pointing to sudo user's homedir so we reset that too.
364t=$(mktemp -d)
365%{__rm} -f %{_libdir}/%{name}/components/{compreg,xpti}.dat
366TMPDIR= TMP= HOME=$t %{_libdir}/%{name}/icedove -register
367rm -rf $t
368EOF
369chmod a+rx $RPM_BUILD_ROOT%{_libdir}/%{name}/register
370
371# mozldap
372%{__sed} -i '/lib\(ldap\|ldif\|prldap\)60.so/d' $RPM_BUILD_ROOT%{_libdir}/%{name}/dependentlibs.list
373%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{ldap,ldif,prldap}60.so
374
375%clean
376rm -rf $RPM_BUILD_ROOT
377
378%pretrans
379if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
380 mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
381fi
382for d in chrome defaults icons isp modules res searchplugins; do
383 if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then
384 install -d %{_datadir}/%{name}
385 mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d
386 fi
387done
388exit 0
389
390%post
391%{_libdir}/%{name}/register || :
392
393%files
394%defattr(644,root,root,755)
395%attr(755,root,root) %{_bindir}/icedove
396%attr(755,root,root) %{_bindir}/mozilla-thunderbird
397%attr(755,root,root) %{_bindir}/thunderbird
398%dir %{_libdir}/%{name}
399%{_libdir}/%{name}/application.ini
400%{_libdir}/%{name}/blocklist.xml
401%{_libdir}/%{name}/chrome.manifest
402%dir %{_libdir}/%{name}/components
403%{_libdir}/%{name}/components/components.manifest
404%attr(755,root,root) %{_libdir}/%{name}/*.sh
405%attr(755,root,root) %{_libdir}/%{name}/*-bin
406%attr(755,root,root) %{_libdir}/%{name}/icedove
407%attr(755,root,root) %{_libdir}/%{name}/register
408%{_libdir}/%{name}/omni.ja
409%if %{without xulrunner}
410%{_libdir}/%{name}/dependentlibs.list
411%{_libdir}/%{name}/platform.ini
412%attr(755,root,root) %{_libdir}/%{name}/components/*.so
413%attr(755,root,root) %{_libdir}/%{name}/libmozalloc.so
414%{?with_shared_js:%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so}
415%attr(755,root,root) %{_libdir}/%{name}/libxul.so
416%attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client
417%attr(755,root,root) %{_libdir}/%{name}/plugin-container
418%endif
419
420# symlinks
421%{_libdir}/%{name}/chrome
422%{_libdir}/%{name}/defaults
423%{_libdir}/%{name}/isp
424%{_libdir}/%{name}/searchplugins
425%if %{with xulrunner}
426%{_libdir}/%{name}/xulrunner
427%else
428%{_libdir}/%{name}/dictionaries
429%endif
430
431%{_pixmapsdir}/icedove.png
432%{_desktopdir}/icedove.desktop
433
434%dir %{_datadir}/%{name}
435%{_datadir}/%{name}/extensions
436%{_datadir}/%{name}/searchplugins
437
438%if %{with crashreporter}
439%attr(755,root,root) %{_libdir}/%{name}/crashreporter
440%{_libdir}/%{name}/crashreporter.ini
441%{_libdir}/%{name}/Throbber-small.gif
442%endif
443
444%dir %{_libdir}/%{name}/extensions
445%{_libdir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
446
447# files created by regxpcom -register
448%ghost %{_libdir}/%{name}/components/compreg.dat
449%ghost %{_libdir}/%{name}/components/xpti.dat
450
451%{_iconsdir}/hicolor/*/apps/icedove.*
452
453%if %{with lightning}
454%files addon-lightning
455%defattr(644,root,root,755)
456%dir %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}
457%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/application.ini
458%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome
459%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome.manifest
460%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/defaults
461%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/install.rdf
462%dir %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components
463%attr(755,root,root) %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.so
464%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.js
465%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.manifest
466%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.xpt
467%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules
468%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js
469%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/timezones.sqlite
470%endif
This page took 0.054082 seconds and 4 git commands to generate.