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