1 |
fwang |
483803 |
%define upstream_version %{version} |
2 |
ns80 |
1085939 |
%define release_dir thunderbird-45.7.1 |
3 |
ennael |
55189 |
%define title Mozilla Thunderbird |
4 |
|
|
|
5 |
ghibo |
1058173 |
# |
6 |
|
|
# Compiler Choices |
7 |
|
|
# |
8 |
|
|
|
9 |
|
|
# Use CCache for speedup compiling (only for developing) |
10 |
|
|
%define use_ccache 0 |
11 |
|
|
%{?_with_ccache: %global use_ccache 1} |
12 |
|
|
%{?_without_ccache: %global use_ccache 0} |
13 |
|
|
|
14 |
|
|
# Enable O3 Optimization |
15 |
|
|
%define use_opt_o3 0 |
16 |
|
|
%{?_with_opt_o3: %global use_opt_o3 1} |
17 |
|
|
%{?_without_opt_o3: %global use_opt_o3 0} |
18 |
|
|
|
19 |
ennael |
55189 |
%define oname thunderbird |
20 |
|
|
%define tb_appid \{3550f703-e582-4d05-9a08-453d09bdfdc6\} |
21 |
|
|
%define tbdir %{_libdir}/%{oname}-%{version} |
22 |
|
|
%define tbextdir %{_libdir}/mozilla/extensions/%{tb_appid} |
23 |
|
|
|
24 |
doktor5000 |
918945 |
#(doktor5000) lightning definitions |
25 |
|
|
%define lightning_id \{e2fda1a4-762b-4020-b5ad-a41df1933103\} |
26 |
tmb |
1011030 |
%define lightning_version 4.7 |
27 |
doktor5000 |
918945 |
|
28 |
luigiwalser |
800416 |
#(doktor5000) this is where the actual build happens to keep compiled objects out-of-tree |
29 |
doktor5000 |
800500 |
# see https://bugzilla.mozilla.org/show_bug.cgi?id=1106883#c4 for context information |
30 |
doktor5000 |
800495 |
%define objdir objdir-tb |
31 |
luigiwalser |
800416 |
|
32 |
doktor5000 |
800495 |
# fallback using absolute path - should be used with .mozconfig |
33 |
doktor5000 |
800500 |
# see https://bugzilla.mozilla.org/show_bug.cgi?id=1106883#c4 for context information |
34 |
tmb |
1011030 |
#define objdir objdir-tb %%{_builddir}/%%{name}-%%{version}/%%{release_dir}/%%{objdir} |
35 |
doktor5000 |
800495 |
|
36 |
ennael |
55189 |
%define xpi 0 |
37 |
ns80 |
1071694 |
%define enigmail_version 1.9.6.1 |
38 |
tmb |
1011030 |
%define enigmail_short_version 1.9 |
39 |
ennael |
55189 |
%define enigmail_id \{847b3a00-7ab1-11d4-8f02-006008948af5\} |
40 |
|
|
|
41 |
tv |
677422 |
%global __provides_exclude libgtkembedmoz.so|libxpcom.so |
42 |
|
|
%global __requires_exclude libgtkembedmoz.so|libxpcom.so|libxul.so |
43 |
ennael |
55189 |
|
44 |
ghibo |
1058173 |
# Conditional Building Options |
45 |
|
|
# |
46 |
|
|
# %{with system_cairo}: use system cairo graphics library optionally |
47 |
|
|
# (default for now is to use the in-tree cairo library, which for thunderbird |
48 |
|
|
# 45.4.0 is stuck at 1.9.5. Compiling with system cairo instead of the |
49 |
|
|
# in-tree one seems to produce an executable which is subject to sporadic |
50 |
|
|
# crashes. Note that this affects also the PDF engine used by Thunderbird |
51 |
|
|
# to print documents, which in the case of the system-cairo will be newer. |
52 |
|
|
# |
53 |
|
|
%bcond_with system_cairo |
54 |
tmb |
1011030 |
|
55 |
ghibo |
1058173 |
#define debug_package %{nil} |
56 |
|
|
|
57 |
ennael |
55189 |
# this seems fragile, so require the exact version or later (#58754) |
58 |
|
|
%define sqlite3_version %(pkg-config --modversion sqlite3 &>/dev/null && pkg-config --modversion sqlite3 2>/dev/null || echo 0) |
59 |
|
|
# this one as well (#59759) |
60 |
|
|
%define nss_libname %mklibname nss 3 |
61 |
|
|
%define nss_version %(pkg-config --modversion nss &>/dev/null && pkg-config --modversion nss 2>/dev/null || echo 0) |
62 |
|
|
|
63 |
fwang |
187176 |
Name: thunderbird |
64 |
fwang |
132588 |
Epoch: 0 |
65 |
ns80 |
1085939 |
Version: 45.7.1 |
66 |
ghibo |
1058173 |
Release: %mkrel 1 |
67 |
ennael |
55189 |
Summary: Full-featured email, RSS, and newsgroup client |
68 |
|
|
License: MPL |
69 |
|
|
Group: Networking/Mail |
70 |
fwang |
319962 |
URL: http://www.mozilla.org/thunderbird/organizations/ |
71 |
ghibo |
1049666 |
Source0: http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/%{upstream_version}/source/thunderbird-%{upstream_version}.source.tar.xz |
72 |
doktor5000 |
918945 |
# (doktor5000) script to create tarball for the lightning l10n sources |
73 |
|
|
# adapted from http://pkgs.fedoraproject.org/cgit/thunderbird.git/plain/mklangsource.sh |
74 |
tmb |
1011030 |
# first run bm -lp thunderbird.spec to ensure calendar/locales/shipped-locales definitions of current %%version are present and then |
75 |
doktor5000 |
918945 |
# run the script in SOURCES/ folder as ./mklangsource.sh to generate the tarball for the current %%version |
76 |
ghibo |
1049666 |
Source2: mklangsource.sh |
77 |
doktor5000 |
918945 |
# (doktor5000) tarball for the lightning language sources, see above |
78 |
ghibo |
1049666 |
Source3: l10n-lightning-%{version}.tar.xz |
79 |
ghibo |
1049582 |
|
80 |
|
|
# (doktor5000) needs to be manually updated/synced with calendar/locales/shipped-locales |
81 |
doktor5000 |
1013574 |
%global lightning_langs ca cs cy da de en-GB es-AR es-ES et eu fi fr fy-NL ga-IE gd hu is it ja lt nb-NO nl nn-NO pl pt-PT ru sk sq sv-SE tr uk zh-CN zh-TW |
82 |
doktor5000 |
918945 |
|
83 |
ghibo |
1049666 |
Source12: mozilla-thunderbird-mageia-default-prefs.js |
84 |
ennael |
55189 |
# Mandriva sources (Source300+) |
85 |
ghibo |
1049666 |
Source300: http://www.mozilla-enigmail.org/download/source/enigmail-%{enigmail_version}.tar.gz |
86 |
|
|
Source301: http://www.mozilla-enigmail.org/download/source/enigmail-%{enigmail_version}.tar.gz.asc |
87 |
fwang |
187178 |
Source303: thunderbird.desktop |
88 |
ennael |
55189 |
# Build patches |
89 |
ghibo |
1049666 |
Patch2: mozilla-firefox-1.0-prdtoa.patch |
90 |
luigiwalser |
846427 |
Patch8: firefox-38.0-nss-version.patch |
91 |
tmb |
1011030 |
Patch9: firefox-38.1-freetype-2.6-compatibility.patch |
92 |
doktor5000 |
210855 |
# Mageia patches (patch100+) |
93 |
tmb |
1011030 |
|
94 |
ennael |
55189 |
# Debian patches (Patch200+) |
95 |
fwang |
483803 |
Patch201: thunderbird-24.0-mga-default-mailer.patch |
96 |
ennael |
55189 |
# Mandriva patches (Patch300+) |
97 |
ghibo |
1049666 |
Patch300: mozilla-thunderbird-0.8-progname.patch |
98 |
|
|
Patch301: mozilla-thunderbird-enigmail-package.patch |
99 |
|
|
Patch304: mozilla-thunderbird-run-mozilla.patch |
100 |
|
|
Patch305: mozilla-thunderbird-45.3.0-optimize-noOs_everywhere.patch |
101 |
ghibo |
1055559 |
Patch306: mozilla-thunderbird-45.3.0-optimize-dont-force-O3.patch |
102 |
ghibo |
1058173 |
Patch307: mozilla-thunderbird-45.4.0-optimize-dont-force-O3-pgo-too.patch |
103 |
|
|
|
104 |
ennael |
55189 |
# OpenSuse patches (Patch400+) |
105 |
|
|
Patch400: thunderbird-appname.patch |
106 |
|
|
BuildRequires: autoconf2.1 |
107 |
ghibo |
1058173 |
%if %{with system_cairo} |
108 |
|
|
BuildRequires: cairo-devel >= 1.10 |
109 |
|
|
%endif |
110 |
ennael |
55189 |
Requires: %{mklibname sqlite3_ 0} >= %{sqlite3_version} |
111 |
ghibo |
1058178 |
BuildRequires: sqlite3-devel >= 3.8.8.2 |
112 |
ennael |
55189 |
Requires: %{nss_libname} >= 2:%{nss_version} |
113 |
ghibo |
1049666 |
BuildRequires: yasm |
114 |
|
|
BuildRequires: mesagl-devel |
115 |
ghibo |
1058173 |
BuildRequires: gtk2-devel >= 2.14 |
116 |
ghibo |
1049666 |
BuildRequires: gzip |
117 |
ennael |
55189 |
BuildRequires: python-devel |
118 |
fwang |
285029 |
BuildRequires: python-virtualenv |
119 |
ghibo |
1049666 |
BuildRequires: libjpeg-devel |
120 |
fwang |
132452 |
#(tpg) older versions doesn't support apng extension |
121 |
oden |
500436 |
%if %{mgaversion} >= 3 |
122 |
ghibo |
1058173 |
BuildRequires: libpng-devel >= 2:1.6.19 |
123 |
oden |
500436 |
%endif |
124 |
ghibo |
1058173 |
BuildRequires: nspr-devel >= 2:4.12 |
125 |
|
|
BuildRequires: nss-static-devel >= 2:3.21.1 |
126 |
ghibo |
1049666 |
BuildRequires: unzip |
127 |
|
|
BuildRequires: zip |
128 |
ennael |
55189 |
BuildRequires: zlib-devel |
129 |
|
|
BuildRequires: libIDL-devel |
130 |
|
|
BuildRequires: freetype2-devel |
131 |
fwang |
655458 |
BuildRequires: icu-devel |
132 |
fwang |
187176 |
BuildRequires: pkgconfig(xft) |
133 |
fwang |
655449 |
BuildRequires: pkgconfig(libpulse) |
134 |
ennael |
55189 |
BuildRequires: libxt-devel |
135 |
|
|
BuildRequires: hunspell-devel |
136 |
ghibo |
1058173 |
BuildRequires: dbus-glib-devel >= 0.60 |
137 |
ennael |
55189 |
Requires(post): mktemp |
138 |
|
|
Requires(post): rpm-helper |
139 |
|
|
Requires(postun): rpm-helper |
140 |
|
|
# Integrates thunderbird with xdg-utils. |
141 |
ghibo |
1049666 |
Requires: xdg-utils |
142 |
ennael |
55189 |
# Thunderbird 3 requires alsa |
143 |
|
|
BuildRequires: libalsa-devel |
144 |
fwang |
655532 |
BuildRequires: pkgconfig(gstreamer-1.0) |
145 |
|
|
BuildRequires: pkgconfig(gstreamer-allocators-1.0) |
146 |
ghibo |
1058173 |
# pango-devel is bring in also by gtk+2-devel but not with minimal requirement |
147 |
|
|
BuildRequires: pango-devel >= 1.22.0 |
148 |
ennael |
55189 |
BuildRequires: python |
149 |
|
|
BuildRequires: libnotify-devel |
150 |
ghibo |
1058173 |
BuildRequires: startup-notification-devel >= 0.8 |
151 |
ennael |
55189 |
BuildRequires: libiw-devel |
152 |
ghibo |
1049666 |
BuildRequires: libevent-devel >= 1.4.7 |
153 |
ghibo |
1058179 |
BuildRequires: libvpx-devel >= 1.3.0 |
154 |
doktor5000 |
667393 |
BuildRequires: python-setuptools |
155 |
doktor5000 |
918945 |
# (doktor5000) only required for checkout of lightning l10 sources, see mklangsource.sh |
156 |
|
|
BuildRequires: mercurial |
157 |
tmb |
1011030 |
BuildRequires: pkgconfig(gconf-2.0) |
158 |
ghibo |
1049666 |
BuildRequires: java-headless |
159 |
ghibo |
1055559 |
BuildRequires: rootcerts |
160 |
|
|
BuildRequires: doxygen |
161 |
|
|
BuildRequires: glibc-static-devel |
162 |
|
|
BuildRequires: wget |
163 |
|
|
BuildRequires: cdrkit-genisoimage |
164 |
|
|
BuildRequires: ffmpeg-devel |
165 |
|
|
BuildRequires: libtheora-devel |
166 |
|
|
BuildRequires: libxscrnsaver-devel |
167 |
ghibo |
1058173 |
BuildRequires: python-sqlite2 |
168 |
oden |
500436 |
%if %{mgaversion} >= 4 |
169 |
luigiwalser |
847638 |
Requires: %{_lib}notify4 |
170 |
|
|
Requires: gstreamer1.0-libav |
171 |
oden |
500436 |
%endif |
172 |
doktor5000 |
667393 |
# try to fix mga#1344 (automatic installation of proper -l10n package) |
173 |
|
|
# packages requiring locales-XX will be automatically preferred when locales-XX |
174 |
|
|
# is already installed |
175 |
luigiwalser |
847638 |
Recommends: thunderbird-l10n |
176 |
|
|
Recommends: %{_lib}canberra0 |
177 |
|
|
Recommends: %{_lib}cups2 |
178 |
|
|
Obsoletes: mozilla-thunderbird < %{epoch}:%{version}-%{release} |
179 |
|
|
Provides: mozilla-thunderbird = %{epoch}:%{version}-%{release} |
180 |
doktor5000 |
918945 |
Obsoletes: thunderbird-lightning < 1:3.3-7 |
181 |
luigiwalser |
847638 |
Provides: thunderbird-lightning |
182 |
ennael |
55189 |
|
183 |
|
|
%description |
184 |
|
|
%{title} is a full-featured email, RSS and newsgroup client that |
185 |
|
|
makes emailing safer, faster and easier than ever before. |
186 |
|
|
|
187 |
|
|
#=============================================================================== |
188 |
doktor5000 |
210850 |
#enigmail |
189 |
ennael |
55189 |
|
190 |
|
|
# Supported l10n language lists |
191 |
tmb |
1011030 |
%define l10n_langlist ar bg ca cs de el es fi fr it hu ja ko nb nl pl pt pt_BR ru sl sv tr vi zh_CN zh_TW |
192 |
ennael |
55189 |
|
193 |
|
|
# Disabled l10n languages, for any reason |
194 |
|
|
# nl sk es_AR do not support 0.95.0 yet |
195 |
tmb |
1011030 |
## %define disabled_l10n_langlist hu |
196 |
|
|
# global disabled_l10n_langlist %{nil} |
197 |
ennael |
55189 |
|
198 |
|
|
# Language descriptions |
199 |
|
|
%define language_ar ar |
200 |
tmb |
1011030 |
%define language_bg bg |
201 |
ennael |
55189 |
%define language_ca ca |
202 |
spuhler |
821237 |
%define language_cs cs |
203 |
fwang |
134148 |
%define language_de de |
204 |
ennael |
55189 |
%define language_el el |
205 |
|
|
%define language_es_AR es-AR |
206 |
|
|
%define language_es es-ES |
207 |
spuhler |
821237 |
%define language_fi fi |
208 |
fwang |
134149 |
%define language_fr fr |
209 |
spuhler |
821237 |
%define language_hu hu |
210 |
|
|
%define language_it it |
211 |
ennael |
55189 |
%define langname_it Italian |
212 |
spuhler |
821237 |
%define language_ja ja |
213 |
|
|
%define language_ko ko |
214 |
ennael |
55189 |
%define language_nb nb-NO |
215 |
fwang |
134148 |
%define language_nl nl |
216 |
|
|
%define language_pl pl |
217 |
ennael |
55189 |
%define language_pt pt-PT |
218 |
|
|
%define language_pt_BR pt-BR |
219 |
spuhler |
821237 |
%define language_ro ro |
220 |
|
|
%define language_ru ru |
221 |
fwang |
134148 |
%define language_sk sk |
222 |
spuhler |
821237 |
%define language_sl sl |
223 |
ennael |
55189 |
%define language_sv sv-SE |
224 |
doktor5000 |
233166 |
%define language_tr tr |
225 |
|
|
%define language_vi vi |
226 |
ennael |
55189 |
%define language_zh_CN zh-CN |
227 |
|
|
%define language_zh_TW zh-TW |
228 |
|
|
|
229 |
|
|
# --- Danger line --- |
230 |
|
|
|
231 |
|
|
# All langs |
232 |
doktor5000 |
210850 |
%{expand:%%global langlist %(for lang in %l10n_langlist; do echo "$lang"; done | sort -u | sed ':a;$!N;s/\n/ /;ta')} |
233 |
ennael |
55189 |
|
234 |
|
|
# Defaults (all languages enabled by default) |
235 |
|
|
# l10n |
236 |
|
|
%{expand:%(for lang in %l10n_langlist; do echo "%%define l10n_$lang 1"; done)} |
237 |
|
|
%{expand:%(for lang in %disabled_l10n_langlist; do echo "%%define l10n_$lang 0"; done)} |
238 |
|
|
|
239 |
|
|
# Params |
240 |
|
|
%{expand:%(for lang in %langlist; do echo "%%bcond_without $lang"; done)} |
241 |
|
|
|
242 |
doktor5000 |
210850 |
%package enigmail |
243 |
ghibo |
1049666 |
Summary: Access the authentication and encryption features provided by GnuPG |
244 |
|
|
Group: Networking/Mail |
245 |
|
|
Requires: %{name} = %{epoch}:%{version} |
246 |
|
|
Obsoletes: %{name}-enigmime < %{epoch}:%{version}-%{release} |
247 |
|
|
Provides: %{name}-enigmime = %{epoch}:%{version}-%{release} |
248 |
fwang |
211774 |
Obsoletes: mozilla-thunderbird-enigmime < %{epoch}:%{version}-%{release} |
249 |
|
|
Obsoletes: mozilla-thunderbird-enigmail < %{epoch}:%{version}-%{release} |
250 |
|
|
Provides: mozilla-thunderbird-enigmime = %{epoch}:%{version}-%{release} |
251 |
|
|
Provides: mozilla-thunderbird-enigmail = %{epoch}:%{version}-%{release} |
252 |
ghibo |
1049666 |
Requires: gnupg |
253 |
doktor5000 |
210850 |
Requires(post): %{name} = %{epoch}:%{version} |
254 |
|
|
Requires(preun): %{name} = %{epoch}:%{version} |
255 |
|
|
Requires(post): mktemp |
256 |
|
|
Requires(postun): mktemp |
257 |
tv |
676255 |
Recommends: pinentry-gtk |
258 |
doktor5000 |
210850 |
%(for lang in %l10n_langlist %disabled_l10n_langlist; do |
259 |
fwang |
215481 |
echo "Obsoletes: thunderbird-enigmail-$lang < 0:10.0.2" |
260 |
fwang |
211774 |
echo "Obsoletes: mozilla-thunderbird-enigmail-$lang < %{epoch}:%{version}-%{release}" |
261 |
|
|
echo "Obsoletes: mozilla-thunderbird-enigmail-l10n-$lang < %{epoch}:%{version}-%{release}" |
262 |
doktor5000 |
210850 |
done) |
263 |
ennael |
55189 |
|
264 |
doktor5000 |
210850 |
%description enigmail |
265 |
|
|
Enigmail is an extension to the mail client of %{title} |
266 |
|
|
which allows users to access the authentication and encryption |
267 |
|
|
features provided by GnuPG. |
268 |
|
|
|
269 |
|
|
Main Features |
270 |
|
|
|
271 |
|
|
* Encrypt/sign mail when sending, decrypt/authenticate received |
272 |
|
|
mail |
273 |
|
|
* Support for inline-PGP (RFC 2440) and PGP/MIME (RFC 3156) |
274 |
|
|
* Per-Account based encryption and signing defaults |
275 |
|
|
* Per-Recipient rules for automated key selection, and |
276 |
|
|
enabling/disabling encryption and signing |
277 |
|
|
* OpenPGP key management interface |
278 |
|
|
|
279 |
ennael |
55189 |
#=============================================================================== |
280 |
|
|
|
281 |
doktor5000 |
210850 |
|
282 |
ennael |
55189 |
%prep |
283 |
|
|
%setup -q -c -n %{name}-%{version} |
284 |
|
|
|
285 |
|
|
#=================== |
286 |
|
|
# Thunderbird itself |
287 |
doktor5000 |
208807 |
%setup -q -T -D -n %{name}-%{version}/%{release_dir} |
288 |
ennael |
55189 |
%patch2 -p0 |
289 |
fwang |
256717 |
pushd mozilla |
290 |
fwang |
311559 |
%patch8 -p1 |
291 |
tmb |
1011030 |
%patch9 -p1 |
292 |
fwang |
256717 |
popd |
293 |
ennael |
55189 |
|
294 |
doktor5000 |
134844 |
%patch201 -p0 -b .default_mailer |
295 |
ennael |
55189 |
%patch300 -p0 -b .progname |
296 |
|
|
%patch301 -p1 -b .enigmailpackage |
297 |
fwang |
132452 |
%patch304 -p0 -b .run-mozilla |
298 |
ghibo |
1049582 |
%patch305 -p1 -b .noOs_everywhere |
299 |
ghibo |
1055559 |
%patch306 -p1 -b .noo3 |
300 |
ghibo |
1058173 |
%patch307 -p1 -b .noo3_pgo |
301 |
ennael |
55189 |
|
302 |
|
|
%patch400 -p1 -b .appname |
303 |
|
|
|
304 |
|
|
#=============================================================================== |
305 |
|
|
# Enigmail |
306 |
doktor5000 |
208807 |
%setup -q -T -D -n %{name}-%{version}/%{release_dir}/mozilla/extensions -a300 |
307 |
ennael |
55189 |
|
308 |
doktor5000 |
208807 |
%setup -q -T -D -n %{name}-%{version}/%{release_dir} |
309 |
ennael |
55189 |
|
310 |
|
|
#=============================================================================== |
311 |
|
|
|
312 |
tmb |
311808 |
# for virtualenv patch |
313 |
|
|
cd mozilla |
314 |
|
|
autoconf-2.13 |
315 |
|
|
cd .. |
316 |
|
|
|
317 |
ennael |
55189 |
%build |
318 |
|
|
export BUILD_OFFICIAL=1 |
319 |
|
|
export MOZILLA_OFFICIAL=1 |
320 |
|
|
|
321 |
ghibo |
1055559 |
%ifarch %{ix86} && %{mgaversion} == 5 |
322 |
|
|
# (doktor5000) --disable-new-dtags in addition to -fnostack-protector to get rid of "undefined reference to '__stack_chk_fail'" against libc on i5 |
323 |
doktor5000 |
1013225 |
CFLAGS=$(echo %optflags | %{__sed} -e 's/-fexceptions//;s/--enable-new-dtags/--disable-new-dtags/') |
324 |
|
|
CFLAGS="$CFLAGS -fno-strict-aliasing -fno-stack-protector" |
325 |
ghibo |
1049582 |
%else |
326 |
|
|
CFLAGS=$(echo %optflags | %{__sed} -e 's/-fexceptions//') |
327 |
|
|
CFLAGS="$CFLAGS -fno-strict-aliasing" |
328 |
|
|
%endif |
329 |
fwang |
483806 |
CXXFLAGS="$CFLAGS -fpermissive" |
330 |
ennael |
55189 |
RPM_OPT_FLAGS="$CFLAGS" |
331 |
fwang |
175068 |
LDFLAGS="%ldflags" |
332 |
ennael |
55189 |
export CFLAGS |
333 |
|
|
export CXXFLAGS |
334 |
|
|
export RPM_OPT_FLAGS |
335 |
fwang |
175068 |
export LDFLAGS |
336 |
ennael |
55189 |
|
337 |
ghibo |
1058173 |
%if %{use_opt_o3} |
338 |
|
|
export CFLAGS="$CFLAGS -O3" |
339 |
|
|
export CXXFLAGS="$CXXFLAGS -O3" |
340 |
|
|
%endif |
341 |
|
|
|
342 |
fwang |
175068 |
export MOZCONFIG=`pwd`/.mozconfig |
343 |
|
|
cat > $MOZCONFIG << EOF |
344 |
ghibo |
1058173 |
mk_add_options AUTOCONF=autoconf-2.13 |
345 |
fwang |
175068 |
mk_add_options MOZILLA_OFFICIAL=1 |
346 |
|
|
mk_add_options BUILD_OFFICIAL=1 |
347 |
|
|
mk_add_options MOZ_MAKE_FLAGS="%{_smp_mflags}" |
348 |
doktor5000 |
800495 |
# fallback using absolute path - should be used with define for absolute path for objdir |
349 |
doktor5000 |
800500 |
# see https://bugzilla.mozilla.org/show_bug.cgi?id=1106883#c4 for context information |
350 |
luigiwalser |
856677 |
#mk_add_options MOZ_OBJDIR=%%{_builddir}/%%{name}-%%{version}/%%{release_dir}/%%{objdir} |
351 |
luigiwalser |
846427 |
# -Werror=format-security causes build failures when -Wno-format is explicitly given |
352 |
|
|
# for some sources |
353 |
fwang |
483807 |
ac_add_options --host=%{_host} |
354 |
|
|
ac_add_options --target=%{_target_platform} |
355 |
fwang |
175068 |
ac_add_options --prefix="%{_prefix}" |
356 |
|
|
ac_add_options --libdir="%{_libdir}" |
357 |
|
|
ac_add_options --sysconfdir="%{_sysconfdir}" |
358 |
|
|
ac_add_options --mandir="%{_mandir}" |
359 |
|
|
ac_add_options --includedir="%{_includedir}" |
360 |
|
|
ac_add_options --datadir="%{_datadir}" |
361 |
|
|
ac_add_options --enable-application=mail |
362 |
|
|
ac_add_options --with-system-nspr |
363 |
|
|
ac_add_options --with-system-nss |
364 |
|
|
ac_add_options --with-system-jpeg |
365 |
|
|
ac_add_options --with-system-zlib |
366 |
fwang |
655458 |
ac_add_options --with-system-icu |
367 |
oden |
500436 |
%if %{mgaversion} >= 3 |
368 |
fwang |
175068 |
ac_add_options --with-system-png |
369 |
oden |
500436 |
%endif |
370 |
fwang |
175068 |
ac_add_options --with-system-bz2 |
371 |
tmb |
1011030 |
ac_add_options --disable-system-sqlite |
372 |
fwang |
175068 |
ac_add_options --enable-system-hunspell |
373 |
ghibo |
1058173 |
%if %{with system_cairo} |
374 |
fwang |
175068 |
ac_add_options --enable-system-cairo |
375 |
ghibo |
1058173 |
%endif |
376 |
fwang |
175068 |
ac_add_options --with-pthreads |
377 |
|
|
ac_add_options --disable-tests |
378 |
|
|
ac_add_options --disable-debug |
379 |
|
|
ac_add_options --disable-installer |
380 |
|
|
ac_add_options --disable-updater |
381 |
|
|
ac_add_options --enable-xinerama |
382 |
|
|
ac_add_options --disable-crashreporter |
383 |
|
|
ac_add_options --enable-default-toolkit=cairo-gtk2 |
384 |
|
|
ac_add_options --disable-xprint |
385 |
|
|
ac_add_options --disable-strip |
386 |
ghibo |
1058173 |
ac_add_options --disable-install-strip |
387 |
fwang |
175068 |
ac_add_options --enable-pango |
388 |
|
|
ac_add_options --enable-startup-notification |
389 |
|
|
ac_add_options --enable-svg |
390 |
|
|
ac_add_options --enable-canvas |
391 |
|
|
ac_add_options --enable-crypto |
392 |
|
|
ac_add_options --enable-mathml |
393 |
fwang |
655532 |
ac_add_options --enable-gstreamer=1.0 |
394 |
fwang |
175068 |
ac_add_options --disable-gnomevfs |
395 |
|
|
ac_add_options --enable-gio |
396 |
doktor5000 |
210855 |
ac_add_options --enable-optimize |
397 |
|
|
ac_add_options --with-system-libevent |
398 |
tmb |
1011030 |
%if %{mgaversion} < 6 |
399 |
|
|
ac_add_options --without-system-libvpx |
400 |
|
|
%else |
401 |
doktor5000 |
210855 |
ac_add_options --with-system-libvpx |
402 |
tmb |
1011030 |
%endif |
403 |
doktor5000 |
918945 |
# lightning related, enable lightning build and set path to l10n sources |
404 |
luigiwalser |
847638 |
ac_add_options --enable-calendar |
405 |
doktor5000 |
918945 |
ac_add_options --with-l10n-base=../../l10n |
406 |
fwang |
175068 |
ac_add_options --enable-official-branding |
407 |
fwang |
175113 |
ac_add_options --with-distribution-id=org.mageia |
408 |
ghibo |
1058173 |
# |
409 |
|
|
%if %{use_ccache} |
410 |
|
|
ac_add_options --with-cache=%{_bindir}/ccache |
411 |
|
|
%endif |
412 |
fwang |
175068 |
EOF |
413 |
ennael |
55189 |
|
414 |
doktor5000 |
918945 |
# extract lightning l10n source tarball |
415 |
|
|
cd .. |
416 |
|
|
%{__tar} xf %{SOURCE3} |
417 |
|
|
cd - |
418 |
|
|
|
419 |
doktor5000 |
800495 |
# recommended way to build - also used by upstream buildsystem |
420 |
doktor5000 |
800500 |
# see https://bugzilla.mozilla.org/show_bug.cgi?id=1106883#c4 for context information |
421 |
|
|
MOZ_OBJDIR=%{objdir} make -f client.mk build |
422 |
ennael |
55189 |
|
423 |
ghibo |
1049582 |
# FIXME: cannot be used as it needs to be defined in preamble as %%files list is also expanded |
424 |
|
|
# and not all macro expansions or conversion to shell variable work in preamble |
425 |
|
|
|
426 |
tmb |
1011030 |
# (doktor5000) read all l10n locales supported for the current lightning release |
427 |
|
|
#lightning_langlist=$(grep -v 'osx' calendar/locales/shipped-locales | awk '{print $1}') |
428 |
|
|
|
429 |
|
|
# (doktor5000) exit the build here if there aren't any lightning languages |
430 |
|
|
#[[ -n $lightning_langlist ]] |
431 |
|
|
|
432 |
|
|
# (doktor5000) turn the shell variable into an rpm macro via lazy expansion ( %% ) |
433 |
|
|
#%%{expand:%%global lightning_langs $lightning_langlist } |
434 |
|
|
|
435 |
|
|
|
436 |
doktor5000 |
918945 |
# this builds and installs all l10n files into the one en_US xpi file, same as how lightning was distributed upstream |
437 |
|
|
cd %{objdir}/calendar/lightning |
438 |
doktor5000 |
800495 |
|
439 |
doktor5000 |
918945 |
echo %lightning_langs |
440 |
|
|
|
441 |
|
|
for lang in %lightning_langs |
442 |
|
|
do |
443 |
|
|
make AB_CD=en-US L10N_XPI_NAME=lightning libs-$lang |
444 |
|
|
done |
445 |
|
|
|
446 |
|
|
|
447 |
|
|
|
448 |
|
|
# this creates the lightning and gdata-provider .xpi's |
449 |
|
|
make tools |
450 |
|
|
cd - |
451 |
|
|
|
452 |
ennael |
55189 |
#=============================================================================== |
453 |
|
|
|
454 |
|
|
pushd mozilla/extensions/enigmail |
455 |
fwang |
655548 |
%configure2_5x |
456 |
fwang |
655815 |
make |
457 |
tmb |
1011030 |
|
458 |
ennael |
55189 |
popd |
459 |
|
|
|
460 |
fwang |
484689 |
pushd mozilla/extensions/enigmail/lang |
461 |
|
|
chmod 0755 ./make-lang.sh |
462 |
|
|
for i in `cat current-languages.txt`; do |
463 |
|
|
./make-lang.sh $i %{enigmail_short_version} |
464 |
|
|
done |
465 |
|
|
popd |
466 |
|
|
|
467 |
ennael |
55189 |
#=============================================================================== |
468 |
|
|
|
469 |
|
|
%install |
470 |
|
|
%{__mkdir_p} %{buildroot}{%{_libdir},%{_bindir},%{_datadir}/applications} |
471 |
|
|
%{__mkdir_p} %buildroot%tbdir |
472 |
|
|
|
473 |
|
|
rm -f extensions/spellcheck/locales/en-US/hunspell/en-US.{dic,aff} |
474 |
|
|
|
475 |
luigiwalser |
856677 |
# replacement for %%makeinstall_std |
476 |
doktor5000 |
801425 |
MOZ_OBJDIR=%{objdir} make -f client.mk install DESTDIR=%{buildroot} |
477 |
doktor5000 |
223765 |
|
478 |
ennael |
55189 |
|
479 |
|
|
rm -rf %buildroot%tbdir/dictionaries |
480 |
fwang |
211784 |
ln -s %{_datadir}/hunspell %buildroot%tbdir/dictionaries |
481 |
ennael |
55189 |
|
482 |
|
|
|
483 |
fwang |
187178 |
%{__install} -p -D %{SOURCE303} %{buildroot}/%{_datadir}/applications/%{name}.desktop |
484 |
ennael |
55189 |
|
485 |
doktor5000 |
134844 |
#used for matching system locale on startup |
486 |
|
|
%{__cat} %{SOURCE12} | %{__perl} -p -e 's,THUNDERBIRD_RPM_VR,%{version}-%{release},g;' \ |
487 |
doktor5000 |
212040 |
-e 's,THUNDERBIRD_VENDOR_COMMENT,%{product_release},g;' \ |
488 |
doktor5000 |
208807 |
> %{buildroot}%{tbdir}/defaults/pref/all-mageia.js |
489 |
ennael |
55189 |
|
490 |
|
|
#=============================================================================== |
491 |
|
|
|
492 |
|
|
# icons |
493 |
|
|
%{__mkdir_p} %{buildroot}{%{_liconsdir},%{_iconsdir},%{_miconsdir}} |
494 |
|
|
%{__mkdir_p} %{buildroot}%{_datadir}/icons/hicolor/{16x16,22x22,24x24,32x32,48x48,256x256}/apps |
495 |
|
|
%{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default48.png %{buildroot}%{_liconsdir}/%{name}.png |
496 |
|
|
%{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default32.png %{buildroot}%{_iconsdir}/%{name}.png |
497 |
|
|
%{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default16.png %{buildroot}%{_miconsdir}/%{name}.png |
498 |
|
|
%{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/%{name}.png |
499 |
|
|
%{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default22.png %{buildroot}%{_datadir}/icons/hicolor/22x22/apps/%{name}.png |
500 |
|
|
%{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default24.png %{buildroot}%{_datadir}/icons/hicolor/24x24/apps/%{name}.png |
501 |
|
|
%{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}.png |
502 |
|
|
%{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png |
503 |
|
|
%{__install} -m 644 %{buildroot}/%{tbdir}/chrome/icons/default/default256.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{name}.png |
504 |
|
|
|
505 |
|
|
#=============================================================================== |
506 |
|
|
|
507 |
doktor5000 |
918945 |
# thunderbird ignores lightning when installed in this path ? seems upstream borkage |
508 |
|
|
rm -rf %{buildroot}%{tbdir}/distribution/extensions/%{lightning_id} |
509 |
|
|
|
510 |
|
|
# create the lightning installation folder, and extract all lightning contents from the xpi there |
511 |
|
|
%{__mkdir_p} %{buildroot}%{tbextdir}/%{lightning_id} |
512 |
|
|
|
513 |
|
|
%{_bindir}/unzip -q %{objdir}/dist/xpi-stage/lightning-%{lightning_version}*.xpi -d %{buildroot}%{tbextdir}/%{lightning_id} |
514 |
|
|
%{__chmod} 644 %{buildroot}%{tbextdir}/%{lightning_id}/chrome.manifest |
515 |
|
|
|
516 |
|
|
#=============================================================================== |
517 |
tmb |
1011030 |
|
518 |
ennael |
55189 |
%{__mkdir_p} %{buildroot}%{tbextdir}/%{enigmail_id} |
519 |
|
|
%if !%{xpi} |
520 |
fwang |
655548 |
%{_bindir}/unzip -q mozilla/extensions/enigmail/build/enigmail-%{enigmail_short_version}*.xpi -d %{buildroot}%{tbextdir}/%{enigmail_id} |
521 |
ennael |
55189 |
%{__chmod} 644 %{buildroot}%{tbextdir}/%{enigmail_id}/chrome.manifest |
522 |
|
|
%else |
523 |
fwang |
655548 |
%{__cp} -aL mozilla/extensions/enigmail/build/enigmail-%{enigmail_short_version}*.xpi %{buildroot}%{tbextdir}/%{enigmail_id}/%{enigmail_id}.xpi |
524 |
ennael |
55189 |
%endif |
525 |
|
|
|
526 |
|
|
#============================================================================== |
527 |
|
|
#enigmail lang package |
528 |
|
|
# Convert rpm macros to bash variables |
529 |
|
|
%{expand:%(for lang in %langlist; do echo "language_$lang=%%{language_$lang}"; done)} |
530 |
|
|
%{expand:%(for lang in %langlist; do echo "with_$lang=%%{with $lang}"; done)} |
531 |
|
|
%{expand:%(for lang in %l10n_langlist; do echo "l10n_$lang=%%{l10n_$lang}"; done)} |
532 |
fwang |
484689 |
pushd mozilla/extensions/enigmail/lang |
533 |
ennael |
55189 |
for lang in %langlist; do |
534 |
|
|
%{__mkdir_p} %{buildroot}%{_datadir}/mozilla/extensions/%{tb_appid}/enigmail-$lang@enigmail.mozdev.org |
535 |
|
|
language="language_$lang" |
536 |
|
|
language=${!language} |
537 |
|
|
%{_bindir}/unzip -q enigmail-${language}-%{enigmail_short_version}.xpi -d %{buildroot}%{_datadir}/mozilla/extensions/%{tb_appid}/enigmail-$lang@enigmail.mozdev.org/ |
538 |
|
|
done |
539 |
|
|
popd |
540 |
|
|
|
541 |
|
|
#=============================================================================== |
542 |
fwang |
132452 |
|
543 |
|
|
#exclude devel files |
544 |
|
|
%{__rm} -rf %{buildroot}%{_datadir}/idl/%{oname}-%{version} |
545 |
|
|
%{__rm} -rf %{buildroot}%{_includedir}/%{oname}-%{version} |
546 |
|
|
%{__rm} -rf %{buildroot}%{_libdir}/%{oname}-devel-%{version} |
547 |
ennael |
55189 |
|
548 |
doktor5000 |
918945 |
#remove some empty files we blindly package otherwise due to wildcards in %%files |
549 |
|
|
find %{buildroot} -type f -iname '.mkdir.done' -delete |
550 |
ennael |
55189 |
#=============================================================================== |
551 |
|
|
|
552 |
tmb |
1011030 |
|
553 |
doktor5000 |
918945 |
# (doktor5000) %{_bindir}/thunderbird should be a symlink to %{tbdir}/thunderbird |
554 |
tmb |
1011030 |
# (doktor5000) if that is not the case, the build is broken - can happen at times, no clue why yet |
555 |
|
|
# (doktor5000) catch it here, do not fix automatically to track down why this happens |
556 |
|
|
[[ -L %{buildroot}/%{_bindir}/thunderbird ]] || exit 1 |
557 |
|
|
#{ cd %{buildroot}/%{_bindir}/thunderbird ; ln -sf ../../%{tbdir}/thunderbird thunderbird ; } |
558 |
doktor5000 |
918945 |
|
559 |
|
|
# (doktor5000) %{tbdir}/thunderbird should be the same as %{tbdir}/thunderbird-bin |
560 |
tmb |
1011030 |
# diff -q %{buildroot}%{tbdir}/thunderbird %{buildroot}%{tbdir}/thunderbird-bin || exit 1 |
561 |
doktor5000 |
918945 |
|
562 |
|
|
#=============================================================================== |
563 |
|
|
|
564 |
ennael |
55189 |
%post |
565 |
|
|
|
566 |
ghibo |
1058173 |
mktemp="/bin/mktemp -d -q -p ${TMPDIR:-/tmp} -t %{name}.XXXXXXXXXX" |
567 |
ennael |
55189 |
|
568 |
|
|
TMPDIR= TB_TMPDIR=`$mktemp` && { |
569 |
|
|
HOME="$TB_TMPDIR" LD_LIBRARY_PATH="%{tbdir}" %{tbdir}/thunderbird-bin -nox -register |
570 |
|
|
test -d "$TB_TMPDIR" && %{__rm} -rf -- "$TB_TMPDIR" |
571 |
|
|
} |
572 |
|
|
|
573 |
fwang |
132452 |
|
574 |
ennael |
55189 |
#=============================================================================== |
575 |
|
|
|
576 |
|
|
%post enigmail |
577 |
|
|
if [ -f %{tbdir}/components/compreg.dat ]; then |
578 |
|
|
%{__rm} -f %{tbdir}/components/compreg.dat |
579 |
|
|
fi |
580 |
|
|
|
581 |
|
|
if [ -f %{tbdir}/components/xpti.dat ]; then |
582 |
|
|
%{__rm} -f %{tbdir}/components/xpti.dat |
583 |
|
|
fi |
584 |
|
|
|
585 |
ghibo |
1058173 |
mktemp="/bin/mktemp -d -q -p ${TMPDIR:-/tmp} -t %{name}.XXXXXXXXXX" |
586 |
ennael |
55189 |
|
587 |
|
|
TMPDIR= TB_TMPDIR=`$mktemp` && { |
588 |
|
|
%if %{xpi} |
589 |
|
|
HOME="$TB_TMPDIR" LD_LIBRARY_PATH="%{tbdir}" %{tbdir}/thunderbird-bin -nox -install-global-extension %{tbextdir}/enigmail-%{enigmail_version}-linux-*.xpi |
590 |
|
|
%endif |
591 |
|
|
HOME="$TB_TMPDIR" LD_LIBRARY_PATH="%{tbdir}" %{tbdir}/thunderbird-bin -nox -register |
592 |
|
|
test -d "$TB_TMPDIR" && %{__rm} -rf -- "$TB_TMPDIR" |
593 |
|
|
} |
594 |
|
|
|
595 |
|
|
%preun enigmail |
596 |
|
|
if [ -f %{tbdir}/components/compreg.dat ]; then |
597 |
|
|
%{__rm} -f %{tbdir}/components/compreg.dat |
598 |
|
|
fi |
599 |
|
|
|
600 |
|
|
if [ -f %{tbdir}/components/xpti.dat ]; then |
601 |
|
|
%{__rm} -f %{tbdir}/components/xpti.dat |
602 |
|
|
fi |
603 |
|
|
|
604 |
|
|
if [ -x %{tbdir}/thunderbird-bin ]; then |
605 |
ghibo |
1058173 |
mktemp="/bin/mktemp -d -q -p ${TMPDIR:-/tmp} -t %{name}.XXXXXXXXXX" |
606 |
ennael |
55189 |
|
607 |
|
|
TMPDIR= TB_TMPDIR=`$mktemp` && { |
608 |
|
|
%if %{xpi} |
609 |
|
|
HOME="$TB_TMPDIR" LD_LIBRARY_PATH="%{tbdir}" %{tbdir}/thunderbird-bin -nox -install-global-extension %{tbextdir}/enigmail-%{enigmail_version}-linux-*.xpi |
610 |
|
|
%endif |
611 |
|
|
HOME="$TB_TMPDIR" LD_LIBRARY_PATH="%{tbdir}" %{tbdir}/thunderbird-bin -nox -register |
612 |
|
|
test -d "$TB_TMPDIR" && %{__rm} -rf -- "$TB_TMPDIR" |
613 |
|
|
} |
614 |
|
|
fi |
615 |
|
|
|
616 |
|
|
#=============================================================================== |
617 |
|
|
|
618 |
|
|
%files |
619 |
|
|
%doc mozilla/LEGAL |
620 |
doktor5000 |
918945 |
# (doktor5000) explicit %%attrs are not applicable to symlinks, remove them |
621 |
|
|
%{_bindir}/thunderbird |
622 |
ennael |
55189 |
%attr(644,root,root) %{_datadir}/applications/*.desktop |
623 |
|
|
%{tbdir} |
624 |
|
|
%if %{xpi} |
625 |
|
|
%dir %{tbextdir} |
626 |
|
|
%endif |
627 |
doktor5000 |
918945 |
# lightning files - cannot use wildcards as some files below need to be tagged with %%lang |
628 |
|
|
%{tbextdir}/%{lightning_id}/app.ini |
629 |
|
|
%{tbextdir}/%{lightning_id}/chrome.manifest |
630 |
|
|
%{tbextdir}/%{lightning_id}/install.rdf |
631 |
|
|
%{tbextdir}/%{lightning_id}/defaults/preferences/lightning.js |
632 |
|
|
%{tbextdir}/%{lightning_id}/calendar-js |
633 |
|
|
%{tbextdir}/%{lightning_id}/components |
634 |
|
|
%{tbextdir}/%{lightning_id}/chrome/calendar |
635 |
|
|
%{tbextdir}/%{lightning_id}/chrome/calendar-en-US |
636 |
|
|
%{tbextdir}/%{lightning_id}/chrome/icons |
637 |
|
|
%{tbextdir}/%{lightning_id}/chrome/skin |
638 |
|
|
%{tbextdir}/%{lightning_id}/chrome/lightning-en-US |
639 |
|
|
%{tbextdir}/%{lightning_id}/chrome/lightning |
640 |
|
|
%{tbextdir}/%{lightning_id}/modules |
641 |
|
|
%{tbextdir}/%{lightning_id}/timezones |
642 |
tmb |
1039080 |
# (tmb) disable language tagging as rpm fails to install all needed files, breaking/disabling lightning |
643 |
doktor5000 |
918945 |
# tag l10n files with %%lang(language) to only install those l10n files for which locales packages are installed |
644 |
ghibo |
1055559 |
%(for lang in %lightning_langs ; do |
645 |
|
|
echo "%{tbextdir}/%{lightning_id}/chrome/lightning-$lang" |
646 |
|
|
echo "%{tbextdir}/%{lightning_id}/chrome/calendar-$lang" |
647 |
|
|
done) |
648 |
|
|
#%{tbextdir}/%{lightning_id}/chrome/lightning-* |
649 |
|
|
#%{tbextdir}/%{lightning_id}/chrome/calendar-* |
650 |
ennael |
55189 |
# Mandriva menu |
651 |
|
|
%{_miconsdir}/%{name}.png |
652 |
|
|
%{_iconsdir}/%{name}.png |
653 |
|
|
%{_liconsdir}/%{name}.png |
654 |
|
|
# other icons |
655 |
fwang |
319962 |
%{_iconsdir}/hicolor/*/apps/%{name}.png |
656 |
ennael |
55189 |
%exclude %{tbextdir}/%{enigmail_id} |
657 |
|
|
|
658 |
|
|
%files enigmail |
659 |
|
|
%{tbextdir}/%{enigmail_id} |
660 |
tmb |
1011030 |
# tag l10n files with %%lang(language) to only install those l10n files for which locales packages are installed |
661 |
doktor5000 |
210850 |
%(for lang in %langlist; do |
662 |
|
|
echo "%%lang($lang) %{_datadir}/mozilla/extensions/%{tb_appid}/enigmail-$lang@enigmail.mozdev.org" |
663 |
|
|
done) |
664 |
ghibo |
1055559 |
|