]> git.pld-linux.org Git - packages/thunderbird.git/blob - icedove.spec
- updated
[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            1.0.0
14
15 Summary:        Icedove - email client
16 Summary(pl.UTF-8):      Icedove - klient poczty
17 Name:           icedove
18 Version:        3.0
19 Release:        0.1
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:  9a564ac2489b1b0f9348dc298b913f6c
24 Source1:        http://www.mozilla-enigmail.org/download/source/enigmail-%{enigmail_ver}.tar.gz
25 # Source1-md5:  e3a6d379f1a72ac023751bdde2de750a
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 Patch9:         %{name}-gcc44.patch
42 URL:            http://www.pld-linux.org/Packages/Icedove
43 %{?with_gnomevfs:BuildRequires: GConf2-devel >= 1.2.1}
44 BuildRequires:  automake
45 BuildRequires:  freetype-devel >= 1:2.1.8
46 %{?with_gnomevfs:BuildRequires: gnome-vfs2-devel >= 2.0}
47 BuildRequires:  gtk+2-devel >= 1:2.0.0
48 BuildRequires:  libIDL-devel >= 0.8.0
49 %{?with_gnomevfs:BuildRequires: libgnome-devel >= 2.0}
50 %{?with_gnomeui:BuildRequires:  libgnomeui-devel >= 2.2.0}
51 BuildRequires:  libjpeg-devel >= 6b
52 BuildRequires:  libpng-devel >= 1.2.0
53 BuildRequires:  libstdc++-devel
54 BuildRequires:  myspell-devel
55 BuildRequires:  nspr-devel >= 1:4.8
56 BuildRequires:  nss-devel >= 1:3.12.0
57 BuildRequires:  pango-devel >= 1:1.1.0
58 BuildRequires:  sed >= 4.0
59 BuildRequires:  xorg-lib-libXext-devel
60 BuildRequires:  xorg-lib-libXft-devel >= 2.1
61 BuildRequires:  xorg-lib-libXinerama-devel
62 BuildRequires:  xorg-lib-libXp-devel
63 BuildRequires:  xorg-lib-libXt-devel
64 Requires:       myspell-common
65 Requires:       nspr >= 1:4.6.1
66 Requires:       nss >= 1:3.11.3
67 Obsoletes:      mozilla-thunderbird
68 Obsoletes:      mozilla-thunderbird-dictionary-en-US
69 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
70
71 %define         filterout_cpp           -D_FORTIFY_SOURCE=[0-9]+
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} = %{version}-%{release}
94 Obsoletes:      mozilla-thunderbird-addon-enigmail
95
96 %description addon-enigmail
97 Enigmail is an extension to the Icedove mail client which allows users
98 to access the authentication and encryption features provided by
99 GnuPG.
100
101 Main Features:
102 - Encrypt/sign mail when sending, decrypt/authenticate received mail
103 - Support for inline-PGP (RFC 2440) and PGP/MIME (RFC 3156)
104 - Per-Account based encryption and signing defaults
105 - Per-Recipient rules for automated key selection, and
106   enabling/disabling encryption and signing
107 - OpenPGP key management interface
108
109 %description addon-enigmail -l pl.UTF-8
110 Enigmail to rozszerzenie klienta pocztowego Icedove pozwalające
111 użytkownikom na dostęp do uwierzytelniania i szyfrowania
112 zapewnianego przez GnuPG.
113
114 Główne możliwości:
115 - szyfrowanie/podpisywanie poczty przy wysyłaniu,
116   odszyfrowywanie/uwierzytelnianie poczty odebranej
117 - obsługa inline-PGP (RFC 2440) i PGP/MIME (RFC 3156)
118 - ustawienia domyślne szyfrowania i podpisywania dla każdego konta
119 - reguły automatycznego wyboru kluczy i włączenia szyfrowania oraz
120   podpisywania dla każdego adresata
121 - interfejs do zarządzania kluczami OpenPGP
122
123 %prep
124 %setup -q -c -a2
125 cd comm-1.9.1
126 %{?with_enigmail:tar xvfz %{SOURCE1} -C mailnews/extensions}
127 /bin/sh %{SOURCE3}
128 %patch0 -p1
129 ##%patch1 -p1
130 %{?with_enigmail:%patch2 -p1}
131 %patch3 -p1
132 #%patch4 -p1
133 %patch5 -p1
134 #%patch6 -p1
135 #%patch7 -p1
136 %patch8 -p0
137 #%patch9 -p1
138
139 ##:> config/gcc_hidden.h
140
141 %build
142 cd comm-1.9.1
143 export CFLAGS="%{rpmcflags} `%{_bindir}/pkg-config mozilla-nspr --cflags-only-I`"
144 export CXXFLAGS="%{rpmcflags} `%{_bindir}/pkg-config mozilla-nspr --cflags-only-I`"
145
146 cp -f %{_datadir}/automake/config.* mozilla/build/autoconf
147 cp -f %{_datadir}/automake/config.* mozilla/nsprpub/build/autoconf
148 cp -f %{_datadir}/automake/config.* directory/c-sdk/config/autoconf
149
150 cat << 'EOF' > .mozconfig
151 #. $topsrcdir/mail/config/mozconfig
152
153 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu}
154
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 --enable-debug
170 ac_add_options --enable-debug-modules
171 %else
172 ac_add_options --disable-debug
173 ac_add_options --disable-debug-modules
174 %endif
175 %if %{with tests}
176 ac_add_options --enable-tests
177 %else
178 ac_add_options --disable-tests
179 %endif
180 %if %{with gnomeui}
181 ac_add_options --enable-gnomeui
182 %else
183 ac_add_options --disable-gnomeui
184 %endif
185 %if %{with gnomevfs}
186 ac_add_options --enable-gnomevfs
187 %else
188 ac_add_options --disable-gnomevfs
189 %endif
190 %if %{with ldap}
191 ac_add_options --enable-ldap
192 %else
193 ac_add_options --disable-ldap
194 %endif
195 ac_add_options --enable-calendar
196 ac_add_options --disable-installer
197 ac_add_options --disable-jsd
198 ac_add_options --disable-xprint
199 ac_add_options --disable-permissions
200 ac_add_options --disable-pref-extensions
201 ac_add_options --enable-canvas
202 ac_add_options --enable-crypto
203 ac_add_options --enable-default-toolkit="gtk2"
204 ac_add_options --enable-mathml
205 ac_add_options --enable-optimize="%{rpmcflags}"
206 ac_add_options --enable-pango
207 ac_add_options --enable-reorder
208 ac_add_options --enable-static
209 ac_add_options --disable-strip
210 ac_add_options --disable-strip-libs
211 ac_add_options --enable-system-cairo
212 ac_add_options --enable-system-myspell
213 ac_add_options --enable-svg
214 ac_add_options --enable-xft
215 ac_add_options --enable-application=mail
216 ac_add_options --enable-default-toolkit=cairo-gtk2
217 ac_add_options --enable-xinerama
218 ac_add_options --with-system-jpeg
219 ac_add_options --with-system-nspr
220 ac_add_options --with-system-nss
221 ac_add_options --with-system-png
222 ac_add_options --with-system-zlib
223 ac_add_options --with-pthreads
224 ac_add_options --enable-single-profile
225 ac_add_options --disable-profilesharing
226 ac_add_options --with-distribution-id=org.pld-linux
227 #ac_add_options --with-branding=icedove/branding
228 ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
229 EOF
230
231 %{__make} -j1 -f client.mk build \
232         CC="%{__cc}" \
233         CXX="%{__cxx}"
234
235 %if %{with enigmail}
236         cd mailnews/extensions/enigmail
237         ./makemake -r
238         %{__make} -C ../../../obj-%{_target_cpu}/mailnews/extensions/enigmail
239 %endif
240
241 %install
242 rm -rf $RPM_BUILD_ROOT
243 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_pixmapsdir},%{_desktopdir}} \
244                $RPM_BUILD_ROOT%{_datadir}/%{name}
245 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}
246
247 cd comm-1.9.1
248 %{__make} -C obj-%{_target_cpu}/mail/installer stage-package \
249         DESTDIR=$RPM_BUILD_ROOT \
250         MOZ_PKG_APPDIR=%{_libdir}/%{name} \
251         PKG_SKIP_STRIP=1
252
253 # move arch independant ones to datadir
254 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome
255 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults
256 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs $RPM_BUILD_ROOT%{_datadir}/%{name}/greprefs
257 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/icons $RPM_BUILD_ROOT%{_datadir}/%{name}/icons
258 #mv $RPM_BUILD_ROOT%{_libdir}/%{name}/init.d $RPM_BUILD_ROOT%{_datadir}/%{name}/init.d
259 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/isp $RPM_BUILD_ROOT%{_datadir}/%{name}/isp
260 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/res $RPM_BUILD_ROOT%{_datadir}/%{name}/res
261 ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome
262 ln -s ../../share/%{name}/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults
263 ln -s ../../share/%{name}/greprefs $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs
264 ln -s ../../share/%{name}/icons $RPM_BUILD_ROOT%{_libdir}/%{name}/icons
265 ln -s ../../share/%{name}/init.d $RPM_BUILD_ROOT%{_libdir}/%{name}/init.d
266 ln -s ../../share/%{name}/isp $RPM_BUILD_ROOT%{_libdir}/%{name}/isp
267 ln -s ../../share/%{name}/res $RPM_BUILD_ROOT%{_libdir}/%{name}/res
268
269 rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
270 ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
271
272 %{__sed} -e 's,@LIBDIR@,%{_libdir},' %{SOURCE5} > $RPM_BUILD_ROOT%{_bindir}/icedove
273 ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/thunderbird
274 ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/mozilla-thunderbird
275
276 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
277
278 %if %{with enigmail}
279 _enig_dir=$RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/\{847b3a00-7ab1-11d4-8f02-006008948af5\}
280 install -d $_enig_dir/chrome
281 install -d $_enig_dir/components
282 install -d $_enig_dir/defaults/preferences
283 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome/enigmail.jar $_enig_dir/chrome
284 #mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome/enigmail-skin-seamonkey.jar $_enig_dir/chrome
285 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/components/enig* $_enig_dir/components
286 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/components/libenigmime.so $_enig_dir/components
287 #mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/components/libipc.so $_enig_dir/components
288 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/components/ipc.xpt $_enig_dir/components
289 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults/preferences/enigmail.js $_enig_dir/defaults/preferences
290 cp -f mailnews/extensions/enigmail/package/install.rdf $_enig_dir
291 rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults/preferences
292 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome/enigmail-en-US.jar
293 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome/enigmail-skin.jar
294 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome/enigmime.jar
295 rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/components/enig*
296 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/components/libenigmime.so
297 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/components/ipc.xpt
298 cp -f %{SOURCE6} $_enig_dir/chrome.manifest
299 #cp -f icedove/branding/content/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/icedove.png
300 %endif
301
302 # win32 stuff
303 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/dirver
304
305 %clean
306 rm -rf $RPM_BUILD_ROOT
307
308 %pretrans
309 if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
310         mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
311 fi
312 for d in chrome defaults greprefs icons init.d isp res; do
313         if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then
314                 install -d %{_datadir}/%{name}
315                 mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d
316         fi
317 done
318 exit 0
319
320 %files
321 %defattr(644,root,root,755)
322 %attr(755,root,root) %{_bindir}/icedove
323 %attr(755,root,root) %{_bindir}/mozilla-thunderbird
324 %attr(755,root,root) %{_bindir}/thunderbird
325 %dir %{_libdir}/%{name}
326 %{_libdir}/%{name}/*.ini
327 %dir %{_libdir}/%{name}/components
328 %attr(755,root,root) %{_libdir}/%{name}/components/*.so
329 %{_libdir}/%{name}/components/*.js
330 %{_libdir}/%{name}/components/*.xpt
331 %attr(755,root,root) %{_libdir}/%{name}/*.so
332 %attr(755,root,root) %{_libdir}/%{name}/*.sh
333 %attr(755,root,root) %{_libdir}/%{name}/*-bin
334 %attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client
335 #%attr(755,root,root) %{_libdir}/%{name}/reg*
336 #%attr(755,root,root) %{_libdir}/%{name}/icedove
337 %{_libdir}/%{name}/*.txt
338 #%attr(755,root,root) %{_libdir}/%{name}/x*
339
340 # symlinks
341 %{_libdir}/%{name}/chrome
342 %{_libdir}/%{name}/defaults
343 %{_libdir}/%{name}/dictionaries
344 %{_libdir}/%{name}/greprefs
345 %{_libdir}/%{name}/icons
346 %{_libdir}/%{name}/init.d
347 %{_libdir}/%{name}/isp
348 %{_libdir}/%{name}/res
349
350 %{_libdir}/%{name}/dependentlibs.list
351 %{_libdir}/%{name}/updater
352 #%{_pixmapsdir}/*.png
353 %{_desktopdir}/*.desktop
354
355 %dir %{_datadir}/%{name}
356 %{_datadir}/%{name}/chrome
357 %{_datadir}/%{name}/defaults
358 %{_datadir}/%{name}/greprefs
359 %{_datadir}/%{name}/icons
360 #%{_datadir}/%{name}/init.d
361 %{_datadir}/%{name}/isp
362 %{_datadir}/%{name}/res
363
364 %dir %{_libdir}/%{name}/modules
365 %{_libdir}/%{name}/modules/*.js*
366 %dir %{_libdir}/%{name}/modules/activity
367 %{_libdir}/%{name}/modules/activity/*.js
368 %dir %{_libdir}/%{name}/modules/gloda
369 %{_libdir}/%{name}/modules/gloda/*.js
370
371 %dir %{_libdir}/%{name}/extensions
372 %{_libdir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
373
374 %if %{with enigmail}
375 %files addon-enigmail
376 %defattr(644,root,root,755)
377 %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}
378 %endif
This page took 0.070685 seconds and 4 git commands to generate.