/[packages]/cauldron/thunderbird/current/SPECS/thunderbird.spec
ViewVC logotype

Contents of /cauldron/thunderbird/current/SPECS/thunderbird.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 389213 - (show annotations) (download)
Thu Jan 17 21:29:26 2013 UTC (11 years, 2 months ago) by pterjan
Original Path: obsolete/cauldron/thunderbird/current/SPECS/thunderbird.spec
File size: 18123 byte(s)
Drop 
1 %define upstream_version %{version}esr
2 %define release_dir comm-esr17
3 %define title Mozilla Thunderbird
4
5 %define oname thunderbird
6 %define tb_appid \{3550f703-e582-4d05-9a08-453d09bdfdc6\}
7 %define tbdir %{_libdir}/%{oname}-%{version}
8 %define tbextdir %{_libdir}/mozilla/extensions/%{tb_appid}
9
10 %define xpi 0
11 %define enigmail_version 1.5.0
12 %define enigmail_short_version 1.5
13 %define enigmail_id \{847b3a00-7ab1-11d4-8f02-006008948af5\}
14
15 %define _provides_exceptions libgtkembedmoz.so\\|libxpcom.so
16 %define _requires_exceptions libgtkembedmoz.so\\|libxpcom.so\\|libxul.so
17
18 # this seems fragile, so require the exact version or later (#58754)
19 %define sqlite3_version %(pkg-config --modversion sqlite3 &>/dev/null && pkg-config --modversion sqlite3 2>/dev/null || echo 0)
20 # this one as well (#59759)
21 %define nss_libname %mklibname nss 3
22 %define nss_version %(pkg-config --modversion nss &>/dev/null && pkg-config --modversion nss 2>/dev/null || echo 0)
23
24 Name: thunderbird
25 Epoch: 0
26 Version: 17.0.2
27 Release: %mkrel 2
28 Summary: Full-featured email, RSS, and newsgroup client
29 License: MPL
30 Group: Networking/Mail
31 URL: http://www.mozilla.org/thunderbird/organizations/
32 Source0: ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/%{upstream_version}/source/thunderbird-%{upstream_version}.source.tar.bz2
33 Source12: mozilla-thunderbird-mageia-default-prefs.js
34 # Mandriva sources (Source300+)
35 Source300: http://www.mozilla-enigmail.org/download/source/enigmail-%{enigmail_version}.tar.gz
36 Source301: http://www.mozilla-enigmail.org/download/source/enigmail-%{enigmail_version}.tar.gz.asc
37 Source303: thunderbird.desktop
38 # Build patches
39 Patch2: mozilla-firefox-1.0-prdtoa.patch
40 Patch4: thunderbird-15-fix-cairo-build.patch
41 Patch5: iceape-2.12-system-virtualenv.patch
42 Patch6: thunderbird-17.0-extra-files.patch
43 Patch7: firefox-10.0-nspr-version.patch
44 Patch8: firefox-10.0-nss-version.patch
45 # Mageia patches (patch100+)
46 # Debian patches (Patch200+)
47 Patch201: thunderbird-16.0-mga-default-mailer.patch
48 # Mandriva patches (Patch300+)
49 Patch300: mozilla-thunderbird-0.8-progname.patch
50 Patch301: mozilla-thunderbird-enigmail-package.patch
51 Patch304: mozilla-thunderbird-run-mozilla.patch
52 # OpenSuse patches (Patch400+)
53 Patch400: thunderbird-appname.patch
54 BuildRequires: autoconf2.1
55 BuildRequires: cairo-devel >= 1.8.8
56 Requires: %{mklibname sqlite3_ 0} >= %{sqlite3_version}
57 BuildRequires: sqlite3-devel >= 3.7.5
58 Requires: %{nss_libname} >= 2:%{nss_version}
59 BuildRequires: yasm
60 BuildRequires: mesagl-devel
61 BuildRequires: gtk2-devel
62 BuildRequires: gzip
63 BuildRequires: python-devel
64 BuildRequires: python-virtualenv
65 BuildRequires: libjpeg-devel
66 #(tpg) older versions doesn't support apng extension
67 BuildRequires: libpng-devel >= 2:1.4
68 BuildRequires: nspr-devel >= 2:4.8.8
69 BuildRequires: nss-static-devel >= 2:3.12.10
70 BuildRequires: unzip
71 BuildRequires: zip
72 BuildRequires: zlib-devel
73 BuildRequires: libIDL-devel
74 BuildRequires: freetype2-devel
75 BuildRequires: pkgconfig(xft)
76 BuildRequires: libxt-devel
77 BuildRequires: hunspell-devel
78 BuildRequires: dbus-glib-devel
79 Requires(post): mktemp
80 Requires(post): rpm-helper
81 Requires(postun): rpm-helper
82 # Integrates thunderbird with xdg-utils.
83 Requires: xdg-utils
84 # Thunderbird 3 requires alsa
85 BuildRequires: libalsa-devel
86 BuildRequires: python
87 BuildRequires: libnotify-devel
88 BuildRequires: startup-notification-devel
89 BuildRequires: libiw-devel
90 BuildRequires: libevent-devel >= 1.4.7
91 BuildRequires: libvpx-devel >= 0.9.7
92 Buildrequires: python-setuptools
93 Suggests: %{_lib}canberra0
94 Suggests: %{_lib}cups2
95 Obsoletes: mozilla-thunderbird < %{epoch}:%{version}-%{release}
96 Provides: mozilla-thunderbird = %{epoch}:%{version}-%{release}
97
98 %description
99 %{title} is a full-featured email, RSS and newsgroup client that
100 makes emailing safer, faster and easier than ever before.
101
102 #===============================================================================
103 #enigmail
104
105 # Supported l10n language lists
106 %define l10n_langlist ar ca cs de el es fi fr it ja ko nb nl pl pt pt_BR ru sl sv tr vi zh_CN zh_TW
107
108 # Disabled l10n languages, for any reason
109 # nl sk es_AR do not support 0.95.0 yet
110 %define disabled_l10n_langlist hu
111 # global disabled_l10n_langlist %{nil}
112
113 # Language descriptions
114 %define language_ar ar
115 %define language_ca ca
116 %define language_cs cs-CZ
117 %define language_de de
118 %define language_el el
119 %define language_es_AR es-AR
120 %define language_es es-ES
121 %define language_fi fi-FI
122 %define language_fr fr
123 %define language_hu hu-HU
124 %define language_it it-IT
125 %define langname_it Italian
126 %define language_ja ja-JP
127 %define language_ko ko-KR
128 %define language_nb nb-NO
129 %define language_nl nl
130 %define language_pl pl
131 %define language_pt pt-PT
132 %define language_pt_BR pt-BR
133 %define language_ro ro-RO
134 %define language_ru ru-RU
135 %define language_sk sk
136 %define language_sl sl-SI
137 %define language_sv sv-SE
138 %define language_tr tr
139 %define language_vi vi
140 %define language_zh_CN zh-CN
141 %define language_zh_TW zh-TW
142
143 # --- Danger line ---
144
145 # All langs
146 %{expand:%%global langlist %(for lang in %l10n_langlist; do echo "$lang"; done | sort -u | sed ':a;$!N;s/\n/ /;ta')}
147
148 # Defaults (all languages enabled by default)
149 # l10n
150 %{expand:%(for lang in %l10n_langlist; do echo "%%define l10n_$lang 1"; done)}
151 %{expand:%(for lang in %disabled_l10n_langlist; do echo "%%define l10n_$lang 0"; done)}
152
153 # Params
154 %{expand:%(for lang in %langlist; do echo "%%bcond_without $lang"; done)}
155
156 %package enigmail
157 Summary: Access the authentication and encryption features provided by GnuPG
158 Group: Networking/Mail
159 Requires: %{name} = %{epoch}:%{version}
160 Obsoletes: %{name}-enigmime < %{epoch}:%{version}-%{release}
161 Provides: %{name}-enigmime = %{epoch}:%{version}-%{release}
162 Obsoletes: mozilla-thunderbird-enigmime < %{epoch}:%{version}-%{release}
163 Obsoletes: mozilla-thunderbird-enigmail < %{epoch}:%{version}-%{release}
164 Provides: mozilla-thunderbird-enigmime = %{epoch}:%{version}-%{release}
165 Provides: mozilla-thunderbird-enigmail = %{epoch}:%{version}-%{release}
166 Requires: gnupg
167 Requires(post): %{name} = %{epoch}:%{version}
168 Requires(preun): %{name} = %{epoch}:%{version}
169 Requires(post): mktemp
170 Requires(postun): mktemp
171 Suggests: pinentry-gtk
172 %(for lang in %l10n_langlist %disabled_l10n_langlist; do
173 echo "Obsoletes: thunderbird-enigmail-$lang < 0:10.0.2"
174 echo "Obsoletes: mozilla-thunderbird-enigmail-$lang < %{epoch}:%{version}-%{release}"
175 echo "Obsoletes: mozilla-thunderbird-enigmail-l10n-$lang < %{epoch}:%{version}-%{release}"
176 done)
177
178 %description enigmail
179 Enigmail is an extension to the mail client of %{title}
180 which allows users to access the authentication and encryption
181 features provided by GnuPG.
182
183 Main Features
184
185 * Encrypt/sign mail when sending, decrypt/authenticate received
186 mail
187 * Support for inline-PGP (RFC 2440) and PGP/MIME (RFC 3156)
188 * Per-Account based encryption and signing defaults
189 * Per-Recipient rules for automated key selection, and
190 enabling/disabling encryption and signing
191 * OpenPGP key management interface
192
193 #===============================================================================
194
195 %package -n nsinstall
196 Summary: Netscape portable install command
197 Group: Development/Other
198
199 %description -n nsinstall
200 Netscape portable install command.
201
202 #===============================================================================
203
204
205 %prep
206 %setup -q -c -n %{name}-%{version}
207
208 #===================
209 # Thunderbird itself
210 %setup -q -T -D -n %{name}-%{version}/%{release_dir}
211 %patch2 -p0
212 pushd mozilla
213 %patch4 -p1
214 %patch5 -p2
215 %patch6 -p1
216 %patch7 -p1
217 %patch8 -p1
218 popd
219
220
221 %patch201 -p0 -b .default_mailer
222 %patch300 -p0 -b .progname
223 %patch301 -p1 -b .enigmailpackage
224 %patch304 -p0 -b .run-mozilla
225
226 %patch400 -p1 -b .appname
227
228 #===============================================================================
229 # Enigmail
230 %setup -q -T -D -n %{name}-%{version}/%{release_dir}/mozilla/extensions -a300
231
232 %setup -q -T -D -n %{name}-%{version}/%{release_dir}
233
234 #===============================================================================
235
236 # for virtualenv patch
237 cd mozilla
238 autoconf-2.13
239 cd ..
240
241 %build
242 export BUILD_OFFICIAL=1
243 export MOZILLA_OFFICIAL=1
244
245
246 CFLAGS=$(echo %optflags | %{__sed} -e 's/-fexceptions//')
247 CFLAGS="$CFLAGS -fno-strict-aliasing -fpermissive"
248 CXXFLAGS="$CFLAGS"
249 RPM_OPT_FLAGS="$CFLAGS"
250 LDFLAGS="%ldflags"
251 export CFLAGS
252 export CXXFLAGS
253 export RPM_OPT_FLAGS
254 export LDFLAGS
255
256 export MOZCONFIG=`pwd`/.mozconfig
257 cat > $MOZCONFIG << EOF
258 mk_add_options MOZILLA_OFFICIAL=1
259 mk_add_options BUILD_OFFICIAL=1
260 mk_add_options MOZ_MAKE_FLAGS="%{_smp_mflags}"
261 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@
262 ac_add_options --prefix="%{_prefix}"
263 ac_add_options --libdir="%{_libdir}"
264 ac_add_options --sysconfdir="%{_sysconfdir}"
265 ac_add_options --mandir="%{_mandir}"
266 ac_add_options --includedir="%{_includedir}"
267 ac_add_options --datadir="%{_datadir}"
268 ac_add_options --enable-application=mail
269 ac_add_options --with-system-nspr
270 ac_add_options --with-system-nss
271 ac_add_options --with-system-jpeg
272 ac_add_options --with-system-zlib
273 ac_add_options --with-system-png
274 ac_add_options --with-system-bz2
275 ac_add_options --enable-system-sqlite
276 ac_add_options --enable-system-hunspell
277 ac_add_options --enable-system-cairo
278 ac_add_options --with-pthreads
279 ac_add_options --disable-tests
280 ac_add_options --disable-debug
281 ac_add_options --disable-installer
282 ac_add_options --disable-updater
283 ac_add_options --enable-xinerama
284 ac_add_options --disable-crashreporter
285 ac_add_options --enable-default-toolkit=cairo-gtk2
286 ac_add_options --disable-xprint
287 ac_add_options --disable-strip
288 ac_add_options --enable-pango
289 ac_add_options --enable-startup-notification
290 ac_add_options --enable-svg
291 ac_add_options --enable-canvas
292 ac_add_options --enable-crypto
293 ac_add_options --enable-mathml
294 ac_add_options --disable-gnomevfs
295 ac_add_options --enable-gio
296 ac_add_options --enable-optimize
297 ac_add_options --with-system-libevent
298 ac_add_options --with-system-libvpx
299 ac_add_options --enable-official-branding
300 ac_add_options --with-distribution-id=org.mageia
301 EOF
302
303 %make -f client.mk build
304
305 #===============================================================================
306
307 pushd mozilla/extensions/enigmail
308
309 for i in `find . -type f -name Makefile.in`; do
310 if [ -f $i.bak ]; then
311 cp $i.bak $i
312 else
313 %{__cp} $i $i.bak
314 fi
315 # %{__perl} -pi -e 's|^(DEPTH.*= )../|\1|;' $i
316 done
317
318 ./makemake -r
319 %{make} LOCAL_INCLUDES+="-I\$(DEPTH)/mailnews/mime/src -I../build -I../src -I../ipc/src"
320
321 (cd lang
322 %{__perl} -pi -e 's|es-AR/enigmail.properties|es-ES/enigmail.properties|' jar.mn
323 echo 'zh-TW' >> current-languages.txt
324 %{make} LOCAL_INCLUDES+="-I\$(DEPTH)/mailnews/mime/src -I../build -I../src -I../ipc/src"
325 chmod 0755 ./make-lang.sh
326 for i in `cat current-languages.txt`; do
327 ./make-lang.sh $i %{enigmail_short_version}
328 done
329 )
330
331 %{make} xpi
332
333 popd
334
335 #===============================================================================
336
337 %install
338 %{__rm} -rf %{buildroot}
339 %{__mkdir_p} %{buildroot}{%{_libdir},%{_bindir},%{_datadir}/applications}
340 %{__mkdir_p} %buildroot%tbdir
341
342 rm -f extensions/spellcheck/locales/en-US/hunspell/en-US.{dic,aff}
343
344 # workaround to use system nss shlibsign instead currently missing bundled one
345 # https://bugzilla.mozilla.org/show_bug.cgi?id=736327
346 ln -s %{_bindir}/shlibsign %{_builddir}/%{name}-%{version}/%{release_dir}/mozilla/dist/bin/shlibsign
347
348 %makeinstall_std
349
350 rm -rf %buildroot%tbdir/dictionaries
351 ln -s %{_datadir}/hunspell %buildroot%tbdir/dictionaries
352
353
354 %{__install} -p -D %{SOURCE303} %{buildroot}/%{_datadir}/applications/%{name}.desktop
355
356 %{__perl} -pi -e 's|^moz_libdir=.*|moz_libdir=%{tbdir}|' %{buildroot}%{_bindir}/thunderbird
357 %{__perl} -pi -e 's|^MRE_HOME=.*|MRE_HOME=%{tbdir}|' %{buildroot}%{_bindir}/thunderbird
358
359 #used for matching system locale on startup
360 %{__cat} %{SOURCE12} | %{__perl} -p -e 's,THUNDERBIRD_RPM_VR,%{version}-%{release},g;' \
361 -e 's,THUNDERBIRD_VENDOR_COMMENT,%{product_release},g;' \
362 > %{buildroot}%{tbdir}/defaults/pref/all-mageia.js
363
364 #===============================================================================
365
366 # icons
367 %{__mkdir_p} %{buildroot}{%{_liconsdir},%{_iconsdir},%{_miconsdir}}
368 %{__mkdir_p} %{buildroot}%{_datadir}/icons/hicolor/{16x16,22x22,24x24,32x32,48x48,256x256}/apps
369 %{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default48.png %{buildroot}%{_liconsdir}/%{name}.png
370 %{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default32.png %{buildroot}%{_iconsdir}/%{name}.png
371 %{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default16.png %{buildroot}%{_miconsdir}/%{name}.png
372 %{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
373 %{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default22.png %{buildroot}%{_datadir}/icons/hicolor/22x22/apps/%{name}.png
374 %{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default24.png %{buildroot}%{_datadir}/icons/hicolor/24x24/apps/%{name}.png
375 %{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
376 %{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
377 %{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default256.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
378
379 #===============================================================================
380
381 %{__mkdir_p} %{buildroot}%{tbextdir}/%{enigmail_id}
382 %if !%{xpi}
383 %{_bindir}/unzip -q mozilla/dist/bin/enigmail-%{enigmail_short_version}*.xpi -d %{buildroot}%{tbextdir}/%{enigmail_id}
384 %{__chmod} 644 %{buildroot}%{tbextdir}/%{enigmail_id}/chrome.manifest
385 # as we rename libipc.so & libenigmime.so and don't install them into %%{tbdir}
386 # we need to remove them from %%{tbdir}/components/binary.manifest
387 # otherwise thunderbird will try to load them, which will fail
388 sed -i 's,binary-component libipc.so,,' %{buildroot}%{tbdir}/components/binary.manifest
389 sed -i 's,binary-component libenigmime.so,,' %{buildroot}%{tbdir}/components/binary.manifest
390 %else
391 %{__cp} -aL mozilla/dist/bin/enigmail-%{enigmail_short_version}*.xpi %{buildroot}%{tbextdir}/%{enigmail_id}/%{enigmail_id}.xpi
392 %endif
393
394 #==============================================================================
395 #enigmail lang package
396 # Convert rpm macros to bash variables
397 %{expand:%(for lang in %langlist; do echo "language_$lang=%%{language_$lang}"; done)}
398 %{expand:%(for lang in %langlist; do echo "with_$lang=%%{with $lang}"; done)}
399 %{expand:%(for lang in %l10n_langlist; do echo "l10n_$lang=%%{l10n_$lang}"; done)}
400 pushd mozilla/extensions/enigmail/lang
401 for lang in %langlist; do
402 %{__mkdir_p} %{buildroot}%{_datadir}/mozilla/extensions/%{tb_appid}/enigmail-$lang@enigmail.mozdev.org
403 language="language_$lang"
404 language=${!language}
405 %{_bindir}/unzip -q enigmail-${language}-%{enigmail_short_version}.xpi -d %{buildroot}%{_datadir}/mozilla/extensions/%{tb_appid}/enigmail-$lang@enigmail.mozdev.org/
406 done
407 popd
408
409 #===============================================================================
410
411 %{__cp} -aL mozilla/dist/bin/nsinstall %{buildroot}%{_bindir}
412
413 #===============================================================================
414
415 #exclude devel files
416 %{__rm} -rf %{buildroot}%{_datadir}/idl/%{oname}-%{version}
417 %{__rm} -rf %{buildroot}%{_includedir}/%{oname}-%{version}
418 %{__rm} -rf %{buildroot}%{_libdir}/%{oname}-devel-%{version}
419
420 %clean
421 %{__rm} -rf %{buildroot}
422
423 #===============================================================================
424
425 %pre
426 if [ $1 == 2 ]; then
427 if [ -d %{tbdir}/dictionaries ]; then
428 # Otherelse rpm can't switch this into a symlink :(
429 rm -rf %{tbdir}/dictionaries
430 fi
431 fi
432
433 %post
434
435 mktemp="/bin/mktemp -d -q -p /tmp -t %{name}.XXXXXXXXXX"
436
437 TMPDIR= TB_TMPDIR=`$mktemp` && {
438 HOME="$TB_TMPDIR" LD_LIBRARY_PATH="%{tbdir}" %{tbdir}/thunderbird-bin -nox -register
439 test -d "$TB_TMPDIR" && %{__rm} -rf -- "$TB_TMPDIR"
440 }
441
442
443 #===============================================================================
444
445 %post enigmail
446 if [ -f %{tbdir}/components/compreg.dat ]; then
447 %{__rm} -f %{tbdir}/components/compreg.dat
448 fi
449
450 if [ -f %{tbdir}/components/xpti.dat ]; then
451 %{__rm} -f %{tbdir}/components/xpti.dat
452 fi
453
454 mktemp="/bin/mktemp -d -q -p /tmp -t %{name}.XXXXXXXXXX"
455
456 TMPDIR= TB_TMPDIR=`$mktemp` && {
457 %if %{xpi}
458 HOME="$TB_TMPDIR" LD_LIBRARY_PATH="%{tbdir}" %{tbdir}/thunderbird-bin -nox -install-global-extension %{tbextdir}/enigmail-%{enigmail_version}-linux-*.xpi
459 %endif
460 HOME="$TB_TMPDIR" LD_LIBRARY_PATH="%{tbdir}" %{tbdir}/thunderbird-bin -nox -register
461 test -d "$TB_TMPDIR" && %{__rm} -rf -- "$TB_TMPDIR"
462 }
463
464 %preun enigmail
465 if [ -f %{tbdir}/components/compreg.dat ]; then
466 %{__rm} -f %{tbdir}/components/compreg.dat
467 fi
468
469 if [ -f %{tbdir}/components/xpti.dat ]; then
470 %{__rm} -f %{tbdir}/components/xpti.dat
471 fi
472
473 if [ -x %{tbdir}/thunderbird-bin ]; then
474 mktemp="/bin/mktemp -d -q -p /tmp -t %{name}.XXXXXXXXXX"
475
476 TMPDIR= TB_TMPDIR=`$mktemp` && {
477 %if %{xpi}
478 HOME="$TB_TMPDIR" LD_LIBRARY_PATH="%{tbdir}" %{tbdir}/thunderbird-bin -nox -install-global-extension %{tbextdir}/enigmail-%{enigmail_version}-linux-*.xpi
479 %endif
480 HOME="$TB_TMPDIR" LD_LIBRARY_PATH="%{tbdir}" %{tbdir}/thunderbird-bin -nox -register
481 test -d "$TB_TMPDIR" && %{__rm} -rf -- "$TB_TMPDIR"
482 }
483 fi
484
485 #===============================================================================
486
487 %files
488 %doc mozilla/LEGAL
489 %attr(755,root,root) %{_bindir}/thunderbird
490 %attr(644,root,root) %{_datadir}/applications/*.desktop
491 %{tbdir}
492 %if %{xpi}
493 %dir %{tbextdir}
494 %endif
495 # Mandriva menu
496 %{_miconsdir}/%{name}.png
497 %{_iconsdir}/%{name}.png
498 %{_liconsdir}/%{name}.png
499 # other icons
500 %{_iconsdir}/hicolor/*/apps/%{name}.png
501 %exclude %{tbextdir}/%{enigmail_id}
502
503 %files enigmail
504 %{tbextdir}/%{enigmail_id}
505 %(for lang in %langlist; do
506 echo "%%lang($lang) %{_datadir}/mozilla/extensions/%{tb_appid}/enigmail-$lang@enigmail.mozdev.org"
507 done)
508
509 %files -n nsinstall
510 %{_bindir}/nsinstall

  ViewVC Help
Powered by ViewVC 1.1.30