1 |
%define official_branding 1 |
2 |
|
3 |
%define upstream_version %{version}esr |
4 |
%define release_dir comm-esr10 |
5 |
|
6 |
%if %{official_branding} |
7 |
%define title Mozilla Thunderbird |
8 |
%else |
9 |
%define title Mail/News |
10 |
%endif |
11 |
|
12 |
%define oname thunderbird |
13 |
%define tb_appid \{3550f703-e582-4d05-9a08-453d09bdfdc6\} |
14 |
%define tbdir %{_libdir}/%{oname}-%{version} |
15 |
%define tbextdir %{_libdir}/mozilla/extensions/%{tb_appid} |
16 |
|
17 |
%define xpi 0 |
18 |
%define enigmail_version 1.3.5 |
19 |
%define enigmail_short_version 1.4 |
20 |
%define enigmail_id \{847b3a00-7ab1-11d4-8f02-006008948af5\} |
21 |
|
22 |
%define _provides_exceptions libgtkembedmoz.so\\|libxpcom.so |
23 |
%define _requires_exceptions libgtkembedmoz.so\\|libxpcom.so\\|libxul.so |
24 |
|
25 |
# this seems fragile, so require the exact version or later (#58754) |
26 |
%define sqlite3_version %(pkg-config --modversion sqlite3 &>/dev/null && pkg-config --modversion sqlite3 2>/dev/null || echo 0) |
27 |
# this one as well (#59759) |
28 |
%define nss_libname %mklibname nss 3 |
29 |
%define nss_version %(pkg-config --modversion nss &>/dev/null && pkg-config --modversion nss 2>/dev/null || echo 0) |
30 |
|
31 |
Name: thunderbird |
32 |
Epoch: 0 |
33 |
Version: 10.0.2 |
34 |
Release: %mkrel 4 |
35 |
Summary: Full-featured email, RSS, and newsgroup client |
36 |
License: MPL |
37 |
Group: Networking/Mail |
38 |
URL: http://www.mozilla.org/en-US/thunderbird/organizations/all-esr.html |
39 |
Source0: ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/%{upstream_version}/source/thunderbird-%{upstream_version}.source.tar.bz2 |
40 |
Source12: mozilla-thunderbird-mageia-default-prefs.js |
41 |
# Mandriva sources (Source300+) |
42 |
Source300: http://www.mozilla-enigmail.org/download/source/enigmail-%{enigmail_version}.tar.gz |
43 |
Source301: http://www.mozilla-enigmail.org/download/source/enigmail-%{enigmail_version}.tar.gz.asc |
44 |
Source302: %{name}-icons.tar.bz2 |
45 |
Source303: thunderbird.desktop |
46 |
# Build patches |
47 |
Patch2: mozilla-firefox-1.0-prdtoa.patch |
48 |
# Mageia patches (patch100+) |
49 |
# use libcanberra to play sounds rather than deprecated esound |
50 |
# taken from upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=635918 |
51 |
Patch100: mozilla-thunderbird-mga-use-libcanberra.patch |
52 |
# Debian patches (Patch200+) |
53 |
Patch201: mozilla-thunderbird-5.0-mga-default-mailer.patch |
54 |
# Mandriva patches (Patch300+) |
55 |
Patch300: mozilla-thunderbird-0.8-progname.patch |
56 |
Patch301: mozilla-thunderbird-enigmail-package.patch |
57 |
Patch304: mozilla-thunderbird-run-mozilla.patch |
58 |
# OpenSuse patches (Patch400+) |
59 |
Patch400: thunderbird-appname.patch |
60 |
BuildRequires: autoconf2.1 |
61 |
BuildRequires: cairo-devel >= 1.8.8 |
62 |
Requires: %{mklibname sqlite3_ 0} >= %{sqlite3_version} |
63 |
BuildRequires: sqlite3-devel >= 3.7.5 |
64 |
Requires: %{nss_libname} >= 2:%{nss_version} |
65 |
BuildRequires: yasm |
66 |
BuildRequires: mesagl-devel |
67 |
BuildRequires: gtk2-devel |
68 |
BuildRequires: gzip |
69 |
BuildRequires: python-devel |
70 |
BuildRequires: libjpeg-devel |
71 |
#(tpg) older versions doesn't support apng extension |
72 |
BuildRequires: libpng-devel >= 2:1.4 |
73 |
BuildRequires: nspr-devel >= 2:4.8.8 |
74 |
BuildRequires: nss-static-devel >= 2:3.12.10 |
75 |
BuildRequires: unzip |
76 |
BuildRequires: zip |
77 |
BuildRequires: zlib-devel |
78 |
BuildRequires: libIDL-devel |
79 |
BuildRequires: freetype2-devel |
80 |
BuildRequires: pkgconfig(xft) |
81 |
BuildRequires: libxt-devel |
82 |
BuildRequires: hunspell-devel |
83 |
BuildRequires: dbus-glib-devel |
84 |
Requires(post): mktemp |
85 |
Requires(post): rpm-helper |
86 |
Requires(postun): rpm-helper |
87 |
# Integrates thunderbird with xdg-utils. |
88 |
Requires: xdg-utils |
89 |
%if %{official_branding} |
90 |
BuildRequires: imagemagick |
91 |
%endif |
92 |
# Thunderbird 3 requires alsa |
93 |
BuildRequires: libalsa-devel |
94 |
BuildRequires: python |
95 |
BuildRequires: libnotify-devel |
96 |
BuildRequires: startup-notification-devel |
97 |
BuildRequires: libiw-devel |
98 |
BuildRequires: libevent-devel >= 1.4.7 |
99 |
BuildRequires: libvpx-devel >= 0.9.7 |
100 |
Suggests: %{_lib}canberra0 |
101 |
Suggests: %{_lib}cups2 |
102 |
Obsoletes: mozilla-thunderbird < %{epoch}:%{version}-%{release} |
103 |
Provides: mozilla-thunderbird = %{epoch}:%{version}-%{release} |
104 |
|
105 |
%description |
106 |
%{title} is a full-featured email, RSS and newsgroup client that |
107 |
makes emailing safer, faster and easier than ever before. |
108 |
|
109 |
#=============================================================================== |
110 |
#enigmail |
111 |
|
112 |
# Supported l10n language lists |
113 |
%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 |
114 |
|
115 |
# Disabled l10n languages, for any reason |
116 |
# nl sk es_AR do not support 0.95.0 yet |
117 |
%define disabled_l10n_langlist hu |
118 |
# global disabled_l10n_langlist %{nil} |
119 |
|
120 |
# Language descriptions |
121 |
%define language_ar ar |
122 |
%define language_ca ca |
123 |
%define language_cs cs-CZ |
124 |
%define language_de de |
125 |
%define language_el el |
126 |
%define language_es_AR es-AR |
127 |
%define language_es es-ES |
128 |
%define language_fi fi-FI |
129 |
%define language_fr fr |
130 |
%define language_hu hu-HU |
131 |
%define language_it it-IT |
132 |
%define langname_it Italian |
133 |
%define language_ja ja-JP |
134 |
%define language_ko ko-KR |
135 |
%define language_nb nb-NO |
136 |
%define language_nl nl |
137 |
%define language_pl pl |
138 |
%define language_pt pt-PT |
139 |
%define language_pt_BR pt-BR |
140 |
%define language_ro ro-RO |
141 |
%define language_ru ru-RU |
142 |
%define language_sk sk |
143 |
%define language_sl sl-SI |
144 |
%define language_sv sv-SE |
145 |
%define language_tr tr-TR |
146 |
%define language_vi vi-VN |
147 |
%define language_zh_CN zh-CN |
148 |
%define language_zh_TW zh-TW |
149 |
|
150 |
# --- Danger line --- |
151 |
|
152 |
# All langs |
153 |
%{expand:%%global langlist %(for lang in %l10n_langlist; do echo "$lang"; done | sort -u | sed ':a;$!N;s/\n/ /;ta')} |
154 |
|
155 |
# Defaults (all languages enabled by default) |
156 |
# l10n |
157 |
%{expand:%(for lang in %l10n_langlist; do echo "%%define l10n_$lang 1"; done)} |
158 |
%{expand:%(for lang in %disabled_l10n_langlist; do echo "%%define l10n_$lang 0"; done)} |
159 |
|
160 |
# Params |
161 |
%{expand:%(for lang in %langlist; do echo "%%bcond_without $lang"; done)} |
162 |
|
163 |
%package enigmail |
164 |
Summary: Access the authentication and encryption features provided by GnuPG |
165 |
Group: Networking/Mail |
166 |
Requires: %{name} = %{epoch}:%{version} |
167 |
Obsoletes: %{name}-enigmime < %{epoch}:%{version}-%{release} |
168 |
Provides: %{name}-enigmime = %{epoch}:%{version}-%{release} |
169 |
Obsoletes: mozilla-thunderbird-enigmime < %{epoch}:%{version}-%{release} |
170 |
Obsoletes: mozilla-thunderbird-enigmail < %{epoch}:%{version}-%{release} |
171 |
Provides: mozilla-thunderbird-enigmime = %{epoch}:%{version}-%{release} |
172 |
Provides: mozilla-thunderbird-enigmail = %{epoch}:%{version}-%{release} |
173 |
Requires: gnupg |
174 |
Requires(post): %{name} = %{epoch}:%{version} |
175 |
Requires(preun): %{name} = %{epoch}:%{version} |
176 |
Requires(post): mktemp |
177 |
Requires(postun): mktemp |
178 |
Suggests: pinentry-gtk |
179 |
%(for lang in %l10n_langlist %disabled_l10n_langlist; do |
180 |
echo "Obsoletes: thunderbird-enigmail-$lang < 0:10.0.2" |
181 |
echo "Obsoletes: mozilla-thunderbird-enigmail-$lang < %{epoch}:%{version}-%{release}" |
182 |
echo "Obsoletes: mozilla-thunderbird-enigmail-l10n-$lang < %{epoch}:%{version}-%{release}" |
183 |
done) |
184 |
|
185 |
%description enigmail |
186 |
Enigmail is an extension to the mail client of %{title} |
187 |
which allows users to access the authentication and encryption |
188 |
features provided by GnuPG. |
189 |
|
190 |
Main Features |
191 |
|
192 |
* Encrypt/sign mail when sending, decrypt/authenticate received |
193 |
mail |
194 |
* Support for inline-PGP (RFC 2440) and PGP/MIME (RFC 3156) |
195 |
* Per-Account based encryption and signing defaults |
196 |
* Per-Recipient rules for automated key selection, and |
197 |
enabling/disabling encryption and signing |
198 |
* OpenPGP key management interface |
199 |
|
200 |
#=============================================================================== |
201 |
|
202 |
%package -n nsinstall |
203 |
Summary: Netscape portable install command |
204 |
Group: Development/Other |
205 |
|
206 |
%description -n nsinstall |
207 |
Netscape portable install command. |
208 |
|
209 |
#=============================================================================== |
210 |
|
211 |
|
212 |
%prep |
213 |
%setup -q -c -n %{name}-%{version} |
214 |
|
215 |
#=================== |
216 |
# Thunderbird itself |
217 |
%setup -q -T -D -n %{name}-%{version}/%{release_dir} |
218 |
%patch2 -p0 |
219 |
|
220 |
%patch100 -p2 -b .libcanberra |
221 |
|
222 |
%patch201 -p0 -b .default_mailer |
223 |
%patch300 -p0 -b .progname |
224 |
%patch301 -p1 -b .enigmailpackage |
225 |
%patch304 -p0 -b .run-mozilla |
226 |
|
227 |
%patch400 -p1 -b .appname |
228 |
|
229 |
#=============================================================================== |
230 |
# Enigmail |
231 |
%setup -q -T -D -n %{name}-%{version}/%{release_dir}/mozilla/extensions -a300 |
232 |
|
233 |
%if !%{official_branding} |
234 |
%setup -q -T -D -n %{name}-%{version}/%{release_dir} -a302 |
235 |
%endif |
236 |
|
237 |
%setup -q -T -D -n %{name}-%{version}/%{release_dir} |
238 |
|
239 |
#=============================================================================== |
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 |
for i in `cat current-languages.txt`; do |
326 |
./make-lang.sh $i %{enigmail_short_version} |
327 |
done |
328 |
) |
329 |
|
330 |
%{make} xpi |
331 |
|
332 |
popd |
333 |
|
334 |
#=============================================================================== |
335 |
|
336 |
%install |
337 |
%{__rm} -rf %{buildroot} |
338 |
%{__mkdir_p} %{buildroot}{%{_libdir},%{_bindir},%{_datadir}/applications} |
339 |
%{__mkdir_p} %buildroot%tbdir |
340 |
|
341 |
rm -f extensions/spellcheck/locales/en-US/hunspell/en-US.{dic,aff} |
342 |
|
343 |
%makeinstall_std |
344 |
|
345 |
rm -rf %buildroot%tbdir/dictionaries |
346 |
ln -s %{_datadir}/hunspell %buildroot%tbdir/dictionaries |
347 |
|
348 |
|
349 |
%if %{official_branding} |
350 |
%{__install} -p -D %{buildroot}/%{tbdir}/chrome/icons/default/default256.png %{buildroot}%{_datadir}/pixmaps/%{name}.png |
351 |
%else |
352 |
%{__install} -p -D %{SOURCE302} %{buildroot}%{_datadir}/pixmaps/%{name}.png |
353 |
%endif |
354 |
|
355 |
%{__install} -p -D %{SOURCE303} %{buildroot}/%{_datadir}/applications/%{name}.desktop |
356 |
|
357 |
%{__perl} -pi -e 's|^moz_libdir=.*|moz_libdir=%{tbdir}|' %{buildroot}%{_bindir}/thunderbird |
358 |
%{__perl} -pi -e 's|^MRE_HOME=.*|MRE_HOME=%{tbdir}|' %{buildroot}%{_bindir}/thunderbird |
359 |
|
360 |
#used for matching system locale on startup |
361 |
%{__cat} %{SOURCE12} | %{__perl} -p -e 's,THUNDERBIRD_RPM_VR,%{version}-%{release},g;' \ |
362 |
-e 's,THUNDERBIRD_VENDOR_COMMENT,%{product_release},g;' \ |
363 |
> %{buildroot}%{tbdir}/defaults/pref/all-mageia.js |
364 |
|
365 |
#=============================================================================== |
366 |
|
367 |
# icons |
368 |
%{__mkdir_p} %{buildroot}{%{_liconsdir},%{_iconsdir},%{_miconsdir}} |
369 |
%if %{official_branding} |
370 |
%{__mkdir_p} %{buildroot}%{_datadir}/icons/hicolor/{16x16,22x22,24x24,32x32,48x48,256x256}/apps |
371 |
%{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default48.png %{buildroot}%{_liconsdir}/%{name}.png |
372 |
%{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default32.png %{buildroot}%{_iconsdir}/%{name}.png |
373 |
%{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default16.png %{buildroot}%{_miconsdir}/%{name}.png |
374 |
%{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/%{name}.png |
375 |
%{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default22.png %{buildroot}%{_datadir}/icons/hicolor/22x22/apps/%{name}.png |
376 |
%{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default24.png %{buildroot}%{_datadir}/icons/hicolor/24x24/apps/%{name}.png |
377 |
%{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}.png |
378 |
%{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png |
379 |
%{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default256.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{name}.png |
380 |
%else |
381 |
#%{__mkdir_p} %{buildroot}%{_datadir}/icons/hicolor/{64x64,128x128}/apps |
382 |
%{__mkdir_p} %{buildroot}%{_datadir}/icons/hicolor/{16x16,22x22,24x24,32x32,48x48,256x256}/apps |
383 |
%{__install} -m 644 %{name}-48.png %{buildroot}%{_liconsdir}/%{name}.png |
384 |
%{__install} -m 644 %{name}-32.png %{buildroot}%{_iconsdir}/%{name}.png |
385 |
%{__install} -m 644 %{name}-16.png %{buildroot}%{_miconsdir}/%{name}.png |
386 |
# Converting up, but not a big issue now that we have official branding |
387 |
%{__install} -m 644 %{name}-16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/%{name}.png |
388 |
%{__install} -m 644 %{name}-22.png %{buildroot}%{_datadir}/icons/hicolor/22x22/apps/%{name}.png |
389 |
%{__install} -m 644 %{name}-24.png %{buildroot}%{_datadir}/icons/hicolor/24x24/apps/%{name}.png |
390 |
%{__install} -m 644 %{name}-32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}.png |
391 |
%{__install} -m 644 %{name}-48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png |
392 |
%{__install} -m 644 %{name}-256.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{name}.png |
393 |
%endif |
394 |
|
395 |
#=============================================================================== |
396 |
|
397 |
%{__mkdir_p} %{buildroot}%{tbextdir}/%{enigmail_id} |
398 |
%if !%{xpi} |
399 |
%{_bindir}/unzip -q mozilla/dist/bin/enigmail-%{enigmail_short_version}*.xpi -d %{buildroot}%{tbextdir}/%{enigmail_id} |
400 |
%{__chmod} 644 %{buildroot}%{tbextdir}/%{enigmail_id}/chrome.manifest |
401 |
# as we rename libipc.so & libenigmime.so and don't install them into %%{tbdir} |
402 |
# we need to remove them from %%{tbdir}/components/binary.manifest |
403 |
# otherwise thunderbird will try to load them, which will fail |
404 |
sed -i 's,binary-component libipc.so,,' %{buildroot}%{tbdir}/components/binary.manifest |
405 |
sed -i 's,binary-component libenigmime.so,,' %{buildroot}%{tbdir}/components/binary.manifest |
406 |
%else |
407 |
%{__cp} -aL mozilla/dist/bin/enigmail-%{enigmail_short_version}*.xpi %{buildroot}%{tbextdir}/%{enigmail_id}/%{enigmail_id}.xpi |
408 |
%endif |
409 |
|
410 |
#============================================================================== |
411 |
#enigmail lang package |
412 |
# Convert rpm macros to bash variables |
413 |
%{expand:%(for lang in %langlist; do echo "language_$lang=%%{language_$lang}"; done)} |
414 |
%{expand:%(for lang in %langlist; do echo "with_$lang=%%{with $lang}"; done)} |
415 |
%{expand:%(for lang in %l10n_langlist; do echo "l10n_$lang=%%{l10n_$lang}"; done)} |
416 |
pushd mozilla/extensions/enigmail/lang |
417 |
for lang in %langlist; do |
418 |
%{__mkdir_p} %{buildroot}%{_datadir}/mozilla/extensions/%{tb_appid}/enigmail-$lang@enigmail.mozdev.org |
419 |
language="language_$lang" |
420 |
language=${!language} |
421 |
%{_bindir}/unzip -q enigmail-${language}-%{enigmail_short_version}.xpi -d %{buildroot}%{_datadir}/mozilla/extensions/%{tb_appid}/enigmail-$lang@enigmail.mozdev.org/ |
422 |
done |
423 |
popd |
424 |
|
425 |
#=============================================================================== |
426 |
|
427 |
%{__cp} -aL mozilla/dist/bin/nsinstall %{buildroot}%{_bindir} |
428 |
|
429 |
#=============================================================================== |
430 |
|
431 |
#exclude devel files |
432 |
%{__rm} -rf %{buildroot}%{_datadir}/idl/%{oname}-%{version} |
433 |
%{__rm} -rf %{buildroot}%{_includedir}/%{oname}-%{version} |
434 |
%{__rm} -rf %{buildroot}%{_libdir}/%{oname}-devel-%{version} |
435 |
|
436 |
%clean |
437 |
%{__rm} -rf %{buildroot} |
438 |
|
439 |
#=============================================================================== |
440 |
|
441 |
%pre |
442 |
if [ $1 == 2 ]; then |
443 |
if [ -d %{tbdir}/dictionaries ]; then |
444 |
# Otherelse rpm can't switch this into a symlink :( |
445 |
rm -rf %{tbdir}/dictionaries |
446 |
fi |
447 |
fi |
448 |
|
449 |
%post |
450 |
|
451 |
mktemp="/bin/mktemp -d -q -p /tmp -t %{name}.XXXXXXXXXX" |
452 |
|
453 |
TMPDIR= TB_TMPDIR=`$mktemp` && { |
454 |
HOME="$TB_TMPDIR" LD_LIBRARY_PATH="%{tbdir}" %{tbdir}/thunderbird-bin -nox -register |
455 |
test -d "$TB_TMPDIR" && %{__rm} -rf -- "$TB_TMPDIR" |
456 |
} |
457 |
|
458 |
|
459 |
#=============================================================================== |
460 |
|
461 |
%post enigmail |
462 |
if [ -f %{tbdir}/components/compreg.dat ]; then |
463 |
%{__rm} -f %{tbdir}/components/compreg.dat |
464 |
fi |
465 |
|
466 |
if [ -f %{tbdir}/components/xpti.dat ]; then |
467 |
%{__rm} -f %{tbdir}/components/xpti.dat |
468 |
fi |
469 |
|
470 |
mktemp="/bin/mktemp -d -q -p /tmp -t %{name}.XXXXXXXXXX" |
471 |
|
472 |
TMPDIR= TB_TMPDIR=`$mktemp` && { |
473 |
%if %{xpi} |
474 |
HOME="$TB_TMPDIR" LD_LIBRARY_PATH="%{tbdir}" %{tbdir}/thunderbird-bin -nox -install-global-extension %{tbextdir}/enigmail-%{enigmail_version}-linux-*.xpi |
475 |
%endif |
476 |
HOME="$TB_TMPDIR" LD_LIBRARY_PATH="%{tbdir}" %{tbdir}/thunderbird-bin -nox -register |
477 |
test -d "$TB_TMPDIR" && %{__rm} -rf -- "$TB_TMPDIR" |
478 |
} |
479 |
|
480 |
%preun enigmail |
481 |
if [ -f %{tbdir}/components/compreg.dat ]; then |
482 |
%{__rm} -f %{tbdir}/components/compreg.dat |
483 |
fi |
484 |
|
485 |
if [ -f %{tbdir}/components/xpti.dat ]; then |
486 |
%{__rm} -f %{tbdir}/components/xpti.dat |
487 |
fi |
488 |
|
489 |
if [ -x %{tbdir}/thunderbird-bin ]; then |
490 |
mktemp="/bin/mktemp -d -q -p /tmp -t %{name}.XXXXXXXXXX" |
491 |
|
492 |
TMPDIR= TB_TMPDIR=`$mktemp` && { |
493 |
%if %{xpi} |
494 |
HOME="$TB_TMPDIR" LD_LIBRARY_PATH="%{tbdir}" %{tbdir}/thunderbird-bin -nox -install-global-extension %{tbextdir}/enigmail-%{enigmail_version}-linux-*.xpi |
495 |
%endif |
496 |
HOME="$TB_TMPDIR" LD_LIBRARY_PATH="%{tbdir}" %{tbdir}/thunderbird-bin -nox -register |
497 |
test -d "$TB_TMPDIR" && %{__rm} -rf -- "$TB_TMPDIR" |
498 |
} |
499 |
fi |
500 |
|
501 |
#=============================================================================== |
502 |
|
503 |
%files |
504 |
%defattr(-,root,root,-) |
505 |
%doc mozilla/LEGAL |
506 |
%attr(755,root,root) %{_bindir}/thunderbird |
507 |
%attr(644,root,root) %{_datadir}/applications/*.desktop |
508 |
%attr(644,root,root) %{_datadir}/pixmaps/%{name}.png |
509 |
%{tbdir} |
510 |
%if %{xpi} |
511 |
%dir %{tbextdir} |
512 |
%endif |
513 |
# Mandriva menu |
514 |
%{_miconsdir}/%{name}.png |
515 |
%{_iconsdir}/%{name}.png |
516 |
%{_liconsdir}/%{name}.png |
517 |
# other icons |
518 |
%if %{official_branding} |
519 |
%{_datadir}/icons/hicolor/16x16/apps/%{name}.png |
520 |
%{_datadir}/icons/hicolor/22x22/apps/%{name}.png |
521 |
%{_datadir}/icons/hicolor/24x24/apps/%{name}.png |
522 |
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png |
523 |
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png |
524 |
%{_datadir}/icons/hicolor/256x256/apps/%{name}.png |
525 |
%else |
526 |
%{_datadir}/icons/hicolor/16x16/apps/%{name}.png |
527 |
%{_datadir}/icons/hicolor/22x22/apps/%{name}.png |
528 |
%{_datadir}/icons/hicolor/24x24/apps/%{name}.png |
529 |
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png |
530 |
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png |
531 |
%{_datadir}/icons/hicolor/256x256/apps/%{name}.png |
532 |
%endif |
533 |
%exclude %{tbextdir}/%{enigmail_id} |
534 |
|
535 |
%files enigmail |
536 |
%defattr(-,root,root) |
537 |
%{tbextdir}/%{enigmail_id} |
538 |
%(for lang in %langlist; do |
539 |
echo "%%lang($lang) %{_datadir}/mozilla/extensions/%{tb_appid}/enigmail-$lang@enigmail.mozdev.org" |
540 |
done) |
541 |
|
542 |
%files -n nsinstall |
543 |
%defattr(-,root,root) |
544 |
%{_bindir}/nsinstall |