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

  ViewVC Help
Powered by ViewVC 1.1.28