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