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