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