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