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