]> git.pld-linux.org Git - packages/thunderbird.git/blame_incremental - icedove.spec
- do not look (and mkdir) to /usr/{share,lib}/mozilla for extensions (we do not use...
[packages/thunderbird.git] / icedove.spec
... / ...
CommitLineData
1# TODO:
2# - separate spec for enigmail
3# - fix icedove (building) and installing nss/nspr libs!
4# - build with system mozldap
5# - about dialog broken:
6#XML Parsing Error: undefined entity
7#Location: chrome://messenger/content/aboutDialog.xul
8#Line Number 27, Column 37: <description id="copyright">&logoTrademark;</description>
9#------------------------------------^
10#
11# Conditional builds
12%bcond_without enigmail # don't build enigmail - GPG/PGP support
13%bcond_without gnomeui # disable gnomeui support
14%bcond_without gnomevfs # disable GNOME comp. (gconf+libgnome+gnomevfs) and gnomevfs ext.
15%bcond_without gnome # disable all GNOME components (gnome+gnomeui+gnomevfs)
16%bcond_without ldap # disable e-mail address lookups in LDAP directories
17%bcond_without lightning # disable sunbird calendar
18%bcond_with xulrunner # build with system xulrunner
19
20%if %{without gnome}
21%undefine with_gnomeui
22%undefine with_gnomevfs
23%endif
24
25%define enigmail_ver 1.1.2
26
27%if %{without xulrunner}
28# The actual sqlite version (see RHBZ#480989):
29%define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR)
30%endif
31
32Summary: Icedove - email client
33Summary(pl.UTF-8): Icedove - klient poczty
34Name: icedove
35Version: 3.1.2
36Release: 0.5
37License: MPL 1.1 or GPL v2+ or LGPL v2.1+
38Group: X11/Applications/Networking
39Source0: http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/thunderbird-%{version}.source.tar.bz2
40# Source0-md5: 48e80576a7af70e64d30a5162364525a
41Source1: http://www.mozilla-enigmail.org/download/source/enigmail-%{enigmail_ver}.tar.gz
42# Source1-md5: 7d329d5e8afbbb28214ca1995beb09c9
43Source2: %{name}-branding.tar.bz2
44# Source2-md5: 2da351522bdd7f4a3bd8aaff4c776976
45Source3: %{name}-rm_nonfree.sh
46Source4: %{name}.desktop
47Source5: %{name}.sh
48Source6: %{name}-enigmail.manifest
49Patch0: %{name}-branding.patch
50Patch1: %{name}-enigmail-shared.patch
51Patch2: %{name}-gcc.patch
52Patch3: %{name}-fonts.patch
53Patch4: %{name}-install.patch
54Patch5: %{name}-hunspell.patch
55Patch6: %{name}-prefs.patch
56Patch7: system-mozldap.patch
57Patch8: %{name}-makefile.patch
58Patch9: %{name}-libpng.patch
59Patch10: %{name}-extensiondir.patch
60URL: http://www.pld-linux.org/Packages/Icedove
61%{?with_gnomevfs:BuildRequires: GConf2-devel >= 1.2.1}
62BuildRequires: automake
63BuildRequires: freetype-devel >= 1:2.1.8
64%{?with_gnomevfs:BuildRequires: gnome-vfs2-devel >= 2.0}
65BuildRequires: gtk+2-devel >= 1:2.0.0
66BuildRequires: hunspell-devel
67BuildRequires: libIDL-devel >= 0.8.0
68%{?with_gnomevfs:BuildRequires: libgnome-devel >= 2.0}
69%{?with_gnomeui:BuildRequires: libgnomeui-devel >= 2.2.0}
70BuildRequires: libjpeg-devel >= 6b
71BuildRequires: libpng-devel >= 1.2.0
72BuildRequires: libstdc++-devel
73BuildRequires: nspr-devel >= 1:4.8
74BuildRequires: nss-devel >= 1:3.12.0
75BuildRequires: pango-devel >= 1:1.1.0
76BuildRequires: pkgconfig
77BuildRequires: sed >= 4.0
78BuildRequires: sqlite3-devel >= 3.6.22
79BuildRequires: startup-notification-devel >= 0.8
80BuildRequires: xorg-lib-libXext-devel
81BuildRequires: xorg-lib-libXinerama-devel
82BuildRequires: xorg-lib-libXt-devel
83BuildRequires: zip
84%if %{with xulrunner}
85%else
86Requires: myspell-common
87Requires: nspr >= 1:4.6.1
88Requires: nss >= 1:3.11.3
89Requires: sqlite3 >= %{sqlite_build_version}
90%endif
91Obsoletes: mozilla-thunderbird
92Obsoletes: mozilla-thunderbird-dictionary-en-US
93BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
94
95%define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+
96
97# iceweasel/icedove/iceape provide their own versions
98%define _noautoreqdep libgfxpsshar.so libgkgfx.so libgtkxtbin.so libjsj.so libxpcom_compat.so libxpcom_core.so libxpistub.so
99%define _noautoprovfiles %{_libdir}/%{name}/components
100# we don't want these to satisfy xulrunner-devel
101%define _noautoprov libgtkembedmoz.so libmozjs.so libxpcom.so libxul.so
102# and as we don't provide them, don't require either
103%define _noautoreq libgtkembedmoz.so libmozjs.so libxpcom.so libxul.so
104
105%description
106Icedove is an open-source,fast and portable email client.
107
108%description -l pl.UTF-8
109Icedove jest open sourcowym, szybkim i przenośnym klientem poczty.
110
111%package addon-lightning
112Summary: An integrated calendar for Icedove
113Summary(pl.UTF-8): Zintegrowany kalendarz dla Icedove
114License: MPL 1.1 or GPL v2+ or LGPL v2.1+
115Group: Applications/Networking
116Requires: %{name} = %{version}-%{release}
117
118%description addon-lightning
119Lightning is an calendar extension to Icedove email client.
120
121%description addon-lightning -l pl.UTF-8
122Lightning to rozszerzenie do klienta poczty Icedove dodające
123funkcjonalność kalendarza.
124
125%package addon-enigmail
126Summary: Extension for the authentication and encryption features provided by GnuPG
127Summary(pl.UTF-8): Rozszerzenie do uwierzytelniania i szyfrowania zapewnianego przez GnuPG
128License: MPL/LGPL
129Group: Applications/Networking
130URL: http://enigmail.mozdev.org/
131Requires: %{name} = %{version}-%{release}
132Requires: gnupg
133Obsoletes: mozilla-thunderbird-addon-enigmail
134
135%description addon-enigmail
136Enigmail is an extension to the Icedove mail client which allows users
137to access the authentication and encryption features provided by
138GnuPG.
139
140Main Features:
141- Encrypt/sign mail when sending, decrypt/authenticate received mail
142- Support for inline-PGP (RFC 2440) and PGP/MIME (RFC 3156)
143- Per-Account based encryption and signing defaults
144- Per-Recipient rules for automated key selection, and
145 enabling/disabling encryption and signing
146- OpenPGP key management interface
147
148%description addon-enigmail -l pl.UTF-8
149Enigmail to rozszerzenie klienta pocztowego Icedove pozwalające
150użytkownikom na dostęp do uwierzytelniania i szyfrowania zapewnianego
151przez GnuPG.
152
153Główne możliwości:
154- szyfrowanie/podpisywanie poczty przy wysyłaniu,
155 odszyfrowywanie/uwierzytelnianie poczty odebranej
156- obsługa inline-PGP (RFC 2440) i PGP/MIME (RFC 3156)
157- ustawienia domyślne szyfrowania i podpisywania dla każdego konta
158- reguły automatycznego wyboru kluczy i włączenia szyfrowania oraz
159 podpisywania dla każdego adresata
160- interfejs do zarządzania kluczami OpenPGP
161
162%prep
163%setup -qc
164mv -f comm-1.9.2 mozilla
165%setup -q -T -D -a2
166cd mozilla
167%{?with_enigmail:tar xvfz %{SOURCE1} -C mailnews/extensions}
168/bin/sh %{SOURCE3}
169%patch0 -p1
170%{?with_enigmail:%patch1 -p1}
171%patch2 -p1
172%patch3 -p1
173%patch4 -p1
174%patch5 -p1
175%patch6 -p1
176%patch7 -p1
177%patch8 -p0
178%patch9 -p0
179%patch10 -p2
180
181%build
182cd mozilla
183export CFLAGS="%{rpmcflags} `%{_bindir}/pkg-config mozilla-nspr --cflags-only-I`"
184export CXXFLAGS="%{rpmcflags} `%{_bindir}/pkg-config mozilla-nspr --cflags-only-I`"
185
186cp -f %{_datadir}/automake/config.* mozilla/build/autoconf
187cp -f %{_datadir}/automake/config.* mozilla/nsprpub/build/autoconf
188cp -f %{_datadir}/automake/config.* directory/c-sdk/config/autoconf
189
190install -d libxul-sdk
191ln -snf %{_libdir}/xulrunner-sdk libxul-sdk/sdk
192
193cat << EOF > .mozconfig
194mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu}
195
196# Options for 'configure' (same as command-line options).
197ac_add_options --prefix=%{_prefix}
198ac_add_options --exec-prefix=%{_exec_prefix}
199ac_add_options --bindir=%{_bindir}
200ac_add_options --sbindir=%{_sbindir}
201ac_add_options --sysconfdir=%{_sysconfdir}
202ac_add_options --datadir=%{_datadir}
203ac_add_options --includedir=%{_includedir}
204ac_add_options --libdir=%{_libdir}
205ac_add_options --libexecdir=%{_libexecdir}
206ac_add_options --localstatedir=%{_localstatedir}
207ac_add_options --sharedstatedir=%{_sharedstatedir}
208ac_add_options --mandir=%{_mandir}
209ac_add_options --infodir=%{_infodir}
210%if %{?debug:1}0
211ac_add_options --disable-optimize
212ac_add_options --enable-debug
213ac_add_options --enable-debug-modules
214ac_add_options --enable-debugger-info-modules
215ac_add_options --enable-crash-on-assert
216%else
217ac_add_options --disable-debug
218ac_add_options --disable-debug-modules
219ac_add_options --disable-logging
220ac_add_options --enable-optimize="%{rpmcflags} -Os"
221%endif
222ac_add_options --disable-strip
223ac_add_options --disable-strip-libs
224%if %{with tests}
225ac_add_options --enable-tests
226%else
227ac_add_options --disable-tests
228%endif
229%if %{with gnomeui}
230ac_add_options --enable-gnomeui
231%else
232ac_add_options --disable-gnomeui
233%endif
234%if %{with gnomevfs}
235ac_add_options --enable-gnomevfs
236%else
237ac_add_options --disable-gnomevfs
238%endif
239%if %{with ldap}
240ac_add_options --enable-ldap
241ac_add_options --with-system-ldap
242%else
243ac_add_options --disable-ldap
244%endif
245ac_add_options --disable-crashreporter
246ac_add_options --disable-xterm-updates
247ac_add_options --enable-postscript
248%if %{with lightning}
249ac_add_options --enable-calendar
250%else
251ac_add_options --disable-calendar
252%endif
253ac_add_options --disable-installer
254ac_add_options --disable-jsd
255ac_add_options --disable-updater
256ac_add_options --disable-xprint
257ac_add_options --disable-permissions
258ac_add_options --disable-pref-extensions
259ac_add_options --enable-canvas
260ac_add_options --enable-crypto
261ac_add_options --enable-mathml
262ac_add_options --enable-pango
263ac_add_options --enable-reorder
264ac_add_options --enable-startup-notification
265ac_add_options --enable-svg
266ac_add_options --enable-system-cairo
267ac_add_options --enable-system-hunspell
268ac_add_options --enable-system-sqlite
269ac_add_options --enable-xft
270ac_add_options --enable-application=mail
271ac_add_options --enable-default-toolkit=cairo-gtk2
272ac_add_options --enable-xinerama
273ac_add_options --with-distribution-id=org.pld-linux
274ac_add_options --with-branding=icedove/branding
275%if %{with xulrunner}
276ac_add_options --with-libxul-sdk=$(pwd)/libxul-sdk
277ac_add_options --enable-shared
278%else
279ac_add_options --enable-static
280%endif
281ac_add_options --with-pthreads
282ac_add_options --with-system-bz2
283ac_add_options --with-system-jpeg
284ac_add_options --with-system-nspr
285ac_add_options --with-system-nss
286ac_add_options --with-system-png
287ac_add_options --with-system-zlib
288ac_add_options --enable-single-profile
289ac_add_options --disable-profilesharing
290ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
291EOF
292
293%{__make} -j1 -f client.mk build \
294 STRIP="/bin/true" \
295 CC="%{__cc}" \
296 CXX="%{__cxx}"
297
298%if %{with enigmail}
299top=$(pwd)
300cd mailnews/extensions/enigmail
301./makemake -r -o $top/obj-%{_target_cpu}
302%{__make} -C $top/obj-%{_target_cpu}/mailnews/extensions/enigmail \
303 STRIP="/bin/true" \
304 CC="%{__cc}" \
305 CXX="%{__cxx}"
306%endif
307
308%install
309rm -rf $RPM_BUILD_ROOT
310install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_pixmapsdir},%{_desktopdir}} \
311 $RPM_BUILD_ROOT%{_datadir}/%{name}
312install -d $RPM_BUILD_ROOT%{_libdir}/%{name}
313
314cd mozilla/obj-%{_target_cpu}
315%{__make} -C mail/installer stage-package \
316 DESTDIR=$RPM_BUILD_ROOT \
317 MOZ_PKG_APPDIR=%{_libdir}/%{name} \
318 PKG_SKIP_STRIP=1
319
320# copy manually lightning files, somewhy they are not installed by make
321cp -a mozilla/dist/bin/extensions/calendar-timezones@mozilla.org \
322 mozilla/dist/bin/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103} \
323 $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions
324
325# move arch independant ones to datadir
326mv $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome
327mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults
328mv $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs $RPM_BUILD_ROOT%{_datadir}/%{name}/greprefs
329mv $RPM_BUILD_ROOT%{_libdir}/%{name}/isp $RPM_BUILD_ROOT%{_datadir}/%{name}/isp
330mv $RPM_BUILD_ROOT%{_libdir}/%{name}/modules $RPM_BUILD_ROOT%{_datadir}/%{name}/modules
331mv $RPM_BUILD_ROOT%{_libdir}/%{name}/res $RPM_BUILD_ROOT%{_datadir}/%{name}/res
332ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome
333ln -s ../../share/%{name}/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults
334ln -s ../../share/%{name}/greprefs $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs
335ln -s ../../share/%{name}/isp $RPM_BUILD_ROOT%{_libdir}/%{name}/isp
336ln -s ../../share/%{name}/modules $RPM_BUILD_ROOT%{_libdir}/%{name}/modules
337ln -s ../../share/%{name}/res $RPM_BUILD_ROOT%{_libdir}/%{name}/res
338
339rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
340ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
341
342%{__sed} -e 's,@LIBDIR@,%{_libdir},' %{SOURCE5} > $RPM_BUILD_ROOT%{_bindir}/icedove
343ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/thunderbird
344ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/mozilla-thunderbird
345
346cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
347cp -a ../icedove/branding/content/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/icedove.png
348
349# files created by regxpcom -register
350touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat
351touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat
352
353%if %{with enigmail}
354ext_dir=$RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/\{847b3a00-7ab1-11d4-8f02-006008948af5\}
355install -d $ext_dir/{chrome,components,defaults/preferences}
356cd mozilla/dist/bin
357cp -rfLp chrome/enigmail.jar $ext_dir/chrome
358cp -rfLp chrome/enigmime.jar $ext_dir/chrome
359cp -rfLp components/enig* $ext_dir/components
360cp -rfLp components/libenigmime.so $ext_dir/components
361cp -rfLp components/ipc.xpt $ext_dir/components
362cp -rfLp defaults/preferences/enigmail.js $ext_dir/defaults/preferences
363cd -
364cp -a ../mailnews/extensions/enigmail/package/install.rdf $ext_dir
365cp -f %{SOURCE6} $ext_dir/chrome.manifest
366%endif
367
368# remove unecessary stuff
369rm $RPM_BUILD_ROOT%{_libdir}/%{name}/README.txt
370rm $RPM_BUILD_ROOT%{_libdir}/%{name}/components/components.list
371
372# never package these
373# nss
374rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{freebl3,nss3,nssckbi,nssdbm3,nssutil3,smime3,softokn3,ssl3}.*
375# nspr
376rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{nspr4,plc4,plds4}.so
377# mozldap
378rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{ldap,ldif,prldap,ssldap}60.so
379
380%clean
381rm -rf $RPM_BUILD_ROOT
382
383%pretrans
384if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
385 mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
386fi
387for d in chrome defaults greprefs icons isp modules res; do
388 if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then
389 install -d %{_datadir}/%{name}
390 mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d
391 fi
392done
393exit 0
394
395%files
396%defattr(644,root,root,755)
397%attr(755,root,root) %{_bindir}/icedove
398%attr(755,root,root) %{_bindir}/mozilla-thunderbird
399%attr(755,root,root) %{_bindir}/thunderbird
400%dir %{_libdir}/%{name}
401%{_libdir}/%{name}/*.ini
402%dir %{_libdir}/%{name}/components
403%attr(755,root,root) %{_libdir}/%{name}/components/*.so
404%{_libdir}/%{name}/components/*.js
405%{_libdir}/%{name}/components/*.xpt
406%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so
407%attr(755,root,root) %{_libdir}/%{name}/libxpcom.so
408%attr(755,root,root) %{_libdir}/%{name}/libxpcom_core.so
409%attr(755,root,root) %{_libdir}/%{name}/*.sh
410%attr(755,root,root) %{_libdir}/%{name}/*-bin
411%attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client
412%attr(755,root,root) %{_libdir}/%{name}/icedove
413
414# symlinks
415%{_libdir}/%{name}/chrome
416%{_libdir}/%{name}/defaults
417%{_libdir}/%{name}/dictionaries
418%{_libdir}/%{name}/greprefs
419%{_libdir}/%{name}/isp
420%{_libdir}/%{name}/modules
421%{_libdir}/%{name}/res
422
423%{_pixmapsdir}/*.png
424%{_desktopdir}/*.desktop
425
426%dir %{_datadir}/%{name}
427%{_datadir}/%{name}/chrome
428%{_datadir}/%{name}/defaults
429%{_datadir}/%{name}/greprefs
430%{_datadir}/%{name}/isp
431%{_datadir}/%{name}/modules
432%{_datadir}/%{name}/res
433
434%dir %{_libdir}/%{name}/extensions
435%{_libdir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
436
437# files created by regxpcom -register
438%ghost %{_libdir}/%{name}/components/compreg.dat
439%ghost %{_libdir}/%{name}/components/xpti.dat
440
441%if %{with lightning}
442%files addon-lightning
443%defattr(644,root,root,755)
444%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}
445%{_libdir}/%{name}/extensions/calendar-timezones@mozilla.org
446%endif
447
448%if %{with enigmail}
449%files addon-enigmail
450%defattr(644,root,root,755)
451%{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}
452%endif
This page took 0.033908 seconds and 4 git commands to generate.