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