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