/[packages]/updates/1/mozilla-thunderbird/current/SPECS/mozilla-thunderbird.spec
ViewVC logotype

Contents of /updates/1/mozilla-thunderbird/current/SPECS/mozilla-thunderbird.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 217047 - (show annotations) (download)
Sat Mar 3 00:22:51 2012 UTC (8 years, 7 months ago) by doktor5000
File size: 22192 byte(s)
- remove Suggests on -l10n, added by mistake (SILENT)
1 %define __libtoolize /bin/true
2 %define __cputoolize /bin/true
3
4 %define upstream_version %{version}esr
5 %define release_dir comm-esr10
6
7 %define official_branding 1
8
9 %define release %mkrel 1
10
11 %if %{official_branding}
12 %define title Mozilla Thunderbird
13 %else
14 %define title Mail/News
15 %endif
16
17 %define oname thunderbird
18 %define tb_appid \{3550f703-e582-4d05-9a08-453d09bdfdc6\}
19 %define tbdir %{_libdir}/%{oname}-%{version}
20 %define tbextdir %{_libdir}/mozilla/extensions/%{tb_appid}
21
22 %define xpi 0
23 %define enigmail_version 1.3.5
24 %define enigmail_short_version 1.4
25 %define enigmail_id \{847b3a00-7ab1-11d4-8f02-006008948af5\}
26
27 %define _provides_exceptions libgtkembedmoz.so\\|libxpcom.so
28 %define _requires_exceptions libgtkembedmoz.so\\|libxpcom.so\\|libxul.so
29
30 # FIXME: Bug in nsExtensionManager.js prevents using x86_64 as arch
31 # FIXME: I tried to modify nsExtensionManager.js.in, but it
32 # FIXME: complained that I had modified it
33 %ifarch %{ix86}
34 %define tbarch x86
35 %else # ix86
36 %ifarch x86_64
37 %define tbarch %{_arch}
38 %else # x86_64
39 %define tbarch %{_arch}
40 %endif # x86_64
41 %endif # ix86
42
43 # this seems fragile, so require the exact version or later (#58754)
44 %define sqlite3_version %(pkg-config --modversion sqlite3 &>/dev/null && pkg-config --modversion sqlite3 2>/dev/null || echo 0)
45 # this one as well (#59759)
46 %define nss_libname %mklibname nss 3
47 %define nss_version %(pkg-config --modversion nss &>/dev/null && pkg-config --modversion nss 2>/dev/null || echo 0)
48
49 Name: mozilla-thunderbird
50 Epoch: 0
51 Version: 10.0.2
52 Release: %{release}
53 Summary: Full-featured email, RSS, and newsgroup client
54 License: MPL
55 Group: Networking/Mail
56 URL: http://www.mozilla.org/en-US/thunderbird/organizations/all-esr.html
57 Source0: ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/%{upstream_version}/source/thunderbird-%{upstream_version}.source.tar.bz2
58 Source12: mozilla-thunderbird-mageia-default-prefs.js
59 Source30: mozilla-thunderbird-open-browser.sh
60 Source31: mozilla-thunderbird-open-browser-xdg.sh
61 # Mandriva sources (Source300+)
62 Source300: http://www.mozilla-enigmail.org/download/source/enigmail-%{enigmail_version}.tar.gz
63 Source301: http://www.mozilla-enigmail.org/download/source/enigmail-%{enigmail_version}.tar.gz.asc
64 Source302: %{name}-icons.tar.bz2
65 # Language package template
66 Source400: mozilla-thunderbird-enigmail-l10n-template.in
67 # Build patches
68 Patch2: mozilla-firefox-1.0-prdtoa.patch
69 # Mageia patches (patch100+)
70 # use libcanberra to play sounds rather than deprecated esound
71 # taken from upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=635918
72 Patch100: mozilla-thunderbird-mga-use-libcanberra.patch
73 # Debian patches (Patch200+)
74 Patch201: mozilla-thunderbird-5.0-mga-default-mailer.patch
75 # Mandriva patches (Patch300+)
76 Patch300: mozilla-thunderbird-0.8-progname.patch
77 Patch301: mozilla-thunderbird-enigmail-package.patch
78 Patch304: mozilla-thunderbird-run-mozilla.patch
79 # OpenSuse patches (Patch400+)
80 Patch400: thunderbird-appname.patch
81
82 BuildRequires: autoconf2.1
83 BuildRequires: cairo-devel >= 1.8.8
84 Requires: %{mklibname sqlite3_ 0} >= %{sqlite3_version}
85 BuildRequires: sqlite3-devel >= 3.7.5
86 Requires: %{nss_libname} >= 2:%{nss_version}
87 BuildRequires: yasm
88 BuildRequires: mesagl-devel
89 BuildRequires: gtk2-devel
90 BuildRequires: gzip
91 BuildRequires: python-devel
92 BuildRequires: libjpeg-devel
93 #(tpg) older versions doesn't support apng extension
94 # disabled because we use bundled libpng
95 #BuildRequires: libpng-devel >= 2:1.4
96 BuildRequires: nspr-devel >= 2:4.8.8
97 BuildRequires: nss-static-devel >= 2:3.12.10
98 BuildRequires: unzip
99 BuildRequires: zip
100 BuildRequires: zlib-devel
101 BuildRequires: libIDL-devel
102 # Needed by xmlterm (not built) and unused enigmail scripts
103 #BuildRequires: tcsh
104 BuildRequires: freetype2-devel
105 BuildRequires: xft2-devel
106 BuildRequires: libxt-devel
107 BuildRequires: hunspell-devel
108 BuildRequires: dbus-glib-devel
109 Requires(post): mktemp
110 Requires(post): rpm-helper
111 Requires(postun): rpm-helper
112 Suggests: %{_lib}canberra0
113 # Integrates thunderbird with xdg-utils.
114 Requires: xdg-utils
115 %if %{official_branding}
116 BuildRequires: imagemagick
117 %endif
118 # Thunderbird 3 requires alsa
119 BuildRequires: libalsa-devel
120 BuildRequires: python
121 BuildRequires: libnotify-devel
122 BuildRequires: startup-notification-devel
123 BuildRequires: libiw-devel
124 BuildRequires: libevent-devel >= 1.4.7
125 BuildRequires: libvpx-devel >= 0.9.7
126
127 %description
128 %{title} is a full-featured email, RSS and newsgroup client that
129 makes emailing safer, faster and easier than ever before.
130
131 #===============================================================================
132
133 %package enigmail
134 Summary: Access the authentication and encryption features provided by GnuPG
135 Group: Networking/Mail
136 Requires: %{name} = %{version}
137 Obsoletes: %{name}-enigmime
138 Provides: %{name}-enigmime = %{version}
139 Requires: gnupg
140 Requires(post): %{name} = %{version}
141 Requires(preun): %{name} = %{version}
142 Requires(post): mktemp
143 Requires(postun): mktemp
144 Suggests: pinentry-gtk
145
146 %description enigmail
147 Enigmail is an extension to the mail client of %{title}
148 which allows users to access the authentication and encryption
149 features provided by GnuPG.
150
151 Main Features
152
153 * Encrypt/sign mail when sending, decrypt/authenticate received
154 mail
155 * Support for inline-PGP (RFC 2440) and PGP/MIME (RFC 3156)
156 * Per-Account based encryption and signing defaults
157 * Per-Recipient rules for automated key selection, and
158 enabling/disabling encryption and signing
159 * OpenPGP key management interface
160
161 #===============================================================================
162
163 %package -n nsinstall
164 Summary: Netscape portable install command
165 Group: Development/Other
166
167 %description -n nsinstall
168 Netscape portable install command.
169
170 #===============================================================================
171 # enigmail-l10n
172 # Supported l10n language lists
173 %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
174
175 # Disabled l10n languages, for any reason
176 # nl sk es_AR do not support 0.95.0 yet
177 %define disabled_l10n_langlist hu
178 # define disabled_l10n_langlist %{nil}
179
180 # Language descriptions
181 %define language_ar ar
182 %define langname_ar Arabic
183 %define language_ca ca
184 %define langname_ca Catalan
185 %define language_cs cs-CZ
186 %define langname_cs Czech
187 %define language_de de
188 %define langname_de German
189 %define language_el el
190 %define langname_el Greek
191 %define language_es_AR es-AR
192 %define langname_es_AR Spanish (Argentina)
193 %define language_es es-ES
194 %define langname_es Spanish
195 %define language_fi fi-FI
196 %define langname_fi Finnish
197 %define language_fr fr
198 %define langname_fr French
199 %define language_hu hu-HU
200 %define langname_hu Hungarian
201 %define language_it it-IT
202 %define langname_it Italian
203 %define language_ja ja-JP
204 %define langname_ja Japanese
205 %define language_ko ko-KR
206 %define langname_ko Korean
207 %define language_nb nb-NO
208 %define langname_nb Norwegian Bokmaal
209 %define langname_nl Dutch
210 %define language_nl nl
211 %define language_pl pl
212 %define langname_pl Polish
213 %define langname_pt Portuguese
214 %define language_pt pt-PT
215 %define language_pt_BR pt-BR
216 %define langname_pt_BR Brazilian portuguese
217 %define language_ro ro-RO
218 %define langname_ro Romanian
219 %define language_ru ru-RU
220 %define langname_ru Russian
221 %define language_sk sk
222 %define langname_sk Slovak
223 %define language_sl sl-SI
224 %define langname_sl Slovenian
225 %define language_sv sv-SE
226 %define langname_sv Swedish
227 %define language_tr tr-TR
228 %define langname_tr Turkish
229 %define language_vi vi-VN
230 %define langname_vi Vietnamese
231 %define language_zh_CN zh-CN
232 %define langname_zh_CN Simplified Chinese
233 %define language_zh_TW zh-TW
234 %define langname_zh_TW Traditional Chinese
235
236 # --- Danger line ---
237
238 # All langs
239 %{expand:%%define langlist %(for lang in %l10n_langlist; do echo "$lang"; done | sort -u | sed ':a;$!N;s/\n/ /;ta')}
240
241 # Defaults (all languages enabled by default)
242 # l10n
243 %{expand:%(for lang in %l10n_langlist; do echo "%%define l10n_$lang 1"; done)}
244 %{expand:%(for lang in %disabled_l10n_langlist; do echo "%%define l10n_$lang 0"; done)}
245
246 # Params
247 %{expand:%(for lang in %langlist; do echo "%%bcond_without $lang"; done)}
248
249 # Locales
250 %{expand:%(for lang in %l10n_langlist; do echo "%%define locale_$lang `echo $lang | cut -d _ -f 1` "; done)}
251
252 # Expand all languages packages.
253 %{expand:%(\
254 for lang in %langlist; do\
255 echo "%%{expand:%%(sed "s!__LANG__!$lang!g" %{_sourcedir}/mozilla-thunderbird-enigmail-l10n-template.in 2> /dev/null)}";\
256 done\
257 )
258 }
259 #===============================================================================
260
261 %prep
262 %setup -q -c -n %{name}-%{version}
263
264 #===================
265 # Thunderbird itself
266 %setup -q -T -D -n %{name}-%{version}/%{release_dir}
267
268 %patch2 -p0
269
270 %patch100 -p2 -b .libcanberra
271
272 %patch201 -p0 -b .default_mailer
273 %patch300 -p0 -b .progname
274 %patch301 -p1 -b .enigmailpackage
275 %patch304 -p0 -b .run-mozilla
276
277 %patch400 -p1 -b .appname
278
279 #===============================================================================
280 # Enigmail
281 %setup -q -T -D -n %{name}-%{version}/%{release_dir}/mozilla/extensions -a300
282
283 %if !%{official_branding}
284 %setup -q -T -D -n %{name}-%{version}/%{release_dir} -a302
285 %endif
286
287 %setup -q -T -D -n %{name}-%{version}/%{release_dir}
288
289 #===============================================================================
290
291 %build
292 export BUILD_OFFICIAL=1
293 export MOZILLA_OFFICIAL=1
294
295 CFLAGS=$(echo %optflags | %{__sed} -e 's/-fexceptions//')
296 CFLAGS="$CFLAGS -fno-strict-aliasing -fpermissive"
297 CXXFLAGS="$CFLAGS"
298 RPM_OPT_FLAGS="$CFLAGS"
299 LDFLAGS="%ldflags"
300 export CFLAGS
301 export CXXFLAGS
302 export RPM_OPT_FLAGS
303 export LDFLAGS
304
305 export MOZCONFIG=`pwd`/.mozconfig
306 cat > $MOZCONFIG << EOF
307 mk_add_options MOZILLA_OFFICIAL=1
308 mk_add_options BUILD_OFFICIAL=1
309 mk_add_options MOZ_MAKE_FLAGS="%{_smp_mflags}"
310 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@
311 ac_add_options --prefix="%{_prefix}"
312 ac_add_options --libdir="%{_libdir}"
313 ac_add_options --sysconfdir="%{_sysconfdir}"
314 ac_add_options --mandir="%{_mandir}"
315 ac_add_options --includedir="%{_includedir}"
316 ac_add_options --datadir="%{_datadir}"
317 ac_add_options --enable-application=mail
318 ac_add_options --with-system-nspr
319 ac_add_options --with-system-nss
320 ac_add_options --with-system-jpeg
321 ac_add_options --with-system-zlib
322 ac_add_options --without-system-png
323 ac_add_options --with-system-bz2
324 ac_add_options --enable-system-sqlite
325 ac_add_options --enable-system-hunspell
326 ac_add_options --enable-system-cairo
327 ac_add_options --with-pthreads
328 ac_add_options --disable-tests
329 ac_add_options --disable-debug
330 ac_add_options --disable-installer
331 ac_add_options --disable-updater
332 ac_add_options --enable-xinerama
333 ac_add_options --disable-crashreporter
334 ac_add_options --enable-default-toolkit=cairo-gtk2
335 ac_add_options --disable-xprint
336 ac_add_options --disable-strip
337 ac_add_options --enable-pango
338 ac_add_options --enable-startup-notification
339 ac_add_options --enable-svg
340 ac_add_options --enable-canvas
341 ac_add_options --enable-crypto
342 ac_add_options --enable-mathml
343 ac_add_options --disable-gnomevfs
344 ac_add_options --enable-gio
345 ac_add_options --disable-calendar
346 ac_add_options --with-system-libevent
347 ac_add_options --with-system-libvpx
348 ac_add_options --enable-optimize
349 ac_add_options --enable-official-branding
350 ac_add_options --with-distribution-id=org.mageia
351 EOF
352
353 # Fix ABI for thunderbird and enigmail
354 %{__perl} -pi -e 's|^TARGET_XPCOM_ABI =.*|TARGET_XPCOM_ABI = %{tbarch}-gcc3|' config/autoconf.mk.in
355 %{__perl} -pi -e 's|^ENIG_XPCOM_ABI =.*|ENIG_XPCOM_ABI = Linux_%{tbarch}-gcc3|' mozilla/extensions/enigmail/Makefile.in
356
357 # Compress jars
358 %{__perl} -pi -e 's|\-0|\-9|g' config/make-jars.pl
359
360 %make -f client.mk build
361
362 #===============================================================================
363
364 pushd mozilla/extensions/enigmail
365
366 for i in `find . -type f -name Makefile.in`; do
367 if [ -f $i.bak ]; then
368 cp $i.bak $i
369 else
370 %{__cp} $i $i.bak
371 fi
372 # %{__perl} -pi -e 's|^(DEPTH.*= )../|\1|;' $i
373 done
374
375 ./makemake -r
376 %{make} LOCAL_INCLUDES+="-I\$(DEPTH)/mailnews/mime/src -I../build -I../src -I../ipc/src"
377
378 (cd lang
379 %{__perl} -pi -e 's|es-AR/enigmail.properties|es-ES/enigmail.properties|' jar.mn
380 echo 'zh-TW' >> current-languages.txt
381 %{make} LOCAL_INCLUDES+="-I\$(DEPTH)/mailnews/mime/src -I../build -I../src -I../ipc/src"
382 for i in `cat current-languages.txt`; do
383 ./make-lang.sh $i %{enigmail_short_version}
384 done
385 )
386
387 %{make} xpi
388
389 popd
390
391 #===============================================================================
392
393 %install
394 %{__rm} -rf %{buildroot}
395 %{__mkdir_p} %{buildroot}{%{_libdir},%{_bindir},%{_datadir}/applications}
396 %{__mkdir_p} %buildroot%tbdir
397
398 rm -f extensions/spellcheck/locales/en-US/hunspell/en-US.{dic,aff}
399
400 %makeinstall_std
401
402 rm -rf %buildroot%tbdir/dictionaries
403 ln -s /usr/share/dict/mozilla %buildroot%tbdir/dictionaries
404
405 %if %{official_branding}
406 %{__install} -p -D %{buildroot}/%{tbdir}/chrome/icons/default/default256.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
407 %else
408 %{__install} -p -D %{SOURCE302} %{buildroot}%{_datadir}/pixmaps/%{name}.png
409 %endif
410
411 cat << EOF > %{buildroot}/%{_datadir}/applications/%_real_vendor-%{name}.desktop
412 [Desktop Entry]
413 Version=1.0
414 Name=%{title}
415 GenericName=Mail/News
416 Comment=Mail and News Client
417 Exec=%{name}
418 Icon=mozilla-thunderbird
419 Terminal=false
420 Type=Application
421 StartupWMClass=Thunderbird-bin
422 MimeType=message/rfc822;x-scheme-handler/mailto;
423 Categories=GTK;Network;News;Email;X-MandrivaLinux-CrossDesktop;
424 EOF
425
426 # set up the thunderbird start script
427 (cd %{buildroot}%{_bindir} && %{__ln_s} thunderbird %{name})
428
429 %{__perl} -pi -e 's|^moz_libdir=.*|moz_libdir=%{tbdir}|' %{buildroot}/%{_bindir}/thunderbird
430 %{__perl} -pi -e 's|^MRE_HOME=.*|MRE_HOME=%{tbdir}|' %{buildroot}/%{_bindir}/thunderbird
431
432 # <mrl> 200800 is safe here.
433 # For backwards compatibility with old profiles. Bug #37528
434 %{__install} -m 755 %{SOURCE31} %{buildroot}/%{tbdir}/open-browser.sh
435 # For new profiles
436 %define COMMAND /usr/bin/xdg-open
437
438 #used for matching system locale on startup
439 %{__cat} %{SOURCE12} | %{__perl} -p -e 's,THUNDERBIRD_RPM_VR,%{version}-%{release},g;' \
440 -e 's,THUNDERBIRD_VENDOR_COMMENT,%{product_release},g;' \
441 -e 's,COMMAND,%{COMMAND},g' \
442 > %{buildroot}/mga-default-prefs
443 %{__cp} -a %{buildroot}/mga-default-prefs %{buildroot}%{tbdir}/defaults/pref/all-mageia.js
444 %{__rm} -f %{buildroot}/mga-default-prefs
445
446 #===============================================================================
447
448 # icons
449 %{__mkdir_p} %{buildroot}{%{_liconsdir},%{_iconsdir},%{_miconsdir}}
450 %if %{official_branding}
451 %{__mkdir_p} %{buildroot}%{_datadir}/icons/hicolor/{16x16,22x22,24x24,32x32,48x48,256x256}/apps
452 %{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default48.png %{buildroot}%{_liconsdir}/%{name}.png
453 %{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default32.png %{buildroot}%{_iconsdir}/%{name}.png
454 %{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default16.png %{buildroot}%{_miconsdir}/%{name}.png
455 %{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
456 %{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default22.png %{buildroot}%{_datadir}/icons/hicolor/22x22/apps/%{name}.png
457 %{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default24.png %{buildroot}%{_datadir}/icons/hicolor/24x24/apps/%{name}.png
458 %{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
459 %{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
460 %{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default256.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
461 %else
462 #%{__mkdir_p} %{buildroot}%{_datadir}/icons/hicolor/{64x64,128x128}/apps
463 %{__mkdir_p} %{buildroot}%{_datadir}/icons/hicolor/{16x16,22x22,24x24,32x32,48x48,256x256}/apps
464 %{__install} -m 644 %{name}-48.png %{buildroot}%{_liconsdir}/%{name}.png
465 %{__install} -m 644 %{name}-32.png %{buildroot}%{_iconsdir}/%{name}.png
466 %{__install} -m 644 %{name}-16.png %{buildroot}%{_miconsdir}/%{name}.png
467 # Converting up, but not a big issue now that we have official branding
468 %{__install} -m 644 %{name}-16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
469 %{__install} -m 644 %{name}-22.png %{buildroot}%{_datadir}/icons/hicolor/22x22/apps/%{name}.png
470 %{__install} -m 644 %{name}-24.png %{buildroot}%{_datadir}/icons/hicolor/24x24/apps/%{name}.png
471 %{__install} -m 644 %{name}-32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
472 %{__install} -m 644 %{name}-48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
473 %{__install} -m 644 %{name}-256.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
474 %endif
475
476 #===============================================================================
477
478 %{__mkdir_p} %{buildroot}%{tbextdir}/%{enigmail_id}
479 %if !%{xpi}
480 %{_bindir}/unzip -q mozilla/dist/bin/enigmail-%{enigmail_short_version}*.xpi -d %{buildroot}%{tbextdir}/%{enigmail_id}
481 %{__chmod} 644 %{buildroot}%{tbextdir}/%{enigmail_id}/chrome.manifest
482 # as we rename libipc.so & libenigmime.so and don't install them into %%{tbdir}
483 # we need to remove them from %%{tbdir}/components/binary.manifest
484 # otherwise thunderbird will try to load them, which will fail
485 sed -i 's,binary-component libipc.so,,' %{buildroot}%{tbdir}/components/binary.manifest
486 sed -i 's,binary-component libenigmime.so,,' %{buildroot}%{tbdir}/components/binary.manifest
487 %else
488 %{__cp} -aL mozilla/dist/bin/enigmail-%{enigmail_short_version}*.xpi %{buildroot}%{tbextdir}/%{enigmail_id}/%{enigmail_id}.xpi
489 %endif
490
491 #==============================================================================
492 #enigmail lang package
493 # Convert rpm macros to bash variables
494 %{expand:%(for lang in %langlist; do echo "language_$lang=%%{language_$lang}"; done)}
495 %{expand:%(for lang in %langlist; do echo "with_$lang=%%{with $lang}"; done)}
496 %{expand:%(for lang in %l10n_langlist; do echo "l10n_$lang=%%{l10n_$lang}"; done)}
497 pushd mozilla/extensions/enigmail/lang
498 for lang in %langlist; do
499 %{__mkdir_p} %{buildroot}%{_datadir}/mozilla/extensions/%{tb_appid}/enigmail-$lang@enigmail.mozdev.org
500 language="language_$lang"
501 language=${!language}
502 %{_bindir}/unzip -q enigmail-${language}-%{enigmail_short_version}.xpi -d %{buildroot}%{_datadir}/mozilla/extensions/%{tb_appid}/enigmail-$lang@enigmail.mozdev.org/
503 done
504 popd
505
506 #===============================================================================
507
508 %{__cp} -aL mozilla/dist/bin/nsinstall %{buildroot}%{_bindir}
509
510 #===============================================================================
511 #exclude devel files
512 %{__rm} -rf %{buildroot}%{_datadir}/idl/%{oname}-%{version}
513 %{__rm} -rf %{buildroot}%{_includedir}/%{oname}-%{version}
514 %{__rm} -rf %{buildroot}%{_libdir}/%{oname}-devel-%{version}
515
516 %clean
517 %{__rm} -rf %{buildroot}
518
519 #===============================================================================
520
521 %pre
522 if [ $1 == 2 ]; then
523 if [ -d %{tbdir}/dictionaries ]; then
524 # Otherelse rpm can't switch this into a symlink :(
525 rm -rf %{tbdir}/dictionaries
526 fi
527 fi
528
529 %post
530
531 mktemp="/bin/mktemp -d -q -p /tmp -t %{name}.XXXXXXXXXX"
532
533 TMPDIR= TB_TMPDIR=`$mktemp` && {
534 HOME="$TB_TMPDIR" LD_LIBRARY_PATH="%{tbdir}" %{tbdir}/thunderbird-bin -nox -register
535 test -d "$TB_TMPDIR" && %{__rm} -rf -- "$TB_TMPDIR"
536 }
537
538
539 #===============================================================================
540
541 %post enigmail
542 if [ -f %{tbdir}/components/compreg.dat ]; then
543 %{__rm} -f %{tbdir}/components/compreg.dat
544 fi
545
546 if [ -f %{tbdir}/components/xpti.dat ]; then
547 %{__rm} -f %{tbdir}/components/xpti.dat
548 fi
549
550 mktemp="/bin/mktemp -d -q -p /tmp -t %{name}.XXXXXXXXXX"
551
552 TMPDIR= TB_TMPDIR=`$mktemp` && {
553 %if %{xpi}
554 HOME="$TB_TMPDIR" LD_LIBRARY_PATH="%{tbdir}" %{tbdir}/thunderbird-bin -nox -install-global-extension %{tbextdir}/enigmail-%{enigmail_version}-linux-*.xpi
555 %endif
556 HOME="$TB_TMPDIR" LD_LIBRARY_PATH="%{tbdir}" %{tbdir}/thunderbird-bin -nox -register
557 test -d "$TB_TMPDIR" && %{__rm} -rf -- "$TB_TMPDIR"
558 }
559
560 %preun enigmail
561 if [ -f %{tbdir}/components/compreg.dat ]; then
562 %{__rm} -f %{tbdir}/components/compreg.dat
563 fi
564
565 if [ -f %{tbdir}/components/xpti.dat ]; then
566 %{__rm} -f %{tbdir}/components/xpti.dat
567 fi
568
569 if [ -x %{tbdir}/thunderbird-bin ]; then
570 mktemp="/bin/mktemp -d -q -p /tmp -t %{name}.XXXXXXXXXX"
571
572 TMPDIR= TB_TMPDIR=`$mktemp` && {
573 %if %{xpi}
574 HOME="$TB_TMPDIR" LD_LIBRARY_PATH="%{tbdir}" %{tbdir}/thunderbird-bin -nox -install-global-extension %{tbextdir}/enigmail-%{enigmail_version}-linux-*.xpi
575 %endif
576 HOME="$TB_TMPDIR" LD_LIBRARY_PATH="%{tbdir}" %{tbdir}/thunderbird-bin -nox -register
577 test -d "$TB_TMPDIR" && %{__rm} -rf -- "$TB_TMPDIR"
578 }
579 fi
580
581 #===============================================================================
582
583 %files
584 %defattr(-,root,root,-)
585 %doc mozilla/LEGAL
586 %attr(755,root,root) %{_bindir}/mozilla-thunderbird
587 %attr(755,root,root) %{_bindir}/thunderbird
588 %attr(644,root,root) %{_datadir}/applications/*.desktop
589 %attr(644,root,root) %{_datadir}/pixmaps/%{name}.png
590 %{tbdir}
591 %if %{xpi}
592 %dir %{tbextdir}
593 %endif
594 # Mandriva menu
595 %{_miconsdir}/%{name}.png
596 %{_iconsdir}/%{name}.png
597 %{_liconsdir}/%{name}.png
598 # other icons
599 %if %{official_branding}
600 %{_datadir}/icons/hicolor/16x16/apps/%{name}.png
601 %{_datadir}/icons/hicolor/22x22/apps/%{name}.png
602 %{_datadir}/icons/hicolor/24x24/apps/%{name}.png
603 %{_datadir}/icons/hicolor/32x32/apps/%{name}.png
604 %{_datadir}/icons/hicolor/48x48/apps/%{name}.png
605 %{_datadir}/icons/hicolor/256x256/apps/%{name}.png
606 %else
607 %{_datadir}/icons/hicolor/16x16/apps/%{name}.png
608 %{_datadir}/icons/hicolor/22x22/apps/%{name}.png
609 %{_datadir}/icons/hicolor/24x24/apps/%{name}.png
610 %{_datadir}/icons/hicolor/32x32/apps/%{name}.png
611 %{_datadir}/icons/hicolor/48x48/apps/%{name}.png
612 %{_datadir}/icons/hicolor/256x256/apps/%{name}.png
613 %endif
614 %exclude %{tbextdir}/%{enigmail_id}
615
616 %files enigmail
617 %defattr(-,root,root)
618 %{tbextdir}/%{enigmail_id}
619
620 %files -n nsinstall
621 %defattr(-,root,root)
622 %{_bindir}/nsinstall

  ViewVC Help
Powered by ViewVC 1.1.28