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