]> git.pld-linux.org Git - packages/thunderbird.git/blob - icedove.spec
- updated to 38.4.0
[packages/thunderbird.git] / icedove.spec
1 # TODO:
2 # - build with system mozldap
3 #
4 # Conditional builds
5 %bcond_with     gtk3            # GTK+ 3.x instead of 2.x
6 %bcond_without  ldap            # disable e-mail address lookups in LDAP directories
7 %bcond_without  lightning       # disable Sunbird/Lightning calendar
8 %bcond_with     xulrunner       # system xulrunner
9 %bcond_with     crashreporter   # report crashes to crash-stats.mozilla.com
10 # - disabled shared_js - https://bugzilla.mozilla.org/show_bug.cgi?id=1039964
11 %bcond_with     shared_js       # shared libmozjs library [broken]
12
13 %if 0%{?_enable_debug_packages} != 1
14 %undefine       crashreporter
15 %endif
16
17 %define         nspr_ver        4.10.6
18 %define         nss_ver         3.19.2.1
19
20 %define         xulrunner_ver   2:31.3.0
21
22 %if %{without xulrunner}
23 # The actual sqlite version (see RHBZ#480989):
24 %define         sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR)
25 %endif
26
27 Summary:        Icedove - email client
28 Summary(pl.UTF-8):      Icedove - klient poczty
29 Name:           icedove
30 Version:        38.4.0
31 Release:        1
32 License:        MPL v2.0
33 Group:          X11/Applications/Mail
34 Source0:        http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/thunderbird-%{version}.source.tar.bz2
35 # Source0-md5:  483373b1485cf2edea77c75a69602870
36 Source2:        %{name}-branding.tar.xz
37 # Source2-md5:  66753bc5c924d7492b6b5c9bdc3e4b5b
38 Source4:        %{name}.desktop
39 Source5:        %{name}.sh
40 Patch0:         %{name}-branding.patch
41 Patch1:         %{name}-fonts.patch
42 Patch2:         %{name}-prefs.patch
43 Patch3:         system-mozldap.patch
44 Patch4:         %{name}-makefile.patch
45 Patch5:         %{name}-extensiondir.patch
46 Patch6:         no-subshell.patch
47 # Edit patch below and restore --system-site-packages when system virtualenv gets 1.7 upgrade
48 Patch7:         system-virtualenv.patch
49 Patch8:         enable-addons.patch
50 Patch9:         bump-nss-req.patch
51 Patch11:        freetype-2.6.patch
52 URL:            http://www.pld-linux.org/Packages/Icedove
53 BuildRequires:  GConf2-devel >= 1.2.1
54 BuildRequires:  alsa-lib-devel
55 BuildRequires:  automake
56 BuildRequires:  bzip2-devel
57 BuildRequires:  cairo-devel >= 1.10
58 BuildRequires:  dbus-glib-devel >= 0.60
59 BuildRequires:  freetype-devel >= 1:2.1.8
60 BuildRequires:  glib2-devel >= 1:2.20
61 BuildRequires:  gstreamer0.10-devel
62 BuildRequires:  gstreamer0.10-plugins-base-devel
63 %{!?with_gtk3:BuildRequires:    gtk+2-devel >= 2:2.14}
64 %{?with_gtk3:BuildRequires:     gtk+3-devel >= 3.0.0}
65 BuildRequires:  hunspell-devel
66 BuildRequires:  libIDL-devel >= 0.8.0
67 BuildRequires:  libevent-devel
68 BuildRequires:  libicu-devel >= 50.1
69 BuildRequires:  libiw-devel
70 # requires libjpeg-turbo implementing at least libjpeg 6b API
71 BuildRequires:  libjpeg-devel >= 6b
72 BuildRequires:  libjpeg-turbo-devel
73 BuildRequires:  libpng-devel >= 1.4.1
74 BuildRequires:  libstdc++-devel
75 BuildRequires:  mozldap-devel
76 BuildRequires:  nspr-devel >= 1:%{nspr_ver}
77 BuildRequires:  nss-devel >= 1:%{nss_ver}
78 BuildRequires:  pango-devel >= 1:1.22.0
79 BuildRequires:  perl-base >= 1:5.6
80 BuildRequires:  python-virtualenv
81 BuildRequires:  pkgconfig
82 BuildRequires:  python >= 1:2.5
83 BuildRequires:  sed >= 4.0
84 BuildRequires:  sqlite3-devel >= 3.8.4.2
85 BuildRequires:  startup-notification-devel >= 0.8
86 BuildRequires:  libvpx-devel >= 1.3.0
87 BuildRequires:  xorg-lib-libXext-devel
88 BuildRequires:  xorg-lib-libXinerama-devel
89 BuildRequires:  xorg-lib-libXt-devel
90 BuildRequires:  yasm
91 BuildRequires:  zip
92 %if %{with xulrunner}
93 BuildRequires:  xulrunner-devel >= %{xulrunner_ver}
94 BuildRequires:  xulrunner-devel < 2:32
95 %else
96 Requires:       glib2 >= 1:2.20
97 %{!?with_gtk3:Requires: gtk+2 >= 2:2.14}
98 %{?with_gtk3:Requires:  gtk+3 >= 3.0.0}
99 Requires:       libvpx >= 1.3.0
100 Requires:       myspell-common
101 Requires:       nspr >= 1:%{nspr_ver}
102 Requires:       nss >= 1:%{nss_ver}
103 Requires:       pango >= 1:1.22.0
104 Requires:       sqlite3 >= %{sqlite_build_version}
105 %endif
106 Requires(post): mktemp >= 1.5-18
107 %if %{with xulrunner}
108 %requires_eq_to xulrunner xulrunner-devel
109 %endif
110 Requires:       libjpeg-turbo
111 Obsoletes:      mozilla-thunderbird
112 Obsoletes:      mozilla-thunderbird-dictionary-en-US
113 Conflicts:      icedove-lang-resources < %{version}
114 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
115
116 %define         filterout_cpp           -D_FORTIFY_SOURCE=[0-9]+
117
118 # iceweasel/icedove/iceape provide their own versions
119 %define         _noautoprovfiles        %{_libdir}/%{name}/components
120 %if %{without xulrunner}
121 # we don't want these to satisfy packages depending on xulrunner
122 %define         _noautoprov             libmozalloc.so libmozjs.so libxul.so
123 # and as we don't provide them, don't require either
124 %define         _noautoreq              libmozalloc.so libmozjs.so libxul.so
125 %endif
126
127 %define         topdir          %{_builddir}/%{name}-%{version}
128 %define         objdir          %{topdir}/obj-%{_target_cpu}
129
130 %description
131 Icedove is an open-source, fast and portable email client.
132
133 %description -l pl.UTF-8
134 Icedove jest mającym otwarte źródła, szybkim i przenośnym klientem
135 poczty.
136
137 %package addon-lightning
138 Summary:        An integrated calendar for Icedove
139 Summary(pl.UTF-8):      Zintegrowany kalendarz dla Icedove
140 License:        MPL 1.1 or GPL v2+ or LGPL v2.1+
141 Group:          Applications/Networking
142 Requires:       %{name} = %{version}-%{release}
143
144 %description addon-lightning
145 Lightning is an calendar extension to Icedove email client.
146
147 %description addon-lightning -l pl.UTF-8
148 Lightning to rozszerzenie do klienta poczty Icedove dodające
149 funkcjonalność kalendarza.
150
151 %prep
152 %setup -qc
153 %{__mv} comm-esr38 mozilla
154 %setup -q -T -D -a2
155 cd mozilla
156 %patch0 -p1
157 #%patch1 -p1
158 %patch2 -p1
159 %patch3 -p1
160 #%patch4 -p2
161 %patch5 -p2
162 %patch6 -p1
163 %patch7 -p1
164 %patch8 -p1
165 %patch9 -p2
166 %patch11 -p1
167
168 %build
169 cd mozilla
170 cp -f %{_datadir}/automake/config.* mozilla/build/autoconf
171 cp -f %{_datadir}/automake/config.* mozilla/nsprpub/build/autoconf
172 cp -f %{_datadir}/automake/config.* ldap/sdks/c-sdk/config/autoconf
173
174 cat << EOF > .mozconfig
175 mk_add_options MOZ_OBJDIR=%{objdir}
176
177 export CFLAGS="%{rpmcflags}"
178 export CXXFLAGS="%{rpmcflags}"
179
180 %if %{with crashreporter}
181 export MOZ_DEBUG_SYMBOLS=1
182 %endif
183
184 # Options for 'configure' (same as command-line options).
185 ac_add_options --prefix=%{_prefix}
186 ac_add_options --exec-prefix=%{_exec_prefix}
187 ac_add_options --bindir=%{_bindir}
188 ac_add_options --sbindir=%{_sbindir}
189 ac_add_options --sysconfdir=%{_sysconfdir}
190 ac_add_options --datadir=%{_datadir}
191 ac_add_options --includedir=%{_includedir}
192 ac_add_options --libdir=%{_libdir}
193 ac_add_options --libexecdir=%{_libexecdir}
194 ac_add_options --localstatedir=%{_localstatedir}
195 ac_add_options --sharedstatedir=%{_sharedstatedir}
196 ac_add_options --mandir=%{_mandir}
197 ac_add_options --infodir=%{_infodir}
198 %if %{?debug:1}0
199 ac_add_options --disable-optimize
200 ac_add_options --enable-debug
201 ac_add_options --enable-debug-modules
202 ac_add_options --enable-debugger-info-modules
203 ac_add_options --enable-crash-on-assert
204 %else
205 ac_add_options --disable-debug
206 ac_add_options --disable-debug-modules
207 ac_add_options --disable-logging
208 ac_add_options --enable-optimize="%{rpmcflags} -Os"
209 %endif
210 ac_add_options --disable-strip
211 ac_add_options --disable-strip-libs
212 %if %{with tests}
213 ac_add_options --enable-tests
214 %else
215 ac_add_options --disable-tests
216 %endif
217 %if %{with lightning}
218 ac_add_options --enable-calendar
219 %else
220 ac_add_options --disable-calendar
221 %endif
222 %if %{with crashreporter}
223 ac_add_options --enable-crashreporter
224 %else
225 ac_add_options --disable-crashreporter
226 %endif
227 ac_add_options --disable-elf-dynstr-gc
228 ac_add_options --disable-gnomeui
229 ac_add_options --disable-gnomevfs
230 ac_add_options --disable-installer
231 ac_add_options --disable-javaxpcom
232 ac_add_options --disable-profilesharing
233 ac_add_options --disable-updater
234 ac_add_options --disable-xterm-updates
235 ac_add_options --enable-application=mail
236 ac_add_options --enable-crypto
237 ac_add_options --enable-default-toolkit=%{?with_gtk3:cairo-gtk3}%{!?with_gtk3:cairo-gtk2}
238 ac_add_options --enable-gio
239 %if %{with ldap}
240 ac_add_options --enable-ldap
241 ac_add_options --with-system-ldap
242 %else
243 ac_add_options --disable-ldap
244 %endif
245 ac_add_options --enable-libxul
246 ac_add_options --enable-pango
247 ac_add_options --enable-postscript
248 %{?with_shared_js:ac_add_options --enable-shared-js}
249 ac_add_options --enable-single-profile
250 ac_add_options --enable-startup-notification
251 ac_add_options --enable-system-cairo
252 ac_add_options --enable-system-hunspell
253 ac_add_options --enable-system-sqlite
254 ac_add_options --with-branding=icedove/branding
255 ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
256 ac_add_options --with-distribution-id=org.pld-linux
257 %if %{with xulrunner}
258 ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul)
259 ac_add_options --with-system-libxul
260 %endif
261 ac_add_options --with-pthreads
262 ac_add_options --with-system-bz2
263 ac_add_options --with-system-ffi
264 ac_add_options --with-system-icu
265 ac_add_options --with-system-jpeg
266 ac_add_options --with-system-libevent
267 ac_add_options --with-system-libvpx
268 ac_add_options --with-system-nspr
269 ac_add_options --with-system-nss
270 ac_add_options --with-system-png
271 ac_add_options --with-system-zlib
272 EOF
273
274 mkdir -p %{objdir}/config
275 ln -s %{topdir}/mozilla/config/*.mk %{objdir}/config
276
277 %{__make} -j1 -f client.mk build \
278         STRIP="/bin/true" \
279         MOZ_MAKE_FLAGS="%{?_smp_mflags}" \
280         installdir=%{_libdir}/%{name} \
281         XLIBS="-lX11 -lXt" \
282         CC="%{__cc}" \
283         CXX="%{__cxx}"
284
285 %if %{with crashreporter}
286 # create debuginfo for crash-stats.mozilla.com
287 %{__make} -j1 -C obj-%{_target_cpu} buildsymbols
288 %endif
289
290 %install
291 rm -rf $RPM_BUILD_ROOT
292 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name},%{_datadir}/%{name},%{_pixmapsdir},%{_desktopdir}}
293
294 cd %{objdir}
295 %{__make} -C mail/installer stage-package \
296         DESTDIR=$RPM_BUILD_ROOT \
297         installdir=%{_libdir}/%{name} \
298         PKG_SKIP_STRIP=1
299
300 %{__make} -C icedove/branding install \
301         DESTDIR=$RPM_BUILD_ROOT
302
303 cp -a dist/icedove/* $RPM_BUILD_ROOT%{_libdir}/%{name}/
304  
305 %if %{with xulrunner}
306 # needed to find mozilla runtime
307 ln -s ../xulrunner $RPM_BUILD_ROOT%{_libdir}/%{name}/xulrunner
308 %endif
309  
310 # Enable crash reporter for Thunderbird application
311 %if %{with crashreporter}
312 %{__sed} -i -e 's/\[Crash Reporter\]/[Crash Reporter]\nEnabled=1/' $RPM_BUILD_ROOT%{_libdir}/%{name}/application.ini
313
314 # Add debuginfo for crash-stats.mozilla.com
315 install -d $RPM_BUILD_ROOT%{_exec_prefix}/lib/debug%{_libdir}/%{name}
316 cp -a dist/%{name}-%{version}.en-US.linux-*.crashreporter-symbols.zip $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/%{name}
317 %endif
318
319 # move arch independant ones to datadir
320 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins $RPM_BUILD_ROOT%{_datadir}/%{name}/searchplugins
321 ln -s ../../share/%{name}/searchplugins $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins
322
323 # dir for arch independant extensions besides arch dependant extensions
324 # see mozilla/xpcom/build/nsXULAppAPI.h
325 # XRE_SYS_LOCAL_EXTENSION_PARENT_DIR and XRE_SYS_SHARE_EXTENSION_PARENT_DIR
326 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions
327
328 %if %{without xulrunner}
329 %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
330 ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
331 %endif
332
333 %{__sed} -e "s|%MOZAPPDIR%|%{_libdir}/%{name}|" \
334          -e "s|%MOZ_APP_DISPLAYNAME%|Icedove|" \
335         %{topdir}/mozilla/mozilla/build/unix/mozilla.in > $RPM_BUILD_ROOT%{_libdir}/%{name}/icedove
336
337 %{__sed} -e 's,@LIBDIR@,%{_libdir},' %{SOURCE5} > $RPM_BUILD_ROOT%{_bindir}/icedove
338 ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/thunderbird
339 ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/mozilla-thunderbird
340
341 # install icons and desktop file
342 cp -p %{topdir}/mozilla/icedove/branding/content/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
343 for i in 16 32 48 64 128 256; do
344         install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps
345         cp -a %{topdir}/mozilla/icedove/branding/icedove${i}.png \
346                 $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps/icedove.png
347 done
348 install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable/apps
349 cp -a %{topdir}/mozilla/icedove/branding/icedove.svg $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable/apps/icedove.svg
350
351 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
352
353 # files created by regxpcom -register in post
354 touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat
355 touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat
356 cat << 'EOF' > $RPM_BUILD_ROOT%{_libdir}/%{name}/register
357 #!/bin/sh
358 umask 022
359 # make temporary HOME, as it attempts to touch files in $HOME/.mozilla
360 # dangerous if you run this with sudo with keep_env += HOME
361 # also TMPDIR could be pointing to sudo user's homedir so we reset that too.
362 t=$(mktemp -d)
363 %{__rm} -f %{_libdir}/%{name}/components/{compreg,xpti}.dat
364 TMPDIR= TMP= HOME=$t %{_libdir}/%{name}/icedove -register
365 rm -rf $t
366 EOF
367 chmod a+rx $RPM_BUILD_ROOT%{_libdir}/%{name}/register
368
369 # mozldap
370 %{__sed} -i '/lib\(ldap\|ldif\|prldap\)60.so/d' $RPM_BUILD_ROOT%{_libdir}/%{name}/dependentlibs.list
371 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{ldap,ldif,prldap}60.so
372
373 %clean
374 rm -rf $RPM_BUILD_ROOT
375
376 %pretrans
377 if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
378         mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
379 fi
380 for d in chrome defaults icons isp modules res searchplugins; do
381         if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then
382                 install -d %{_datadir}/%{name}
383                 mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d
384         fi
385 done
386 exit 0
387
388 %post
389 %{_libdir}/%{name}/register || :
390
391 %files
392 %defattr(644,root,root,755)
393 %attr(755,root,root) %{_bindir}/icedove
394 %attr(755,root,root) %{_bindir}/mozilla-thunderbird
395 %attr(755,root,root) %{_bindir}/thunderbird
396 %dir %{_libdir}/%{name}
397 %{_libdir}/%{name}/application.ini
398 %{_libdir}/%{name}/blocklist.xml
399 %{_libdir}/%{name}/chrome.manifest
400 %dir %{_libdir}/%{name}/components
401 %{_libdir}/%{name}/components/components.manifest
402 %attr(755,root,root) %{_libdir}/%{name}/*.sh
403 %attr(755,root,root) %{_libdir}/%{name}/*-bin
404 %attr(755,root,root) %{_libdir}/%{name}/icedove
405 %attr(755,root,root) %{_libdir}/%{name}/register
406 %{_libdir}/%{name}/omni.ja
407 %if %{without xulrunner}
408 %{_libdir}/%{name}/dependentlibs.list
409 %{_libdir}/%{name}/platform.ini
410 %attr(755,root,root) %{_libdir}/%{name}/components/*.so
411 %attr(755,root,root) %{_libdir}/%{name}/libmozalloc.so
412 %{?with_shared_js:%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so}
413 %attr(755,root,root) %{_libdir}/%{name}/libxul.so
414 %attr(755,root,root) %{_libdir}/%{name}/plugin-container
415 %endif
416
417 # symlinks
418 %{_libdir}/%{name}/chrome
419 %{_libdir}/%{name}/defaults
420 %{_libdir}/%{name}/isp
421 %{_libdir}/%{name}/searchplugins
422 %if %{with xulrunner}
423 %{_libdir}/%{name}/xulrunner
424 %else
425 %{_libdir}/%{name}/dictionaries
426 %endif
427
428 %{_pixmapsdir}/icedove.png
429 %{_desktopdir}/icedove.desktop
430
431 %dir %{_datadir}/%{name}
432 %dir %{_libdir}/%{name}/distribution
433 %dir %{_libdir}/%{name}/distribution/extensions
434 %{_datadir}/%{name}/extensions
435 %{_datadir}/%{name}/searchplugins
436
437 %if %{with crashreporter}
438 %attr(755,root,root) %{_libdir}/%{name}/crashreporter
439 %{_libdir}/%{name}/crashreporter.ini
440 %{_libdir}/%{name}/Throbber-small.gif
441 %endif
442
443 %dir %{_libdir}/%{name}/extensions
444 %{_libdir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
445
446 # files created by regxpcom -register
447 %ghost %{_libdir}/%{name}/components/compreg.dat
448 %ghost %{_libdir}/%{name}/components/xpti.dat
449
450 %{_iconsdir}/hicolor/*/apps/icedove.*
451
452 %if %{with lightning}
453 %files addon-lightning
454 %defattr(644,root,root,755)
455 %dir %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}
456 %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/app.ini
457 %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome.jar
458 %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome.manifest
459 %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/defaults
460 %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/install.rdf
461 %dir %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components
462 %attr(755,root,root) %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.so
463 %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.js
464 %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*manifest
465 %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.xpt
466 %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules
467 %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js
468 %dir %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/timezones
469 %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/timezones/zones.json
470 %endif
This page took 0.062552 seconds and 3 git commands to generate.