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