]> git.pld-linux.org Git - packages/thunderbird.git/blame_incremental - icedove.spec
- fix applying bump-nss-req 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
11%if 0%{?_enable_debug_packages} != 1
12%undefine crashreporter
13%endif
14
15%define nspr_ver 4.10.2
16%define nss_ver 3.16.2.3
17
18%define xulrunner_ver 2:24.0
19
20%if %{without xulrunner}
21# The actual sqlite version (see RHBZ#480989):
22%define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR)
23%endif
24
25Summary: Icedove - email client
26Summary(pl.UTF-8): Icedove - klient poczty
27Name: icedove
28Version: 31.3.0
29Release: 0.1
30License: MPL v2.0
31Group: X11/Applications/Mail
32Source0: http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/thunderbird-%{version}.source.tar.bz2
33# Source0-md5: 3781dfb541412c7f6b530a654b834ce5
34Source2: %{name}-branding.tar.bz2
35# Source2-md5: d8e6897870bf288fdf264c0e9ef85f7d
36Source3: %{name}-rm_nonfree.sh
37Source4: %{name}.desktop
38Source5: %{name}.sh
39Patch0: %{name}-branding.patch
40Patch3: %{name}-fonts.patch
41Patch6: %{name}-prefs.patch
42Patch7: system-mozldap.patch
43Patch8: %{name}-makefile.patch
44Patch10: %{name}-extensiondir.patch
45Patch12: no-subshell.patch
46# Edit patch below and restore --system-site-packages when system virtualenv gets 1.7 upgrade
47Patch13: system-virtualenv.patch
48Patch15: enable-addons.patch
49Patch16: bump-nss-req.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: 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.14.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.7.17
82BuildRequires: startup-notification-devel >= 0.8
83BuildRequires: libvpx-devel >= 1.0.0
84BuildRequires: xorg-lib-libXext-devel
85BuildRequires: xorg-lib-libXinerama-devel
86BuildRequires: xorg-lib-libXt-devel
87BuildRequires: yasm
88BuildRequires: zip
89%if %{with xulrunner}
90BuildRequires: xulrunner-devel >= %{xulrunner_ver}
91BuildRequires: xulrunner-devel < 2:25
92%else
93Requires: glib2 >= 1:2.20
94%{!?with_gtk3:Requires: gtk+2 >= 2:2.14}
95%{?with_gtk3:Requires: gtk+3 >= 3.0.0}
96Requires: myspell-common
97Requires: nspr >= 1:%{nspr_ver}
98Requires: nss >= 1:%{nss_ver}
99Requires: sqlite3 >= %{sqlite_build_version}
100%endif
101Requires(post): mktemp >= 1.5-18
102%if %{with xulrunner}
103%requires_eq_to xulrunner xulrunner-devel
104%endif
105Requires: libjpeg-turbo
106Obsoletes: mozilla-thunderbird
107Obsoletes: mozilla-thunderbird-dictionary-en-US
108Conflicts: icedove-lang-resources < %{version}
109BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
110
111%define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+
112
113# iceweasel/icedove/iceape provide their own versions
114%define _noautoprovfiles %{_libdir}/%{name}/components
115%if %{without xulrunner}
116# we don't want these to satisfy packages depending on xulrunner
117%define _noautoprov libmozalloc.so libmozjs.so libxul.so
118# and as we don't provide them, don't require either
119%define _noautoreq libmozalloc.so libmozjs.so libxul.so
120%endif
121
122%define topdir %{_builddir}/%{name}-%{version}
123%define objdir %{topdir}/obj-%{_target_cpu}
124
125%description
126Icedove is an open-source, fast and portable email client.
127
128%description -l pl.UTF-8
129Icedove jest mającym otwarte źródła, szybkim i przenośnym klientem
130poczty.
131
132%package addon-lightning
133Summary: An integrated calendar for Icedove
134Summary(pl.UTF-8): Zintegrowany kalendarz dla Icedove
135License: MPL 1.1 or GPL v2+ or LGPL v2.1+
136Group: Applications/Networking
137Requires: %{name} = %{version}-%{release}
138
139%description addon-lightning
140Lightning is an calendar extension to Icedove email client.
141
142%description addon-lightning -l pl.UTF-8
143Lightning to rozszerzenie do klienta poczty Icedove dodające
144funkcjonalność kalendarza.
145
146%prep
147%setup -qc
148%{__mv} comm-esr31 mozilla
149%setup -q -T -D -a2
150cd mozilla
151/bin/sh %{SOURCE3}
152%patch0 -p1
153%patch3 -p1
154%patch6 -p1
155%patch7 -p1
156%patch8 -p2
157%patch10 -p2
158%patch12 -p1
159%patch13 -p1
160%patch15 -p1
161%patch16 -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
243ac_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-jpeg
260ac_add_options --with-system-libevent
261ac_add_options --with-system-libvpx
262ac_add_options --with-system-nspr
263ac_add_options --with-system-nss
264ac_add_options --with-system-png
265ac_add_options --with-system-zlib
266EOF
267
268mkdir -p %{objdir}/config
269ln -s %{topdir}/mozilla/config/*.mk %{objdir}/config
270
271%{__make} -j1 -f client.mk build \
272 STRIP="/bin/true" \
273 MOZ_MAKE_FLAGS="%{?_smp_mflags}" \
274 installdir=%{_libdir}/%{name} \
275 XLIBS="-lX11 -lXt" \
276 CC="%{__cc}" \
277 CXX="%{__cxx}"
278
279%if %{with crashreporter}
280# create debuginfo for crash-stats.mozilla.com
281%{__make} -j1 -C obj-%{_target_cpu} buildsymbols
282%endif
283
284%install
285rm -rf $RPM_BUILD_ROOT
286install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name},%{_datadir}/%{name},%{_pixmapsdir},%{_desktopdir}}
287
288cd %{objdir}
289%{__make} -C mail/installer stage-package \
290 DESTDIR=$RPM_BUILD_ROOT \
291 installdir=%{_libdir}/%{name} \
292 PKG_SKIP_STRIP=1
293
294%{__make} -C icedove/branding install \
295 DESTDIR=$RPM_BUILD_ROOT
296
297cp -a mozilla/dist/icedove/* $RPM_BUILD_ROOT%{_libdir}/%{name}/
298
299%if %{with xulrunner}
300# needed to find mozilla runtime
301ln -s ../xulrunner $RPM_BUILD_ROOT%{_libdir}/%{name}/xulrunner
302%endif
303
304# Enable crash reporter for Thunderbird application
305%if %{with crashreporter}
306%{__sed} -i -e 's/\[Crash Reporter\]/[Crash Reporter]\nEnabled=1/' $RPM_BUILD_ROOT%{_libdir}/%{name}/application.ini
307
308# Add debuginfo for crash-stats.mozilla.com
309install -d $RPM_BUILD_ROOT%{_exec_prefix}/lib/debug%{_libdir}/%{name}
310cp -a mozilla/dist/%{name}-%{version}.en-US.linux-*.crashreporter-symbols.zip $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/%{name}
311%endif
312
313# copy manually lightning files, somewhy they are not installed by make
314cp -a mozilla/dist/bin/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103} \
315 $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions
316
317# move arch independant ones to datadir
318mv $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins $RPM_BUILD_ROOT%{_datadir}/%{name}/searchplugins
319ln -s ../../share/%{name}/searchplugins $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins
320
321# dir for arch independant extensions besides arch dependant extensions
322# see mozilla/xpcom/build/nsXULAppAPI.h
323# XRE_SYS_LOCAL_EXTENSION_PARENT_DIR and XRE_SYS_SHARE_EXTENSION_PARENT_DIR
324install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions
325
326%if %{without xulrunner}
327%{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
328ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
329%endif
330
331%{__sed} -e "s|%MOZAPPDIR%|%{_libdir}/%{name}|" \
332 -e "s|%MOZ_APP_DISPLAYNAME%|Icedove|" \
333 %{topdir}/mozilla/mozilla/build/unix/mozilla.in > $RPM_BUILD_ROOT%{_libdir}/%{name}/icedove
334
335%{__sed} -e 's,@LIBDIR@,%{_libdir},' %{SOURCE5} > $RPM_BUILD_ROOT%{_bindir}/icedove
336ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/thunderbird
337ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/mozilla-thunderbird
338
339# install icons and desktop file
340cp -p %{topdir}/mozilla/icedove/branding/content/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
341for i in 16 32 48 64 128 256; do
342 install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps
343 cp -a %{topdir}/mozilla/icedove/branding/icedove${i}.png \
344 $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps/icedove.png
345done
346install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable/apps
347cp -a %{topdir}/mozilla/icedove/branding/icedove.svg $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable/apps/icedove.svg
348
349cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
350
351# files created by regxpcom -register in post
352touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat
353touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat
354cat << 'EOF' > $RPM_BUILD_ROOT%{_libdir}/%{name}/register
355#!/bin/sh
356umask 022
357# make temporary HOME, as it attempts to touch files in $HOME/.mozilla
358# dangerous if you run this with sudo with keep_env += HOME
359# also TMPDIR could be pointing to sudo user's homedir so we reset that too.
360t=$(mktemp -d)
361%{__rm} -f %{_libdir}/%{name}/components/{compreg,xpti}.dat
362TMPDIR= TMP= HOME=$t %{_libdir}/%{name}/icedove -register
363rm -rf $t
364EOF
365chmod a+rx $RPM_BUILD_ROOT%{_libdir}/%{name}/register
366
367# mozldap
368%{__sed} -i '/lib\(ldap\|ldif\|prldap\)60.so/d' $RPM_BUILD_ROOT%{_libdir}/%{name}/dependentlibs.list
369%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{ldap,ldif,prldap}60.so
370
371%clean
372rm -rf $RPM_BUILD_ROOT
373
374%pretrans
375if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
376 mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
377fi
378for d in chrome defaults icons isp modules res searchplugins; do
379 if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then
380 install -d %{_datadir}/%{name}
381 mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d
382 fi
383done
384exit 0
385
386%post
387%{_libdir}/%{name}/register || :
388
389%files
390%defattr(644,root,root,755)
391%attr(755,root,root) %{_bindir}/icedove
392%attr(755,root,root) %{_bindir}/mozilla-thunderbird
393%attr(755,root,root) %{_bindir}/thunderbird
394%dir %{_libdir}/%{name}
395%{_libdir}/%{name}/application.ini
396%{_libdir}/%{name}/blocklist.xml
397%{_libdir}/%{name}/chrome.manifest
398%dir %{_libdir}/%{name}/components
399%{_libdir}/%{name}/components/components.manifest
400%attr(755,root,root) %{_libdir}/%{name}/*.sh
401%attr(755,root,root) %{_libdir}/%{name}/*-bin
402%attr(755,root,root) %{_libdir}/%{name}/icedove
403%attr(755,root,root) %{_libdir}/%{name}/register
404%{_libdir}/%{name}/omni.ja
405%if %{without xulrunner}
406%{_libdir}/%{name}/dependentlibs.list
407%{_libdir}/%{name}/platform.ini
408%attr(755,root,root) %{_libdir}/%{name}/components/*.so
409%attr(755,root,root) %{_libdir}/%{name}/libmozalloc.so
410%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so
411%attr(755,root,root) %{_libdir}/%{name}/libxul.so
412%attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client
413%attr(755,root,root) %{_libdir}/%{name}/plugin-container
414%endif
415
416# symlinks
417%{_libdir}/%{name}/chrome
418%{_libdir}/%{name}/defaults
419%{_libdir}/%{name}/isp
420%{_libdir}/%{name}/searchplugins
421%if %{with xulrunner}
422%{_libdir}/%{name}/xulrunner
423%else
424%{_libdir}/%{name}/dictionaries
425%endif
426
427%{_pixmapsdir}/icedove.png
428%{_desktopdir}/icedove.desktop
429
430%dir %{_datadir}/%{name}
431%{_datadir}/%{name}/extensions
432%{_datadir}/%{name}/searchplugins
433
434%if %{with crashreporter}
435%attr(755,root,root) %{_libdir}/%{name}/crashreporter
436%{_libdir}/%{name}/crashreporter.ini
437%{_libdir}/%{name}/Throbber-small.gif
438%endif
439
440%dir %{_libdir}/%{name}/extensions
441%{_libdir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
442
443# files created by regxpcom -register
444%ghost %{_libdir}/%{name}/components/compreg.dat
445%ghost %{_libdir}/%{name}/components/xpti.dat
446
447%{_iconsdir}/hicolor/*/apps/icedove.*
448
449%if %{with lightning}
450%files addon-lightning
451%defattr(644,root,root,755)
452%dir %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}
453%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/application.ini
454%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome
455%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome.manifest
456%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/defaults
457%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/install.rdf
458%dir %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components
459%attr(755,root,root) %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.so
460%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.js
461%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.manifest
462%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.xpt
463%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules
464%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js
465%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/timezones.sqlite
466%endif
This page took 0.02581 seconds and 4 git commands to generate.