- thunderbird 2.0.0.14 rebranded as icedove (based on revision 1.127 of mozilla-thund...
[packages/thunderbird.git] / icedove.spec
CommitLineData
44be9ed4 1# TODO:
2# - CHECK all features of enigmail
3# - separate spec for enigmail
4#
5# Conditional builds
6%bcond_without enigmail # don't build enigmail - GPG/PGP support
7%bcond_without gnomeui # disable gnomeui support
8%bcond_without gnomevfs # disable GNOME comp. (gconf+libgnome+gnomevfs) and gnomevfs ext.
9%bcond_without gnome # disable all GNOME components (gnome+gnomeui+gnomevfs)
10%bcond_without ldap # disable e-mail address lookups in LDAP directories
11#
12%if %{without gnome}
13%undefine with_gnomeui
14%undefine with_gnomevfs
15%endif
16%define enigmail_ver 0.95.6
17%define thunderbird_ver 2.0.0.14
18
19Summary: Icedove - email client
20Summary(pl.UTF-8): Icedove - klient poczty
21Name: icedove
22Version: %{thunderbird_ver}
23Release: 1
24License: MPL 1.1 or GPL v2+ or LGPL v2.1+
25Group: Applications/Networking
26Source0: http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/thunderbird-%{version}-source.tar.bz2
27# Source0-md5: e304510d08f7e226bbfff8e7e549232f
28Source1: http://www.mozilla-enigmail.org/download/source/enigmail-%{enigmail_ver}.tar.gz
29# Source1-md5: cfbe6ff77f80a349b396829757ad952a
30Source2: %{name}-branding.tar.bz2
31# Source2-md5: e775b8cb658de32f30b403bc9b7950bf
32Source3: %{name}-rm_nonfree.sh
33Source4: %{name}.desktop
34Source5: %{name}.sh
35Source6: %{name}-enigmail.manifest
36Patch0: %{name}-branding.patch
37Patch1: %{name}-lib_path.patch
38Patch2: %{name}-enigmail-shared.patch
39Patch3: %{name}-gcc.patch
40Patch4: %{name}-fonts.patch
41Patch5: %{name}-install.patch
42Patch6: %{name}-myspell.patch
43Patch7: %{name}-regionNames.patch
44URL: http://www.mozilla.org/projects/thunderbird/
45%{?with_gnomevfs:BuildRequires: GConf2-devel >= 1.2.1}
46BuildRequires: automake
47BuildRequires: freetype-devel >= 1:2.1.8
48%{?with_gnomevfs:BuildRequires: gnome-vfs2-devel >= 2.0}
49BuildRequires: gtk+2-devel >= 1:2.0.0
50BuildRequires: libIDL-devel >= 0.8.0
51%{?with_gnomevfs:BuildRequires: libgnome-devel >= 2.0}
52%{?with_gnomeui:BuildRequires: libgnomeui-devel >= 2.2.0}
53BuildRequires: libjpeg-devel >= 6b
54BuildRequires: libpng-devel >= 1.2.0
55BuildRequires: libstdc++-devel
56BuildRequires: myspell-devel
57BuildRequires: nspr-devel >= 1:4.6.1
58BuildRequires: nss-devel >= 1:3.11.3
59BuildRequires: pango-devel >= 1:1.1.0
60BuildRequires: sed >= 4.0
61BuildRequires: xorg-lib-libXext-devel
62BuildRequires: xorg-lib-libXft-devel >= 2.1
63BuildRequires: xorg-lib-libXinerama-devel
64BuildRequires: xorg-lib-libXp-devel
65BuildRequires: xorg-lib-libXt-devel
66Requires: myspell-common
67Requires: nspr >= 1:4.6.1
68Requires: nss >= 1:3.11.3
69Obsoletes: mozilla-thunderbird
70Obsoletes: mozilla-thunderbird-dictionary-en-US
71BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
72
73# iceweasel/icedove/iceape provide their own versions
74%define _noautoreqdep libgfxpsshar.so libgkgfx.so libgtkxtbin.so libjsj.so libxpcom_compat.so libxpcom_core.so libxpistub.so
75%define _noautoprovfiles %{_libdir}/%{name}/components
76# we don't want these to satisfy xulrunner-devel
77%define _noautoprov libgtkembedmoz.so libldap50.so libmozjs.so libprldap50.so libssldap50.so libxpcom.so libxul.so
78# and as we don't provide them, don't require either
79%define _noautoreq libgtkembedmoz.so libldap50.so libmozjs.so libprldap50.so libssldap50.so libxpcom.so libxul.so
80
81%description
82Icedove is an open-source,fast and portable email client.
83
84%description -l pl.UTF-8
85Icedove jest open sourcowym, szybkim i przenośnym klientem poczty.
86
87%package addon-enigmail
88Summary: Extension for the authentication and encryption features provided by GnuPG
89Summary(pl.UTF-8): Rozszerzenie do uwierzytelniania i szyfrowania zapewnianego przez GnuPG
90License: MPL/LGPL
91Group: Applications/Networking
92URL: http://enigmail.mozdev.org/
93Requires: %{name} = %{thunderbird_ver}-%{release}
94
95%description addon-enigmail
96Enigmail is an extension to the Icedove mail client which allows users to access the authentication and encryption features provided by GnuPG.
97
98Main Features:
99- Encrypt/sign mail when sending, decrypt/authenticate received mail
100- Support for inline-PGP (RFC 2440) and PGP/MIME (RFC 3156)
101- Per-Account based encryption and signing defaults
102- Per-Recipient rules for automated key selection, and
103 enabling/disabling encryption and signing
104- OpenPGP key management interface
105
106%description addon-enigmail -l pl.UTF-8
107Enigmail to rozszerzenie klienta pocztowego Icedove
108pozwalające użytkownikom na dostęp do uwierzytelniania i szyfrowania
109zapewnianego przez GnuPG.
110
111Główne możliwości:
112- szyfrowanie/podpisywanie poczty przy wysyłaniu,
113 odszyfrowywanie/uwierzytelnianie poczty odebranej
114- obsługa inline-PGP (RFC 2440) i PGP/MIME (RFC 3156)
115- ustawienia domyślne szyfrowania i podpisywania dla każdego konta
116- reguły automatycznego wyboru kluczy i włączenia szyfrowania oraz
117 podpisywania dla każdego adresata
118- interfejs do zarządzania kluczami OpenPGP
119
120%prep
121%setup -q -c
122tar xvfj %{SOURCE2}
123cd mozilla
124%{?with_enigmail:tar xvfz %{SOURCE1} -C mailnews/extensions}
125/bin/sh %{SOURCE3}
126%patch0 -p1
127%patch1 -p1
128%{?with_enigmail:%patch2 -p1}
129%patch3 -p1
130%patch4 -p1
131%patch5 -p1
132%patch6 -p1
133%patch7 -p1
134
135:> config/gcc_hidden.h
136
137%build
138cd mozilla
139export CFLAGS="%{rpmcflags} `%{_bindir}/pkg-config mozilla-nspr --cflags-only-I`"
140export CXXFLAGS="%{rpmcflags} `%{_bindir}/pkg-config mozilla-nspr --cflags-only-I`"
141
142cp -f %{_datadir}/automake/config.* build/autoconf
143cp -f %{_datadir}/automake/config.* nsprpub/build/autoconf
144cp -f %{_datadir}/automake/config.* directory/c-sdk/config/autoconf
145
146cat << 'EOF' > .mozconfig
147. $topsrcdir/mail/config/mozconfig
148
149ac_add_options --prefix=%{_prefix}
150ac_add_options --exec-prefix=%{_exec_prefix}
151ac_add_options --bindir=%{_bindir}
152ac_add_options --sbindir=%{_sbindir}
153ac_add_options --sysconfdir=%{_sysconfdir}
154ac_add_options --datadir=%{_datadir}
155ac_add_options --includedir=%{_includedir}
156ac_add_options --libdir=%{_libdir}
157ac_add_options --libexecdir=%{_libexecdir}
158ac_add_options --localstatedir=%{_localstatedir}
159ac_add_options --sharedstatedir=%{_sharedstatedir}
160ac_add_options --mandir=%{_mandir}
161ac_add_options --infodir=%{_infodir}
162%if %{?debug:1}0
163ac_add_options --enable-debug
164ac_add_options --enable-debug-modules
165%else
166ac_add_options --disable-debug
167ac_add_options --disable-debug-modules
168%endif
169%if %{with tests}
170ac_add_options --enable-tests
171%else
172ac_add_options --disable-tests
173%endif
174%if %{with gnomeui}
175ac_add_options --enable-gnomeui
176%else
177ac_add_options --disable-gnomeui
178%endif
179%if %{with gnomevfs}
180ac_add_options --enable-gnomevfs
181%else
182ac_add_options --disable-gnomevfs
183%endif
184%if %{with ldap}
185ac_add_options --enable-ldap
186%else
187ac_add_options --disable-ldap
188%endif
189ac_add_options --disable-installer
190ac_add_options --disable-jsd
191ac_add_options --disable-xprint
192ac_add_options --enable-canvas
193ac_add_options --enable-crypto
194ac_add_options --enable-default-toolkit="gtk2"
195ac_add_options --enable-extensions="pref,cookie,wallet,spellcheck"
196ac_add_options --enable-mathml
197ac_add_options --enable-optimize="%{rpmcflags}"
198ac_add_options --enable-pango
199ac_add_options --enable-reorder
200ac_add_options --disable-strip
201ac_add_options --disable-strip-libs
202ac_add_options --enable-system-cairo
203ac_add_options --enable-system-myspell
204ac_add_options --enable-svg
205ac_add_options --enable-xft
206ac_add_options --enable-xinerama
207ac_add_options --with-system-jpeg
208ac_add_options --with-system-nspr
209ac_add_options --with-system-nss
210ac_add_options --with-system-png
211ac_add_options --with-system-zlib
212ac_add_options --with-pthreads
213ac_add_options --enable-single-profile
214ac_add_options --disable-profilesharing
215ac_add_options --with-branding=icedove/branding
216ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
217EOF
218
219%{__make} -j1 -f client.mk build_all \
220 CC="%{__cc}" \
221 CXX="%{__cxx}"
222
223%if %{with enigmail}
224 cd mailnews/extensions/enigmail
225 ./makemake -r
226 %{__make}
227%endif
228
229%install
230rm -rf $RPM_BUILD_ROOT
231install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_pixmapsdir},%{_desktopdir}} \
232 $RPM_BUILD_ROOT%{_datadir}/%{name}
233
234cd mozilla
235%{__make} -C xpinstall/packager stage-package \
236 DESTDIR=$RPM_BUILD_ROOT \
237 MOZ_PKG_APPDIR=%{_libdir}/%{name} \
238 PKG_SKIP_STRIP=1
239
240# move arch independant ones to datadir
241mv $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome
242mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults
243mv $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs $RPM_BUILD_ROOT%{_datadir}/%{name}/greprefs
244mv $RPM_BUILD_ROOT%{_libdir}/%{name}/icons $RPM_BUILD_ROOT%{_datadir}/%{name}/icons
245mv $RPM_BUILD_ROOT%{_libdir}/%{name}/init.d $RPM_BUILD_ROOT%{_datadir}/%{name}/init.d
246mv $RPM_BUILD_ROOT%{_libdir}/%{name}/isp $RPM_BUILD_ROOT%{_datadir}/%{name}/isp
247mv $RPM_BUILD_ROOT%{_libdir}/%{name}/res $RPM_BUILD_ROOT%{_datadir}/%{name}/res
248ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome
249ln -s ../../share/%{name}/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults
250ln -s ../../share/%{name}/greprefs $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs
251ln -s ../../share/%{name}/icons $RPM_BUILD_ROOT%{_libdir}/%{name}/icons
252ln -s ../../share/%{name}/init.d $RPM_BUILD_ROOT%{_libdir}/%{name}/init.d
253ln -s ../../share/%{name}/isp $RPM_BUILD_ROOT%{_libdir}/%{name}/isp
254ln -s ../../share/%{name}/res $RPM_BUILD_ROOT%{_libdir}/%{name}/res
255
256rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
257ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
258
259%{__sed} -e 's,@LIBDIR@,%{_libdir},' %{SOURCE5} > $RPM_BUILD_ROOT%{_bindir}/icedove
260ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/thunderbird
261ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/mozilla-thunderbird
262
263install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
264
265%if %{with enigmail}
266_enig_dir=$RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/\{847b3a00-7ab1-11d4-8f02-006008948af5\}
267install -d $_enig_dir/chrome
268install -d $_enig_dir/components
269install -d $_enig_dir/defaults/preferences
270mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome/enigmail.jar $_enig_dir/chrome
271mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome/enigmail-skin-tbird.jar $_enig_dir/chrome
272mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/components/enig* $_enig_dir/components
273mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/components/libenigmime.so $_enig_dir/components
274mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/components/ipc.xpt $_enig_dir/components
275mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults/preferences/enigmail.js $_enig_dir/defaults/preferences
276cp -f mailnews/extensions/enigmail/package/install.rdf $_enig_dir
277rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults/preferences
278rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome/enigmail-en-US.jar
279rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome/enigmail-skin.jar
280rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome/enigmime.jar
281rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/components/enig*
282rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/components/libenigmime.so
283rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/components/ipc.xpt
284cp -f %{SOURCE6} $_enig_dir/chrome.manifest
285cp -f icedove/branding/content/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/icedove.png
286%endif
287
288# win32 stuff
289rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/dirver
290
291%clean
292rm -rf $RPM_BUILD_ROOT
293
294%pretrans
295if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
296 mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
297fi
298for d in chrome defaults greprefs icons init.d isp res; do
299 if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then
300 install -d %{_datadir}/%{name}
301 mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d
302 fi
303done
304exit 0
305
306%files
307%defattr(644,root,root,755)
308%attr(755,root,root) %{_bindir}/icedove
309%attr(755,root,root) %{_bindir}/mozilla-thunderbird
310%attr(755,root,root) %{_bindir}/thunderbird
311%dir %{_libdir}/%{name}
312%dir %{_libdir}/%{name}/components
313%attr(755,root,root) %{_libdir}/%{name}/components/*.so
314%{_libdir}/%{name}/components/*.js
315%{_libdir}/%{name}/components/*.xpt
316%attr(755,root,root) %{_libdir}/%{name}/*.so
317%attr(755,root,root) %{_libdir}/%{name}/*.sh
318%attr(755,root,root) %{_libdir}/%{name}/*-bin
319%attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client
320%attr(755,root,root) %{_libdir}/%{name}/reg*
321%attr(755,root,root) %{_libdir}/%{name}/icedove
322%{_libdir}/%{name}/*.txt
323%attr(755,root,root) %{_libdir}/%{name}/x*
324
325# symlinks
326%{_libdir}/%{name}/chrome
327%{_libdir}/%{name}/defaults
328%{_libdir}/%{name}/dictionaries
329%{_libdir}/%{name}/greprefs
330%{_libdir}/%{name}/icons
331%{_libdir}/%{name}/init.d
332%{_libdir}/%{name}/isp
333%{_libdir}/%{name}/res
334
335%{_libdir}/%{name}/dependentlibs.list
336%{_libdir}/%{name}/updater
337%{_libdir}/%{name}/updater.ini
338%{_pixmapsdir}/*.png
339%{_desktopdir}/*.desktop
340
341%dir %{_datadir}/%{name}
342%{_datadir}/%{name}/chrome
343%{_datadir}/%{name}/defaults
344%{_datadir}/%{name}/greprefs
345%{_datadir}/%{name}/icons
346%{_datadir}/%{name}/init.d
347%{_datadir}/%{name}/isp
348%{_datadir}/%{name}/res
349
350%dir %{_libdir}/%{name}/extensions
351%{_libdir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
352
353%if %{with enigmail}
354%files addon-enigmail
355%defattr(644,root,root,755)
356%{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}
357%endif
This page took 0.080827 seconds and 4 git commands to generate.