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