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