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