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