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