]> git.pld-linux.org Git - packages/thunderbird.git/blame_incremental - icedove.spec
- removed obsolete freetype patch
[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.5.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: 516ddb66f788ea7db48ed0d76f7a7ebc
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
49URL: http://www.pld-linux.org/Packages/Icedove
50BuildRequires: GConf2-devel >= 1.2.1
51BuildRequires: alsa-lib-devel
52BuildRequires: automake
53BuildRequires: bzip2-devel
54BuildRequires: cairo-devel >= 1.10
55BuildRequires: dbus-glib-devel >= 0.60
56BuildRequires: freetype-devel >= 1:2.1.8
57BuildRequires: glib2-devel >= 1:2.20
58BuildRequires: gstreamer0.10-devel
59BuildRequires: gstreamer0.10-plugins-base-devel
60%{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.14}
61%{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0.0}
62BuildRequires: hunspell-devel
63BuildRequires: libIDL-devel >= 0.8.0
64BuildRequires: libevent-devel
65BuildRequires: libicu-devel >= 50.1
66BuildRequires: libiw-devel
67# requires libjpeg-turbo implementing at least libjpeg 6b API
68BuildRequires: libjpeg-devel >= 6b
69BuildRequires: libjpeg-turbo-devel
70BuildRequires: libpng-devel >= 1.4.1
71BuildRequires: libstdc++-devel
72BuildRequires: mozldap-devel
73BuildRequires: nspr-devel >= 1:%{nspr_ver}
74BuildRequires: nss-devel >= 1:%{nss_ver}
75BuildRequires: pango-devel >= 1:1.22.0
76BuildRequires: perl-base >= 1:5.6
77BuildRequires: python-virtualenv
78BuildRequires: pkgconfig
79BuildRequires: python >= 1:2.5
80BuildRequires: sed >= 4.0
81BuildRequires: sqlite3-devel >= 3.8.4.2
82BuildRequires: startup-notification-devel >= 0.8
83BuildRequires: libvpx-devel >= 1.3.0
84BuildRequires: virtualenv
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
163%build
164cd mozilla
165cp -f %{_datadir}/automake/config.* mozilla/build/autoconf
166cp -f %{_datadir}/automake/config.* mozilla/nsprpub/build/autoconf
167cp -f %{_datadir}/automake/config.* ldap/sdks/c-sdk/config/autoconf
168
169cat << EOF > .mozconfig
170mk_add_options MOZ_OBJDIR=%{objdir}
171
172export CFLAGS="%{rpmcflags}"
173export CXXFLAGS="%{rpmcflags}"
174
175%if %{with crashreporter}
176export MOZ_DEBUG_SYMBOLS=1
177%endif
178
179# Options for 'configure' (same as command-line options).
180ac_add_options --prefix=%{_prefix}
181ac_add_options --exec-prefix=%{_exec_prefix}
182ac_add_options --bindir=%{_bindir}
183ac_add_options --sbindir=%{_sbindir}
184ac_add_options --sysconfdir=%{_sysconfdir}
185ac_add_options --datadir=%{_datadir}
186ac_add_options --includedir=%{_includedir}
187ac_add_options --libdir=%{_libdir}
188ac_add_options --libexecdir=%{_libexecdir}
189ac_add_options --localstatedir=%{_localstatedir}
190ac_add_options --sharedstatedir=%{_sharedstatedir}
191ac_add_options --mandir=%{_mandir}
192ac_add_options --infodir=%{_infodir}
193%if %{?debug:1}0
194ac_add_options --disable-optimize
195ac_add_options --enable-debug
196ac_add_options --enable-debug-modules
197ac_add_options --enable-debugger-info-modules
198ac_add_options --enable-crash-on-assert
199%else
200ac_add_options --disable-debug
201ac_add_options --disable-debug-modules
202ac_add_options --disable-logging
203ac_add_options --enable-optimize="%{rpmcflags} -Os"
204%endif
205ac_add_options --disable-strip
206ac_add_options --disable-strip-libs
207%if %{with tests}
208ac_add_options --enable-tests
209%else
210ac_add_options --disable-tests
211%endif
212%if %{with lightning}
213ac_add_options --enable-calendar
214%else
215ac_add_options --disable-calendar
216%endif
217%if %{with crashreporter}
218ac_add_options --enable-crashreporter
219%else
220ac_add_options --disable-crashreporter
221%endif
222ac_add_options --disable-elf-dynstr-gc
223ac_add_options --disable-gnomeui
224ac_add_options --disable-gnomevfs
225ac_add_options --disable-installer
226ac_add_options --disable-javaxpcom
227ac_add_options --disable-profilesharing
228ac_add_options --disable-updater
229ac_add_options --disable-xterm-updates
230ac_add_options --enable-application=mail
231ac_add_options --enable-crypto
232ac_add_options --enable-default-toolkit=%{?with_gtk3:cairo-gtk3}%{!?with_gtk3:cairo-gtk2}
233ac_add_options --enable-gio
234%if %{with ldap}
235ac_add_options --enable-ldap
236ac_add_options --with-system-ldap
237%else
238ac_add_options --disable-ldap
239%endif
240ac_add_options --enable-libxul
241ac_add_options --enable-pango
242ac_add_options --enable-postscript
243%{?with_shared_js:ac_add_options --enable-shared-js}
244ac_add_options --enable-single-profile
245ac_add_options --enable-startup-notification
246ac_add_options --enable-system-cairo
247ac_add_options --enable-system-hunspell
248ac_add_options --enable-system-sqlite
249ac_add_options --with-branding=icedove/branding
250ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
251ac_add_options --with-distribution-id=org.pld-linux
252%if %{with xulrunner}
253ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul)
254ac_add_options --with-system-libxul
255%endif
256ac_add_options --with-pthreads
257ac_add_options --with-system-bz2
258ac_add_options --with-system-ffi
259ac_add_options --with-system-icu
260ac_add_options --with-system-jpeg
261ac_add_options --with-system-libevent
262ac_add_options --with-system-libvpx
263ac_add_options --with-system-nspr
264ac_add_options --with-system-nss
265ac_add_options --with-system-png
266ac_add_options --with-system-zlib
267EOF
268
269mkdir -p %{objdir}/config
270ln -s %{topdir}/mozilla/config/*.mk %{objdir}/config
271
272%{__make} -j1 -f client.mk build \
273 STRIP="/bin/true" \
274 MOZ_MAKE_FLAGS="%{?_smp_mflags}" \
275 installdir=%{_libdir}/%{name} \
276 XLIBS="-lX11 -lXt" \
277 CC="%{__cc}" \
278 CXX="%{__cxx}"
279
280%if %{with crashreporter}
281# create debuginfo for crash-stats.mozilla.com
282%{__make} -j1 -C obj-%{_target_cpu} buildsymbols
283%endif
284
285%install
286rm -rf $RPM_BUILD_ROOT
287install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name},%{_datadir}/%{name},%{_pixmapsdir},%{_desktopdir}}
288
289cd %{objdir}
290%{__make} -C mail/installer stage-package \
291 DESTDIR=$RPM_BUILD_ROOT \
292 installdir=%{_libdir}/%{name} \
293 PKG_SKIP_STRIP=1
294
295%{__make} -C icedove/branding install \
296 DESTDIR=$RPM_BUILD_ROOT
297
298cp -a dist/icedove/* $RPM_BUILD_ROOT%{_libdir}/%{name}/
299
300%if %{with xulrunner}
301# needed to find mozilla runtime
302ln -s ../xulrunner $RPM_BUILD_ROOT%{_libdir}/%{name}/xulrunner
303%endif
304
305# Enable crash reporter for Thunderbird application
306%if %{with crashreporter}
307%{__sed} -i -e 's/\[Crash Reporter\]/[Crash Reporter]\nEnabled=1/' $RPM_BUILD_ROOT%{_libdir}/%{name}/application.ini
308
309# Add debuginfo for crash-stats.mozilla.com
310install -d $RPM_BUILD_ROOT%{_exec_prefix}/lib/debug%{_libdir}/%{name}
311cp -a dist/%{name}-%{version}.en-US.linux-*.crashreporter-symbols.zip $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/%{name}
312%endif
313
314# move arch independant ones to datadir
315mv $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins $RPM_BUILD_ROOT%{_datadir}/%{name}/searchplugins
316ln -s ../../share/%{name}/searchplugins $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins
317
318# dir for arch independant extensions besides arch dependant extensions
319# see mozilla/xpcom/build/nsXULAppAPI.h
320# XRE_SYS_LOCAL_EXTENSION_PARENT_DIR and XRE_SYS_SHARE_EXTENSION_PARENT_DIR
321install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions
322
323%if %{without xulrunner}
324%{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
325ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
326%endif
327
328%{__sed} -e "s|%MOZAPPDIR%|%{_libdir}/%{name}|" \
329 -e "s|%MOZ_APP_DISPLAYNAME%|Icedove|" \
330 %{topdir}/mozilla/mozilla/build/unix/mozilla.in > $RPM_BUILD_ROOT%{_libdir}/%{name}/icedove
331
332%{__sed} -e 's,@LIBDIR@,%{_libdir},' %{SOURCE5} > $RPM_BUILD_ROOT%{_bindir}/icedove
333ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/thunderbird
334ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/mozilla-thunderbird
335
336# install icons and desktop file
337cp -p %{topdir}/mozilla/icedove/branding/content/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
338for i in 16 32 48 64 128 256; do
339 install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps
340 cp -a %{topdir}/mozilla/icedove/branding/icedove${i}.png \
341 $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps/icedove.png
342done
343install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable/apps
344cp -a %{topdir}/mozilla/icedove/branding/icedove.svg $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable/apps/icedove.svg
345
346cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
347
348# files created by regxpcom -register in post
349touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat
350touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat
351cat << 'EOF' > $RPM_BUILD_ROOT%{_libdir}/%{name}/register
352#!/bin/sh
353umask 022
354# make temporary HOME, as it attempts to touch files in $HOME/.mozilla
355# dangerous if you run this with sudo with keep_env += HOME
356# also TMPDIR could be pointing to sudo user's homedir so we reset that too.
357t=$(mktemp -d)
358%{__rm} -f %{_libdir}/%{name}/components/{compreg,xpti}.dat
359TMPDIR= TMP= HOME=$t %{_libdir}/%{name}/icedove -register
360rm -rf $t
361EOF
362chmod a+rx $RPM_BUILD_ROOT%{_libdir}/%{name}/register
363
364# mozldap
365%{__sed} -i '/lib\(ldap\|ldif\|prldap\)60.so/d' $RPM_BUILD_ROOT%{_libdir}/%{name}/dependentlibs.list
366%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{ldap,ldif,prldap}60.so
367
368%clean
369rm -rf $RPM_BUILD_ROOT
370
371%pretrans
372if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
373 mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
374fi
375for d in chrome defaults icons isp modules res searchplugins; do
376 if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then
377 install -d %{_datadir}/%{name}
378 mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d
379 fi
380done
381exit 0
382
383%post
384%{_libdir}/%{name}/register || :
385
386%files
387%defattr(644,root,root,755)
388%attr(755,root,root) %{_bindir}/icedove
389%attr(755,root,root) %{_bindir}/mozilla-thunderbird
390%attr(755,root,root) %{_bindir}/thunderbird
391%dir %{_libdir}/%{name}
392%{_libdir}/%{name}/application.ini
393%{_libdir}/%{name}/blocklist.xml
394%{_libdir}/%{name}/chrome.manifest
395%dir %{_libdir}/%{name}/components
396%{_libdir}/%{name}/components/components.manifest
397%attr(755,root,root) %{_libdir}/%{name}/*.sh
398%attr(755,root,root) %{_libdir}/%{name}/*-bin
399%attr(755,root,root) %{_libdir}/%{name}/icedove
400%attr(755,root,root) %{_libdir}/%{name}/register
401%{_libdir}/%{name}/omni.ja
402%if %{without xulrunner}
403%{_libdir}/%{name}/dependentlibs.list
404%{_libdir}/%{name}/platform.ini
405%attr(755,root,root) %{_libdir}/%{name}/components/*.so
406%attr(755,root,root) %{_libdir}/%{name}/libmozalloc.so
407%{?with_shared_js:%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so}
408%attr(755,root,root) %{_libdir}/%{name}/libxul.so
409%attr(755,root,root) %{_libdir}/%{name}/plugin-container
410%endif
411
412# symlinks
413%{_libdir}/%{name}/chrome
414%{_libdir}/%{name}/defaults
415%{_libdir}/%{name}/isp
416%{_libdir}/%{name}/searchplugins
417%if %{with xulrunner}
418%{_libdir}/%{name}/xulrunner
419%else
420%{_libdir}/%{name}/dictionaries
421%endif
422
423%{_pixmapsdir}/icedove.png
424%{_desktopdir}/icedove.desktop
425
426%dir %{_datadir}/%{name}
427%dir %{_libdir}/%{name}/distribution
428%dir %{_libdir}/%{name}/distribution/extensions
429%{_datadir}/%{name}/extensions
430%{_datadir}/%{name}/searchplugins
431
432%if %{with crashreporter}
433%attr(755,root,root) %{_libdir}/%{name}/crashreporter
434%{_libdir}/%{name}/crashreporter.ini
435%{_libdir}/%{name}/Throbber-small.gif
436%endif
437
438%dir %{_libdir}/%{name}/extensions
439%{_libdir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
440
441# files created by regxpcom -register
442%ghost %{_libdir}/%{name}/components/compreg.dat
443%ghost %{_libdir}/%{name}/components/xpti.dat
444
445%{_iconsdir}/hicolor/*/apps/icedove.*
446
447%if %{with lightning}
448%files addon-lightning
449%defattr(644,root,root,755)
450%dir %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}
451%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/app.ini
452%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome.jar
453%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome.manifest
454%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/defaults
455%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/install.rdf
456%dir %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components
457%attr(755,root,root) %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.so
458%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.js
459%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*manifest
460%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.xpt
461%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules
462%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js
463%dir %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/timezones
464%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/timezones/zones.json
465%endif
This page took 0.104224 seconds and 4 git commands to generate.