]>
Commit | Line | Data |
---|---|---|
4ab44ca6 | 1 | # NOTE: PLD distributes icedove instead |
d64bbd01 | 2 | # |
2d0631f2 | 3 | # TODO: |
2a38f5ed | 4 | # - separate spec for enigmail |
b2ee2cae | 5 | # - build with system mozldap |
6a2c392d | 6 | # |
7 | # Conditional builds | |
0181851c | 8 | %bcond_without enigmail # don't build enigmail - GPG/PGP support |
6d051139 | 9 | %bcond_with gtk3 # GTK+ 3.x instead of 2.x |
0181851c | 10 | %bcond_without ldap # disable e-mail address lookups in LDAP directories |
b2ee2cae | 11 | %bcond_without lightning # disable Sunbird/Lightning calendar |
a6cc2a5b | 12 | %bcond_with xulrunner # system xulrunner |
b2ee2cae JB |
13 | %bcond_with crashreporter # report crashes to crash-stats.mozilla.com |
14 | ||
b2ee2cae JB |
15 | %if 0%{?_enable_debug_packages} != 1 |
16 | %undefine crashreporter | |
17 | %endif | |
18 | ||
6d051139 JB |
19 | %define enigmail_ver 1.6 |
20 | %define nspr_ver 4.10.2 | |
21 | %define nss_ver 3.15.4 | |
b2ee2cae | 22 | |
6d051139 | 23 | %define xulrunner_ver 2:24.0 |
104f475d | 24 | |
b2ee2cae JB |
25 | %if %{without xulrunner} |
26 | # The actual sqlite version (see RHBZ#480989): | |
27 | %define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR) | |
28 | %endif | |
2fb020df | 29 | |
2f54214f | 30 | Summary: Thunderbird Community Edition - email client |
1b47ca76 | 31 | Summary(pl.UTF-8): Thunderbird Community Edition - klient poczty |
f13ac6ca | 32 | Name: mozilla-thunderbird |
6d051139 | 33 | Version: 24.5.0 |
b2ee2cae | 34 | Release: 1 |
6d051139 JB |
35 | License: MPL v2.0 |
36 | Group: X11/Applications/Mail | |
b2ee2cae | 37 | Source0: http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/thunderbird-%{version}.source.tar.bz2 |
6d051139 | 38 | # Source0-md5: dbe164c48e42c04b4959910eda2e52ca |
db70ccf2 | 39 | Source1: http://www.mozilla-enigmail.org/download/source/enigmail-%{enigmail_ver}.tar.gz |
6d051139 | 40 | # Source1-md5: 4a2bbcb020bdb282a660fda8c70d5608 |
b2ee2cae JB |
41 | Source2: %{name}.png |
42 | Source4: %{name}.desktop | |
43 | Source5: %{name}.sh | |
b2ee2cae | 44 | Patch1: %{name}-enigmail-shared.patch |
6d051139 | 45 | Patch2: %{name}-sh.patch |
b2ee2cae | 46 | Patch3: %{name}-fonts.patch |
b2ee2cae | 47 | Patch6: %{name}-prefs.patch |
b2ee2cae JB |
48 | Patch7: %{name}-system-mozldap.patch |
49 | Patch8: %{name}-makefile.patch | |
b2ee2cae | 50 | Patch12: %{name}-no-subshell.patch |
d44f5419 JB |
51 | # Edit patch below and restore --system-site-packages when system virtualenv gets 1.7 upgrade |
52 | Patch13: %{name}-system-virtualenv.patch | |
53 | Patch14: %{name}-gyp-slashism.patch | |
6d051139 | 54 | Patch15: %{name}-enable-addons.patch |
f13ac6ca | 55 | URL: http://www.mozilla.org/projects/thunderbird/ |
104f475d | 56 | BuildRequires: GConf2-devel >= 1.2.1 |
b2ee2cae | 57 | BuildRequires: alsa-lib-devel |
b5dab97f | 58 | BuildRequires: automake |
b2ee2cae JB |
59 | BuildRequires: bzip2-devel |
60 | BuildRequires: cairo-devel >= 1.10 | |
61 | BuildRequires: dbus-glib-devel >= 0.60 | |
43abeb37 | 62 | BuildRequires: freetype-devel >= 1:2.1.8 |
b2ee2cae | 63 | BuildRequires: glib2-devel >= 2.0 |
6d051139 JB |
64 | BuildRequires: gstreamer0.10-devel |
65 | BuildRequires: gstreamer0.10-plugins-base-devel | |
66 | %{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.14} | |
67 | %{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0.0} | |
b2ee2cae | 68 | BuildRequires: hunspell-devel |
f13ac6ca | 69 | BuildRequires: libIDL-devel >= 0.8.0 |
6d051139 | 70 | BuildRequires: libevent-devel |
b2ee2cae | 71 | BuildRequires: libiw-devel |
d44f5419 | 72 | # requires libjpeg-turbo implementing at least libjpeg 6b API |
f13ac6ca | 73 | BuildRequires: libjpeg-devel >= 6b |
d44f5419 | 74 | BuildRequires: libjpeg-turbo-devel |
b2ee2cae | 75 | BuildRequires: libpng-devel >= 1.4.1 |
f13ac6ca | 76 | BuildRequires: libstdc++-devel |
6d051139 | 77 | BuildRequires: mozldap-devel |
b2ee2cae JB |
78 | BuildRequires: nspr-devel >= 1:%{nspr_ver} |
79 | BuildRequires: nss-devel >= 1:%{nss_ver} | |
104f475d | 80 | BuildRequires: pango-devel >= 1:1.14.0 |
b2ee2cae | 81 | BuildRequires: perl-base >= 1:5.6 |
6d051139 | 82 | BuildRequires: python-virtualenv |
b2ee2cae JB |
83 | BuildRequires: pkgconfig |
84 | BuildRequires: python >= 1:2.5 | |
08a6359c | 85 | BuildRequires: sed >= 4.0 |
6d051139 | 86 | BuildRequires: sqlite3-devel >= 3.7.17 |
b2ee2cae | 87 | BuildRequires: startup-notification-devel >= 0.8 |
6d051139 | 88 | BuildRequires: libvpx-devel >= 1.0.0 |
f898c2b0 | 89 | BuildRequires: xorg-lib-libXext-devel |
f898c2b0 | 90 | BuildRequires: xorg-lib-libXinerama-devel |
f898c2b0 | 91 | BuildRequires: xorg-lib-libXt-devel |
b2ee2cae JB |
92 | BuildRequires: yasm |
93 | BuildRequires: zip | |
94 | %if %{with xulrunner} | |
104f475d | 95 | BuildRequires: xulrunner-devel >= %{xulrunner_ver} |
6d051139 | 96 | BuildRequires: xulrunner-devel < 2:25 |
b2ee2cae | 97 | %else |
6d051139 JB |
98 | %{!?with_gtk3:Requires: gtk+2 >= 2:2.14} |
99 | %{?with_gtk3:Requires: gtk+3 >= 3.0.0} | |
14ca0fd0 | 100 | Requires: myspell-common |
b2ee2cae JB |
101 | Requires: nspr >= 1:%{nspr_ver} |
102 | Requires: nss >= 1:%{nss_ver} | |
103 | Requires: sqlite3 >= %{sqlite_build_version} | |
104 | %endif | |
105 | Requires(post): mktemp >= 1.5-18 | |
106 | %if %{with xulrunner} | |
107 | %requires_eq_to xulrunner xulrunner-devel | |
108 | %endif | |
d44f5419 | 109 | Requires: libjpeg-turbo |
f6f9c830 | 110 | Obsoletes: mozilla-thunderbird-dictionary-en-US |
d44f5419 | 111 | Conflicts: mozilla-thunderbird-lang-resources < %{version} |
f13ac6ca | 112 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
113 | ||
b2ee2cae JB |
114 | %define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+ |
115 | ||
0181851c | 116 | # don't satisfy other packages (don't use %{name} here) |
b2ee2cae | 117 | %define _noautoprovfiles %{_libdir}/mozilla-thunderbird/components |
d44f5419 JB |
118 | %if %{without xulrunner} |
119 | # we don't want these to satisfy packages depending on xulrunner | |
120 | %define _noautoprov libmozalloc.so libxpcom.so libxul.so | |
2fb020df | 121 | # and as we don't provide them, don't require either |
d44f5419 JB |
122 | %define _noautoreq libmozalloc.so libxpcom.so libxul.so |
123 | %endif | |
b2ee2cae JB |
124 | |
125 | %define topdir %{_builddir}/%{name}-%{version} | |
126 | %define objdir %{topdir}/obj-%{_target_cpu} | |
b1326436 | 127 | |
f13ac6ca | 128 | %description |
2f54214f ER |
129 | Thunderbird Community Edition is an open-source,fast and portable |
130 | email client. | |
f13ac6ca | 131 | |
1b47ca76 | 132 | %description -l pl.UTF-8 |
2f54214f | 133 | Thunderbird Community Edition jest open sourcowym, szybkim i |
1b47ca76 | 134 | przenośnym klientem poczty. |
f13ac6ca | 135 | |
b2ee2cae JB |
136 | %package addon-lightning |
137 | Summary: An integrated calendar for Mozilla Thunderbird | |
4ab44ca6 | 138 | Summary(pl.UTF-8): Zintegrowany kalendarz dla klienta Mozilla Thunderbird |
b2ee2cae JB |
139 | License: MPL 1.1 or GPL v2+ or LGPL v2.1+ |
140 | Group: Applications/Networking | |
141 | Requires: %{name} = %{version}-%{release} | |
142 | ||
143 | %description addon-lightning | |
144 | Lightning is an calendar extension to Mozilla Thunderbird email | |
145 | client. | |
146 | ||
147 | %description addon-lightning -l pl.UTF-8 | |
148 | Lightning to rozszerzenie do klienta poczty Mozilla Thunderbird | |
149 | dodające funkcjonalność kalendarza. | |
150 | ||
2a38f5ed ER |
151 | %package addon-enigmail |
152 | Summary: Extension for the authentication and encryption features provided by GnuPG | |
1b47ca76 | 153 | Summary(pl.UTF-8): Rozszerzenie do uwierzytelniania i szyfrowania zapewnianego przez GnuPG |
6d051139 | 154 | License: MPL v1.1 or GPL v2+ or LGPL v2.1+ |
2a38f5ed ER |
155 | Group: Applications/Networking |
156 | URL: http://enigmail.mozdev.org/ | |
b2ee2cae JB |
157 | Requires: %{name} = %{version}-%{release} |
158 | Requires: gnupg | |
2a38f5ed ER |
159 | |
160 | %description addon-enigmail | |
161 | Enigmail is an extension to the mail client of Mozilla Thunderbird | |
162 | which allows users to access the authentication and encryption | |
163 | features provided by GnuPG. | |
164 | ||
43a45b49 | 165 | Main Features: |
2a38f5ed ER |
166 | - Encrypt/sign mail when sending, decrypt/authenticate received mail |
167 | - Support for inline-PGP (RFC 2440) and PGP/MIME (RFC 3156) | |
168 | - Per-Account based encryption and signing defaults | |
169 | - Per-Recipient rules for automated key selection, and | |
170 | enabling/disabling encryption and signing | |
171 | - OpenPGP key management interface | |
172 | ||
1b47ca76 | 173 | %description addon-enigmail -l pl.UTF-8 |
43a45b49 | 174 | Enigmail to rozszerzenie klienta pocztowego Mozilla Thunderbird |
1b47ca76 | 175 | pozwalające użytkownikom na dostęp do uwierzytelniania i szyfrowania |
43a45b49 JB |
176 | zapewnianego przez GnuPG. |
177 | ||
1b47ca76 ER |
178 | Główne możliwości: |
179 | - szyfrowanie/podpisywanie poczty przy wysyłaniu, | |
43a45b49 | 180 | odszyfrowywanie/uwierzytelnianie poczty odebranej |
1b47ca76 ER |
181 | - obsługa inline-PGP (RFC 2440) i PGP/MIME (RFC 3156) |
182 | - ustawienia domyślne szyfrowania i podpisywania dla każdego konta | |
183 | - reguły automatycznego wyboru kluczy i włączenia szyfrowania oraz | |
184 | podpisywania dla każdego adresata | |
185 | - interfejs do zarządzania kluczami OpenPGP | |
43a45b49 | 186 | |
f13ac6ca | 187 | %prep |
6d051139 JB |
188 | %setup -qc |
189 | mv comm-esr24 mozilla | |
db90e3d3 | 190 | cd mozilla |
b2ee2cae JB |
191 | %{?with_enigmail:%{__gzip} -dc %{SOURCE1} | %{__tar} xf - -C mailnews/extensions} |
192 | %{?with_enigmail:%patch1 -p1} | |
6d051139 | 193 | %patch2 -p1 |
bfd725fc | 194 | %patch3 -p1 |
161c66dc | 195 | %patch6 -p1 |
3580fd1a | 196 | %patch7 -p1 |
b2ee2cae | 197 | %patch8 -p2 |
b2ee2cae | 198 | %patch12 -p1 |
d44f5419 JB |
199 | %patch13 -p1 |
200 | %patch14 -p1 | |
6d051139 | 201 | %patch15 -p1 |
f13ac6ca | 202 | |
203 | %build | |
db90e3d3 | 204 | cd mozilla |
b2ee2cae JB |
205 | cp -f %{_datadir}/automake/config.* mozilla/build/autoconf |
206 | cp -f %{_datadir}/automake/config.* mozilla/nsprpub/build/autoconf | |
207 | cp -f %{_datadir}/automake/config.* ldap/sdks/c-sdk/config/autoconf | |
f13ac6ca | 208 | |
b2ee2cae JB |
209 | cat << EOF > .mozconfig |
210 | mk_add_options MOZ_OBJDIR=%{objdir} | |
211 | ||
a6cc2a5b | 212 | export CFLAGS="%{rpmcflags}" |
a83161af | 213 | export CXXFLAGS="%{rpmcflags}" |
b2ee2cae JB |
214 | |
215 | %if %{with crashreporter} | |
216 | export MOZ_DEBUG_SYMBOLS=1 | |
217 | %endif | |
218 | ||
219 | # Options for 'configure' (same as command-line options). | |
2d0631f2 AG |
220 | ac_add_options --prefix=%{_prefix} |
221 | ac_add_options --exec-prefix=%{_exec_prefix} | |
222 | ac_add_options --bindir=%{_bindir} | |
223 | ac_add_options --sbindir=%{_sbindir} | |
224 | ac_add_options --sysconfdir=%{_sysconfdir} | |
225 | ac_add_options --datadir=%{_datadir} | |
226 | ac_add_options --includedir=%{_includedir} | |
227 | ac_add_options --libdir=%{_libdir} | |
228 | ac_add_options --libexecdir=%{_libexecdir} | |
229 | ac_add_options --localstatedir=%{_localstatedir} | |
230 | ac_add_options --sharedstatedir=%{_sharedstatedir} | |
231 | ac_add_options --mandir=%{_mandir} | |
232 | ac_add_options --infodir=%{_infodir} | |
e17812ea | 233 | %if %{?debug:1}0 |
b2ee2cae | 234 | ac_add_options --disable-optimize |
2d0631f2 AG |
235 | ac_add_options --enable-debug |
236 | ac_add_options --enable-debug-modules | |
b2ee2cae JB |
237 | ac_add_options --enable-debugger-info-modules |
238 | ac_add_options --enable-crash-on-assert | |
b1326436 | 239 | %else |
2d0631f2 AG |
240 | ac_add_options --disable-debug |
241 | ac_add_options --disable-debug-modules | |
b2ee2cae JB |
242 | ac_add_options --disable-logging |
243 | ac_add_options --enable-optimize="%{rpmcflags} -Os" | |
b1326436 | 244 | %endif |
b2ee2cae JB |
245 | ac_add_options --disable-strip |
246 | ac_add_options --disable-strip-libs | |
b1326436 | 247 | %if %{with tests} |
2d0631f2 | 248 | ac_add_options --enable-tests |
b1326436 | 249 | %else |
2d0631f2 | 250 | ac_add_options --disable-tests |
b1326436 | 251 | %endif |
6d051139 JB |
252 | %if %{with lightning} |
253 | ac_add_options --enable-calendar | |
782fb36e | 254 | %else |
6d051139 | 255 | ac_add_options --disable-calendar |
782fb36e | 256 | %endif |
b2ee2cae JB |
257 | %if %{with crashreporter} |
258 | ac_add_options --enable-crashreporter | |
259 | %else | |
260 | ac_add_options --disable-crashreporter | |
261 | %endif | |
6d051139 JB |
262 | ac_add_options --disable-elf-dynstr-gc |
263 | ac_add_options --disable-gnomeui | |
264 | ac_add_options --disable-gnomevfs | |
2d0631f2 | 265 | ac_add_options --disable-installer |
6d051139 JB |
266 | ac_add_options --disable-javaxpcom |
267 | ac_add_options --disable-profilesharing | |
b2ee2cae | 268 | ac_add_options --disable-updater |
6d051139 JB |
269 | ac_add_options --disable-xterm-updates |
270 | ac_add_options --enable-application=mail | |
2d0631f2 | 271 | ac_add_options --enable-crypto |
6d051139 JB |
272 | ac_add_options --enable-default-toolkit=%{?with_gtk3:cairo-gtk3}%{!?with_gtk3:cairo-gtk2} |
273 | ac_add_options --enable-gio | |
274 | %if %{with ldap} | |
275 | ac_add_options --enable-ldap | |
276 | ac_add_options --with-system-ldap | |
277 | %else | |
278 | ac_add_options --disable-ldap | |
279 | %endif | |
280 | ac_add_options --enable-libxul | |
2d0631f2 | 281 | ac_add_options --enable-pango |
6d051139 JB |
282 | ac_add_options --enable-postscript |
283 | ac_add_options --enable-shared-js | |
284 | ac_add_options --enable-single-profile | |
b2ee2cae | 285 | ac_add_options --enable-startup-notification |
b2ee2cae JB |
286 | ac_add_options --enable-system-cairo |
287 | ac_add_options --enable-system-hunspell | |
288 | ac_add_options --enable-system-sqlite | |
6d051139 | 289 | ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name} |
b2ee2cae JB |
290 | ac_add_options --with-distribution-id=org.pld-linux |
291 | %if %{with xulrunner} | |
a6cc2a5b | 292 | ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul) |
b2ee2cae | 293 | ac_add_options --with-system-libxul |
b2ee2cae JB |
294 | %endif |
295 | ac_add_options --with-pthreads | |
296 | ac_add_options --with-system-bz2 | |
6d051139 | 297 | ac_add_options --with-system-ffi |
2d0631f2 | 298 | ac_add_options --with-system-jpeg |
6d051139 JB |
299 | ac_add_options --with-system-libevent |
300 | ac_add_options --with-system-libvpx | |
2d0631f2 AG |
301 | ac_add_options --with-system-nspr |
302 | ac_add_options --with-system-nss | |
303 | ac_add_options --with-system-png | |
304 | ac_add_options --with-system-zlib | |
2d0631f2 AG |
305 | EOF |
306 | ||
6d051139 JB |
307 | mkdir -p %{objdir}/config |
308 | ln -s %{topdir}/mozilla/config/*.mk %{objdir}/config | |
309 | ||
4ab44ca6 | 310 | %{__make} -j1 -f client.mk build \ |
b2ee2cae JB |
311 | STRIP="/bin/true" \ |
312 | MOZ_MAKE_FLAGS="%{?_smp_mflags}" \ | |
6d051139 | 313 | installdir=%{_libdir}/%{name} \ |
d44f5419 | 314 | XLIBS="-lX11 -lXt" \ |
2d0631f2 AG |
315 | CC="%{__cc}" \ |
316 | CXX="%{__cxx}" | |
f13ac6ca | 317 | |
b2ee2cae JB |
318 | %if %{with crashreporter} |
319 | # create debuginfo for crash-stats.mozilla.com | |
320 | %{__make} -j1 -C obj-%{_target_cpu} buildsymbols | |
321 | %endif | |
322 | ||
933ef0d6 | 323 | %if %{with enigmail} |
b2ee2cae JB |
324 | cd mailnews/extensions/enigmail |
325 | ./makemake -r -o %{objdir} | |
6d051139 | 326 | %{__make} -j1 -C %{objdir}/mailnews/extensions/enigmail \ |
b2ee2cae JB |
327 | STRIP="/bin/true" \ |
328 | CC="%{__cc}" \ | |
329 | CXX="%{__cxx}" | |
d44f5419 | 330 | |
6d051139 | 331 | %{__make} -j1 -C %{objdir}/mailnews/extensions/enigmail xpi \ |
d44f5419 JB |
332 | STRIP="/bin/true" \ |
333 | CC="%{__cc}" \ | |
334 | CXX="%{__cxx}" | |
933ef0d6 | 335 | %endif |
336 | ||
f13ac6ca | 337 | %install |
f13ac6ca | 338 | rm -rf $RPM_BUILD_ROOT |
b2ee2cae | 339 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name},%{_datadir}/%{name},%{_pixmapsdir},%{_desktopdir}} |
f13ac6ca | 340 | |
b2ee2cae JB |
341 | cd %{objdir} |
342 | %{__make} -C mail/installer stage-package \ | |
08d0f73c | 343 | DESTDIR=$RPM_BUILD_ROOT \ |
6d051139 | 344 | installdir=%{_libdir}/%{name} \ |
a99e8bba | 345 | PKG_SKIP_STRIP=1 |
f13ac6ca | 346 | |
6d051139 JB |
347 | cp -a mozilla/dist/thunderbird/* $RPM_BUILD_ROOT%{_libdir}/%{name}/ |
348 | ||
ac0ba341 JB |
349 | %if %{with xulrunner} |
350 | # needed to find mozilla runtime | |
351 | ln -s ../xulrunner $RPM_BUILD_ROOT%{_libdir}/%{name}/xulrunner | |
352 | %endif | |
353 | ||
d44f5419 | 354 | # Enable crash reporter for Thunderbird application |
b2ee2cae JB |
355 | %if %{with crashreporter} |
356 | %{__sed} -i -e 's/\[Crash Reporter\]/[Crash Reporter]\nEnabled=1/' $RPM_BUILD_ROOT%{_libdir}/%{name}/application.ini | |
357 | ||
358 | # Add debuginfo for crash-stats.mozilla.com | |
359 | install -d $RPM_BUILD_ROOT%{_exec_prefix}/lib/debug%{_libdir}/%{name} | |
360 | cp -a mozilla/dist/%{name}-%{version}.en-US.linux-*.crashreporter-symbols.zip $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/%{name} | |
361 | %endif | |
362 | ||
363 | # copy manually lightning files, somewhy they are not installed by make | |
6d051139 | 364 | cp -a mozilla/dist/bin/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103} \ |
b2ee2cae JB |
365 | $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions |
366 | ||
92cc635c | 367 | # move arch independant ones to datadir |
b2ee2cae | 368 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins $RPM_BUILD_ROOT%{_datadir}/%{name}/searchplugins |
b2ee2cae JB |
369 | ln -s ../../share/%{name}/searchplugins $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins |
370 | ||
371 | # dir for arch independant extensions besides arch dependant extensions | |
372 | # see mozilla/xpcom/build/nsXULAppAPI.h | |
373 | # XRE_SYS_LOCAL_EXTENSION_PARENT_DIR and XRE_SYS_SHARE_EXTENSION_PARENT_DIR | |
374 | install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions | |
92cc635c | 375 | |
a83161af | 376 | %if %{without xulrunner} |
b2ee2cae | 377 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries |
f6f9c830 | 378 | ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries |
a83161af | 379 | %endif |
b2ee2cae JB |
380 | |
381 | %{__sed} -e 's,@LIBDIR@,%{_libdir},' %{SOURCE5} > $RPM_BUILD_ROOT%{_bindir}/mozilla-thunderbird | |
a99e8bba | 382 | ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/thunderbird |
f13ac6ca | 383 | |
b2ee2cae JB |
384 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop |
385 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}/mozilla-thunderbird.png | |
386 | ||
387 | # files created by regxpcom -register in post | |
388 | touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat | |
389 | touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat | |
390 | cat << 'EOF' > $RPM_BUILD_ROOT%{_libdir}/%{name}/register | |
391 | #!/bin/sh | |
392 | umask 022 | |
393 | # make temporary HOME, as it attempts to touch files in $HOME/.mozilla | |
394 | # dangerous if you run this with sudo with keep_env += HOME | |
395 | # also TMPDIR could be pointing to sudo user's homedir so we reset that too. | |
396 | t=$(mktemp -d) | |
397 | %{__rm} -f %{_libdir}/%{name}/components/{compreg,xpti}.dat | |
a83161af | 398 | TMPDIR= TMP= HOME=$t %{_libdir}/%{name}/thunderbird -register |
b2ee2cae JB |
399 | rm -rf $t |
400 | EOF | |
401 | chmod a+rx $RPM_BUILD_ROOT%{_libdir}/%{name}/register | |
f13ac6ca | 402 | |
bf80b43f | 403 | %if %{with enigmail} |
b2ee2cae | 404 | ext_dir=$RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/\{847b3a00-7ab1-11d4-8f02-006008948af5\} |
d44f5419 | 405 | install -d $ext_dir/{chrome,components,defaults/preferences,modules} |
b2ee2cae | 406 | cd mozilla/dist/bin |
d44f5419 | 407 | cp -rfLp chrome/enigmail.jar $ext_dir/chrome |
b2ee2cae | 408 | cp -rfLp components/enig* $ext_dir/components |
b2ee2cae | 409 | cp -rfLp defaults/preferences/enigmail.js $ext_dir/defaults/preferences |
d44f5419 JB |
410 | cp -rfLp modules/{commonFuncs,enigmailCommon,keyManagement,pipeConsole,subprocess}.jsm $ext_dir/modules |
411 | cp -rfLp modules/{subprocess_worker_unix,subprocess_worker_win}.js $ext_dir/modules | |
b2ee2cae JB |
412 | cd - |
413 | cp -p %{topdir}/mozilla/mailnews/extensions/enigmail/package/install.rdf $ext_dir | |
414 | cp -p %{topdir}/mozilla/mailnews/extensions/enigmail/package/chrome.manifest $ext_dir/chrome.manifest | |
bf80b43f AG |
415 | %endif |
416 | ||
b2ee2cae | 417 | # mozldap |
6d051139 JB |
418 | %{__sed} -i '/lib\(ldap\|ldif\|prldap\)60.so/d' $RPM_BUILD_ROOT%{_libdir}/%{name}/dependentlibs.list |
419 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{ldap,ldif,prldap}60.so | |
a99e8bba | 420 | |
f13ac6ca | 421 | %clean |
422 | rm -rf $RPM_BUILD_ROOT | |
423 | ||
630d6235 | 424 | %pretrans |
f6f9c830 ER |
425 | if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then |
426 | mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave} | |
427 | fi | |
b2ee2cae | 428 | for d in chrome defaults icons isp modules res searchplugins; do |
92cc635c ER |
429 | if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then |
430 | install -d %{_datadir}/%{name} | |
431 | mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d | |
432 | fi | |
433 | done | |
434 | exit 0 | |
435 | ||
b2ee2cae JB |
436 | %post |
437 | %{_libdir}/%{name}/register || : | |
438 | ||
f13ac6ca | 439 | %files |
440 | %defattr(644,root,root,755) | |
441 | %attr(755,root,root) %{_bindir}/mozilla-thunderbird | |
1541df45 | 442 | %attr(755,root,root) %{_bindir}/thunderbird |
339fc03d | 443 | %dir %{_libdir}/%{name} |
b2ee2cae | 444 | %{_libdir}/%{name}/application.ini |
b2ee2cae JB |
445 | %{_libdir}/%{name}/blocklist.xml |
446 | %{_libdir}/%{name}/chrome.manifest | |
b2ee2cae | 447 | %dir %{_libdir}/%{name}/components |
b2ee2cae | 448 | %{_libdir}/%{name}/components/components.manifest |
a83161af JB |
449 | %attr(755,root,root) %{_libdir}/%{name}/*.sh |
450 | %attr(755,root,root) %{_libdir}/%{name}/*-bin | |
451 | %attr(755,root,root) %{_libdir}/%{name}/thunderbird | |
452 | %attr(755,root,root) %{_libdir}/%{name}/register | |
6d051139 | 453 | %{_libdir}/%{name}/omni.ja |
a83161af | 454 | %if %{without xulrunner} |
d44f5419 | 455 | %{_libdir}/%{name}/dependentlibs.list |
a83161af | 456 | %{_libdir}/%{name}/platform.ini |
a83161af | 457 | %attr(755,root,root) %{_libdir}/%{name}/components/*.so |
b2ee2cae | 458 | %attr(755,root,root) %{_libdir}/%{name}/libmozalloc.so |
6d051139 | 459 | %attr(755,root,root) %{_libdir}/%{name}/libmozjs.so |
b2ee2cae | 460 | %attr(755,root,root) %{_libdir}/%{name}/libxul.so |
339fc03d | 461 | %attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client |
b2ee2cae | 462 | %attr(755,root,root) %{_libdir}/%{name}/plugin-container |
a83161af | 463 | %endif |
92cc635c ER |
464 | |
465 | # symlinks | |
466 | %{_libdir}/%{name}/chrome | |
467 | %{_libdir}/%{name}/defaults | |
339fc03d | 468 | %{_libdir}/%{name}/isp |
b2ee2cae | 469 | %{_libdir}/%{name}/searchplugins |
ac0ba341 JB |
470 | %if %{with xulrunner} |
471 | %{_libdir}/%{name}/xulrunner | |
472 | %else | |
a83161af | 473 | %{_libdir}/%{name}/dictionaries |
a83161af | 474 | %endif |
92cc635c | 475 | |
b2ee2cae JB |
476 | %{_pixmapsdir}/mozilla-thunderbird.png |
477 | %{_desktopdir}/mozilla-thunderbird.desktop | |
61ed1205 | 478 | |
92cc635c | 479 | %dir %{_datadir}/%{name} |
b2ee2cae | 480 | %{_datadir}/%{name}/extensions |
b2ee2cae JB |
481 | %{_datadir}/%{name}/searchplugins |
482 | ||
483 | %if %{with crashreporter} | |
484 | %attr(755,root,root) %{_libdir}/%{name}/crashreporter | |
485 | %{_libdir}/%{name}/crashreporter.ini | |
486 | %{_libdir}/%{name}/Throbber-small.gif | |
487 | %endif | |
92cc635c | 488 | |
aaf048fb ER |
489 | %dir %{_libdir}/%{name}/extensions |
490 | %{_libdir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd} | |
2a38f5ed | 491 | |
b2ee2cae JB |
492 | # files created by regxpcom -register |
493 | %ghost %{_libdir}/%{name}/components/compreg.dat | |
494 | %ghost %{_libdir}/%{name}/components/xpti.dat | |
495 | ||
496 | %if %{with lightning} | |
497 | %files addon-lightning | |
498 | %defattr(644,root,root,755) | |
499 | %dir %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103} | |
500 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/application.ini | |
501 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome | |
502 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome.manifest | |
503 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/defaults | |
504 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/install.rdf | |
505 | %dir %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components | |
506 | %attr(755,root,root) %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.so | |
507 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.js | |
508 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.manifest | |
509 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.xpt | |
510 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules | |
511 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js | |
512 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/timezones.sqlite | |
b2ee2cae JB |
513 | %endif |
514 | ||
92cc635c | 515 | %if %{with enigmail} |
2a38f5ed ER |
516 | %files addon-enigmail |
517 | %defattr(644,root,root,755) | |
0181851c | 518 | %dir %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5} |
0181851c | 519 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/defaults |
b2ee2cae | 520 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/chrome |
0181851c JB |
521 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/chrome.manifest |
522 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/install.rdf | |
b2ee2cae | 523 | %dir %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components |
b2ee2cae JB |
524 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components/*.xpt |
525 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components/*.js | |
d44f5419 JB |
526 | %dir %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/modules |
527 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/modules/*.jsm | |
528 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/modules/*.js | |
92cc635c | 529 | %endif |