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