]>
Commit | Line | Data |
---|---|---|
c4ddd260 | 1 | # TODO: |
c4ddd260 | 2 | # - separate spec for enigmail |
283702b9 | 3 | # - build with system mozldap |
c4ddd260 | 4 | # |
44be9ed4 | 5 | # Conditional builds |
6 | %bcond_without enigmail # don't build enigmail - GPG/PGP support | |
7 | %bcond_without gnomeui # disable gnomeui support | |
6458b220 | 8 | %bcond_without gnome # alias for gnomeui |
44be9ed4 | 9 | %bcond_without ldap # disable e-mail address lookups in LDAP directories |
e820c55e | 10 | %bcond_without lightning # disable Sunbird/Lightning calendar |
fac7e24d | 11 | %bcond_with xulrunner # system xulrunner |
765a3a27 | 12 | %bcond_with crashreporter # report crashes to crash-stats.mozilla.com |
88149483 | 13 | |
44be9ed4 | 14 | %if %{without gnome} |
15 | %undefine with_gnomeui | |
44be9ed4 | 16 | %endif |
88149483 | 17 | |
f4114a7f | 18 | %if 0%{?_enable_debug_packages} != 1 |
765a3a27 ER |
19 | %undefine crashreporter |
20 | %endif | |
21 | ||
a367af64 | 22 | %define enigmail_ver 1.5.1 |
9c1b9ad4 JR |
23 | %define nspr_ver 4.9.3 |
24 | %define nss_ver 3.14.1 | |
44be9ed4 | 25 | |
aaaf7356 | 26 | %define xulrunner_ver 2:17.0 |
4f34f106 | 27 | |
7d981f69 ER |
28 | %if %{without xulrunner} |
29 | # The actual sqlite version (see RHBZ#480989): | |
30 | %define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR) | |
31 | %endif | |
32 | ||
44be9ed4 | 33 | Summary: Icedove - email client |
34 | Summary(pl.UTF-8): Icedove - klient poczty | |
35 | Name: icedove | |
a367af64 JB |
36 | Version: 17.0.3 |
37 | Release: 1 | |
44be9ed4 | 38 | License: MPL 1.1 or GPL v2+ or LGPL v2.1+ |
75c0f419 | 39 | Group: X11/Applications/Networking |
cadfb931 | 40 | Source0: http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/thunderbird-%{version}.source.tar.bz2 |
a367af64 | 41 | # Source0-md5: 180f7768f6419182ea78eeb80da7f588 |
44be9ed4 | 42 | Source1: http://www.mozilla-enigmail.org/download/source/enigmail-%{enigmail_ver}.tar.gz |
a367af64 | 43 | # Source1-md5: 3e71f84ed2c11471282412ebe4f5eb2d |
44be9ed4 | 44 | Source2: %{name}-branding.tar.bz2 |
c105f759 | 45 | # Source2-md5: 2da351522bdd7f4a3bd8aaff4c776976 |
44be9ed4 | 46 | Source3: %{name}-rm_nonfree.sh |
47 | Source4: %{name}.desktop | |
48 | Source5: %{name}.sh | |
44be9ed4 | 49 | Patch0: %{name}-branding.patch |
faa5c89d | 50 | Patch1: %{name}-enigmail-shared.patch |
fac7e24d | 51 | Patch2: %{name}-system-xulrunner.patch |
faa5c89d SP |
52 | Patch3: %{name}-fonts.patch |
53 | Patch4: %{name}-install.patch | |
5e9bb798 | 54 | Patch5: %{name}-hunspell.patch |
faa5c89d | 55 | Patch6: %{name}-prefs.patch |
9a743685 | 56 | Patch7: system-mozldap.patch |
a85e0ecb | 57 | Patch8: %{name}-makefile.patch |
37973fb0 | 58 | Patch9: system-cairo.patch |
ccc206fe | 59 | Patch10: %{name}-extensiondir.patch |
765a3a27 | 60 | Patch11: crashreporter.patch |
268e7766 | 61 | Patch12: no-subshell.patch |
03be87a5 JR |
62 | # Edit patch below and restore --system-site-packages when system virtualenv gets 1.7 upgrade |
63 | Patch13: system-virtualenv.patch | |
13ed8387 | 64 | Patch14: gyp-slashism.patch |
5745d706 | 65 | URL: http://www.pld-linux.org/Packages/Icedove |
6458b220 | 66 | BuildRequires: GConf2-devel >= 1.2.1 |
51a3b6db | 67 | BuildRequires: alsa-lib-devel |
44be9ed4 | 68 | BuildRequires: automake |
51a3b6db | 69 | BuildRequires: bzip2-devel |
e820c55e JB |
70 | BuildRequires: cairo-devel >= 1.10 |
71 | BuildRequires: dbus-glib-devel >= 0.60 | |
44be9ed4 | 72 | BuildRequires: freetype-devel >= 1:2.1.8 |
6458b220 | 73 | BuildRequires: glib2-devel >= 2.0 |
e820c55e | 74 | BuildRequires: gtk+2-devel >= 2:2.10.0 |
5e9bb798 | 75 | BuildRequires: hunspell-devel |
44be9ed4 | 76 | BuildRequires: libIDL-devel >= 0.8.0 |
6458b220 | 77 | %{?with_gnomeui:BuildRequires: libgnome-devel >= 2.0} |
51a3b6db | 78 | %{?with_gnomeui:BuildRequires: libgnome-keyring-devel} |
44be9ed4 | 79 | %{?with_gnomeui:BuildRequires: libgnomeui-devel >= 2.2.0} |
51a3b6db | 80 | BuildRequires: libiw-devel |
e82da7a1 | 81 | # requires libjpeg-turbo implementing at least libjpeg 6b API |
44be9ed4 | 82 | BuildRequires: libjpeg-devel >= 6b |
e82da7a1 | 83 | BuildRequires: libjpeg-turbo-devel |
51a3b6db | 84 | BuildRequires: libnotify-devel >= 0.4 |
e820c55e | 85 | BuildRequires: libpng-devel >= 1.4.1 |
44be9ed4 | 86 | BuildRequires: libstdc++-devel |
f4114a7f ER |
87 | BuildRequires: nspr-devel >= 1:%{nspr_ver} |
88 | BuildRequires: nss-devel >= 1:%{nss_ver} | |
3815090b | 89 | BuildRequires: pango-devel >= 1:1.14.0 |
e820c55e | 90 | BuildRequires: perl-base >= 1:5.6 |
1c62cadb | 91 | BuildRequires: pkgconfig |
e820c55e | 92 | BuildRequires: python >= 1:2.5 |
44be9ed4 | 93 | BuildRequires: sed >= 4.0 |
9d1bfad8 | 94 | BuildRequires: sqlite3-devel >= 3.7.4 |
1c62cadb | 95 | BuildRequires: startup-notification-devel >= 0.8 |
44be9ed4 | 96 | BuildRequires: xorg-lib-libXext-devel |
44be9ed4 | 97 | BuildRequires: xorg-lib-libXinerama-devel |
44be9ed4 | 98 | BuildRequires: xorg-lib-libXt-devel |
5745d706 | 99 | BuildRequires: yasm |
1c62cadb | 100 | BuildRequires: zip |
7d981f69 | 101 | %if %{with xulrunner} |
e8326f77 | 102 | BuildRequires: xulrunner-devel >= %{xulrunner_ver} |
7d981f69 | 103 | %else |
44be9ed4 | 104 | Requires: myspell-common |
f4114a7f ER |
105 | Requires: nspr >= 1:%{nspr_ver} |
106 | Requires: nss >= 1:%{nss_ver} | |
4b6bc367 | 107 | Requires: sqlite3 >= %{sqlite_build_version} |
7d981f69 | 108 | %endif |
4f34f106 ER |
109 | Requires(post): mktemp >= 1.5-18 |
110 | %if %{with xulrunner} | |
111 | %requires_eq_to xulrunner xulrunner-devel | |
112 | %endif | |
e82da7a1 | 113 | Requires: libjpeg-turbo |
44be9ed4 | 114 | Obsoletes: mozilla-thunderbird |
115 | Obsoletes: mozilla-thunderbird-dictionary-en-US | |
d606e9b3 | 116 | Conflicts: icedove-lang-resources < %{version} |
44be9ed4 | 117 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
118 | ||
9e366f18 AM |
119 | %define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+ |
120 | ||
44be9ed4 | 121 | # iceweasel/icedove/iceape provide their own versions |
44be9ed4 | 122 | %define _noautoprovfiles %{_libdir}/%{name}/components |
fb7d4f06 JB |
123 | %if %{without xulrunner} |
124 | # we don't want these to satisfy packages depending on xulrunner | |
125 | %define _noautoprov libmozalloc.so libxpcom.so libxul.so | |
44be9ed4 | 126 | # and as we don't provide them, don't require either |
fb7d4f06 JB |
127 | %define _noautoreq libmozalloc.so libxpcom.so libxul.so |
128 | %endif | |
44be9ed4 | 129 | |
9e7875fc ER |
130 | %define topdir %{_builddir}/%{name}-%{version} |
131 | %define objdir %{topdir}/obj-%{_target_cpu} | |
132 | ||
44be9ed4 | 133 | %description |
6b327de6 | 134 | Icedove is an open-source, fast and portable email client. |
44be9ed4 | 135 | |
136 | %description -l pl.UTF-8 | |
6b327de6 JB |
137 | Icedove jest mającym otwarte źródła, szybkim i przenośnym klientem |
138 | poczty. | |
44be9ed4 | 139 | |
6578c165 | 140 | %package addon-lightning |
141 | Summary: An integrated calendar for Icedove | |
142 | Summary(pl.UTF-8): Zintegrowany kalendarz dla Icedove | |
143 | License: MPL 1.1 or GPL v2+ or LGPL v2.1+ | |
144 | Group: Applications/Networking | |
145 | Requires: %{name} = %{version}-%{release} | |
146 | ||
147 | %description addon-lightning | |
148 | Lightning is an calendar extension to Icedove email client. | |
149 | ||
150 | %description addon-lightning -l pl.UTF-8 | |
151 | Lightning to rozszerzenie do klienta poczty Icedove dodające | |
152 | funkcjonalność kalendarza. | |
153 | ||
44be9ed4 | 154 | %package addon-enigmail |
155 | Summary: Extension for the authentication and encryption features provided by GnuPG | |
156 | Summary(pl.UTF-8): Rozszerzenie do uwierzytelniania i szyfrowania zapewnianego przez GnuPG | |
157 | License: MPL/LGPL | |
158 | Group: Applications/Networking | |
159 | URL: http://enigmail.mozdev.org/ | |
cd056caa | 160 | Requires: %{name} = %{version}-%{release} |
d076d93e | 161 | Requires: gnupg |
75991bbb | 162 | Obsoletes: mozilla-thunderbird-addon-enigmail |
44be9ed4 | 163 | |
164 | %description addon-enigmail | |
c5e06599 | 165 | Enigmail is an extension to the Icedove mail client which allows users |
166 | to access the authentication and encryption features provided by | |
167 | GnuPG. | |
44be9ed4 | 168 | |
169 | Main Features: | |
170 | - Encrypt/sign mail when sending, decrypt/authenticate received mail | |
171 | - Support for inline-PGP (RFC 2440) and PGP/MIME (RFC 3156) | |
172 | - Per-Account based encryption and signing defaults | |
173 | - Per-Recipient rules for automated key selection, and | |
174 | enabling/disabling encryption and signing | |
175 | - OpenPGP key management interface | |
176 | ||
177 | %description addon-enigmail -l pl.UTF-8 | |
c5e06599 | 178 | Enigmail to rozszerzenie klienta pocztowego Icedove pozwalające |
faa5c89d SP |
179 | użytkownikom na dostęp do uwierzytelniania i szyfrowania zapewnianego |
180 | przez GnuPG. | |
44be9ed4 | 181 | |
182 | Główne możliwości: | |
183 | - szyfrowanie/podpisywanie poczty przy wysyłaniu, | |
184 | odszyfrowywanie/uwierzytelnianie poczty odebranej | |
185 | - obsługa inline-PGP (RFC 2440) i PGP/MIME (RFC 3156) | |
186 | - ustawienia domyślne szyfrowania i podpisywania dla każdego konta | |
187 | - reguły automatycznego wyboru kluczy i włączenia szyfrowania oraz | |
188 | podpisywania dla każdego adresata | |
189 | - interfejs do zarządzania kluczami OpenPGP | |
190 | ||
191 | %prep | |
983562b1 | 192 | %setup -qc |
a367af64 | 193 | mv comm-esr17 mozilla |
983562b1 | 194 | %setup -q -T -D -a2 |
195 | cd mozilla | |
1c70899a | 196 | %{?with_enigmail:%{__gzip} -dc %{SOURCE1} | %{__tar} -xf - -C mailnews/extensions} |
44be9ed4 | 197 | /bin/sh %{SOURCE3} |
983562b1 | 198 | %patch0 -p1 |
faa5c89d | 199 | %{?with_enigmail:%patch1 -p1} |
73d54cb2 | 200 | %{?with_xulrunner:%patch2 -p1} |
4ccc2157 | 201 | %patch3 -p1 |
faa5c89d | 202 | %patch4 -p1 |
983562b1 | 203 | %patch6 -p1 |
9a743685 | 204 | %patch7 -p1 |
f4114a7f | 205 | %patch8 -p2 |
3815090b | 206 | %patch9 -p1 |
ccc206fe | 207 | %patch10 -p2 |
765a3a27 | 208 | %patch11 -p2 |
268e7766 | 209 | %patch12 -p1 |
03be87a5 | 210 | %patch13 -p1 |
13ed8387 | 211 | %patch14 -p1 |
44be9ed4 | 212 | |
213 | %build | |
983562b1 | 214 | cd mozilla |
cadfb931 SP |
215 | cp -f %{_datadir}/automake/config.* mozilla/build/autoconf |
216 | cp -f %{_datadir}/automake/config.* mozilla/nsprpub/build/autoconf | |
f4114a7f | 217 | cp -f %{_datadir}/automake/config.* ldap/sdks/c-sdk/config/autoconf |
44be9ed4 | 218 | |
fbac75ca | 219 | cat << EOF > .mozconfig |
9e7875fc | 220 | mk_add_options MOZ_OBJDIR=%{objdir} |
cb0e4412 | 221 | |
fac7e24d | 222 | export CFLAGS="%{rpmcflags}" |
73d54cb2 | 223 | export CXXFLAGS="%{rpmcflags}" |
765a3a27 ER |
224 | |
225 | %if %{with crashreporter} | |
226 | export MOZ_DEBUG_SYMBOLS=1 | |
227 | %endif | |
228 | ||
59c5a0e8 | 229 | # Options for 'configure' (same as command-line options). |
44be9ed4 | 230 | ac_add_options --prefix=%{_prefix} |
231 | ac_add_options --exec-prefix=%{_exec_prefix} | |
232 | ac_add_options --bindir=%{_bindir} | |
233 | ac_add_options --sbindir=%{_sbindir} | |
234 | ac_add_options --sysconfdir=%{_sysconfdir} | |
235 | ac_add_options --datadir=%{_datadir} | |
236 | ac_add_options --includedir=%{_includedir} | |
237 | ac_add_options --libdir=%{_libdir} | |
238 | ac_add_options --libexecdir=%{_libexecdir} | |
239 | ac_add_options --localstatedir=%{_localstatedir} | |
240 | ac_add_options --sharedstatedir=%{_sharedstatedir} | |
241 | ac_add_options --mandir=%{_mandir} | |
242 | ac_add_options --infodir=%{_infodir} | |
243 | %if %{?debug:1}0 | |
59c5a0e8 | 244 | ac_add_options --disable-optimize |
44be9ed4 | 245 | ac_add_options --enable-debug |
246 | ac_add_options --enable-debug-modules | |
59c5a0e8 SP |
247 | ac_add_options --enable-debugger-info-modules |
248 | ac_add_options --enable-crash-on-assert | |
44be9ed4 | 249 | %else |
250 | ac_add_options --disable-debug | |
251 | ac_add_options --disable-debug-modules | |
59c5a0e8 SP |
252 | ac_add_options --disable-logging |
253 | ac_add_options --enable-optimize="%{rpmcflags} -Os" | |
44be9ed4 | 254 | %endif |
88149483 ER |
255 | ac_add_options --disable-strip |
256 | ac_add_options --disable-strip-libs | |
44be9ed4 | 257 | %if %{with tests} |
258 | ac_add_options --enable-tests | |
259 | %else | |
260 | ac_add_options --disable-tests | |
261 | %endif | |
6458b220 | 262 | ac_add_options --enable-gio |
44be9ed4 | 263 | %if %{with gnomeui} |
264 | ac_add_options --enable-gnomeui | |
265 | %else | |
266 | ac_add_options --disable-gnomeui | |
267 | %endif | |
44be9ed4 | 268 | ac_add_options --disable-gnomevfs |
44be9ed4 | 269 | %if %{with ldap} |
270 | ac_add_options --enable-ldap | |
9a743685 | 271 | ac_add_options --with-system-ldap |
44be9ed4 | 272 | %else |
273 | ac_add_options --disable-ldap | |
274 | %endif | |
765a3a27 ER |
275 | %if %{with crashreporter} |
276 | ac_add_options --enable-crashreporter | |
277 | %else | |
59c5a0e8 | 278 | ac_add_options --disable-crashreporter |
765a3a27 | 279 | %endif |
59c5a0e8 | 280 | ac_add_options --disable-xterm-updates |
59c5a0e8 | 281 | ac_add_options --enable-postscript |
d076d93e | 282 | %if %{with lightning} |
cb0e4412 | 283 | ac_add_options --enable-calendar |
d076d93e SP |
284 | %else |
285 | ac_add_options --disable-calendar | |
286 | %endif | |
44be9ed4 | 287 | ac_add_options --disable-installer |
88149483 | 288 | ac_add_options --disable-updater |
44be9ed4 | 289 | ac_add_options --disable-xprint |
cadfb931 SP |
290 | ac_add_options --disable-permissions |
291 | ac_add_options --disable-pref-extensions | |
44be9ed4 | 292 | ac_add_options --enable-canvas |
293 | ac_add_options --enable-crypto | |
44be9ed4 | 294 | ac_add_options --enable-mathml |
44be9ed4 | 295 | ac_add_options --enable-pango |
296 | ac_add_options --enable-reorder | |
88149483 ER |
297 | ac_add_options --enable-startup-notification |
298 | ac_add_options --enable-svg | |
44be9ed4 | 299 | ac_add_options --enable-system-cairo |
5e9bb798 | 300 | ac_add_options --enable-system-hunspell |
7d981f69 | 301 | ac_add_options --enable-system-sqlite |
44be9ed4 | 302 | ac_add_options --enable-xft |
cadfb931 SP |
303 | ac_add_options --enable-application=mail |
304 | ac_add_options --enable-default-toolkit=cairo-gtk2 | |
44be9ed4 | 305 | ac_add_options --enable-xinerama |
88149483 ER |
306 | ac_add_options --with-distribution-id=org.pld-linux |
307 | ac_add_options --with-branding=icedove/branding | |
308 | %if %{with xulrunner} | |
fac7e24d JB |
309 | ac_add_options --enable-shared-js |
310 | ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul) | |
f4114a7f | 311 | ac_add_options --with-system-libxul |
88149483 ER |
312 | %endif |
313 | ac_add_options --with-pthreads | |
314 | ac_add_options --with-system-bz2 | |
44be9ed4 | 315 | ac_add_options --with-system-jpeg |
316 | ac_add_options --with-system-nspr | |
317 | ac_add_options --with-system-nss | |
318 | ac_add_options --with-system-png | |
319 | ac_add_options --with-system-zlib | |
44be9ed4 | 320 | ac_add_options --enable-single-profile |
321 | ac_add_options --disable-profilesharing | |
44be9ed4 | 322 | ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name} |
323 | EOF | |
324 | ||
90e998ba | 325 | %{__make} -j1 -f client.mk build \ |
d076d93e | 326 | STRIP="/bin/true" \ |
765a3a27 | 327 | MOZ_MAKE_FLAGS="%{?_smp_mflags}" \ |
de09c00d | 328 | XLIBS="-lX11 -lXt" \ |
d076d93e | 329 | CC="%{__cc}" \ |
44be9ed4 | 330 | CXX="%{__cxx}" |
331 | ||
765a3a27 ER |
332 | %if %{with crashreporter} |
333 | # create debuginfo for crash-stats.mozilla.com | |
334 | %{__make} -j1 -C obj-%{_target_cpu} buildsymbols | |
335 | %endif | |
336 | ||
44be9ed4 | 337 | %if %{with enigmail} |
59c5a0e8 | 338 | cd mailnews/extensions/enigmail |
9e7875fc ER |
339 | ./makemake -r -o %{objdir} |
340 | %{__make} -C %{objdir}/mailnews/extensions/enigmail \ | |
d076d93e SP |
341 | STRIP="/bin/true" \ |
342 | CC="%{__cc}" \ | |
343 | CXX="%{__cxx}" | |
916d4050 JR |
344 | |
345 | %{__make} -C %{objdir}/mailnews/extensions/enigmail xpi \ | |
346 | STRIP="/bin/true" \ | |
347 | CC="%{__cc}" \ | |
348 | CXX="%{__cxx}" | |
44be9ed4 | 349 | %endif |
350 | ||
351 | %install | |
352 | rm -rf $RPM_BUILD_ROOT | |
765a3a27 | 353 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name},%{_datadir}/%{name},%{_pixmapsdir},%{_desktopdir}} |
44be9ed4 | 354 | |
9e7875fc | 355 | cd %{objdir} |
ecf04393 | 356 | %{__make} -C mail/installer stage-package \ |
44be9ed4 | 357 | DESTDIR=$RPM_BUILD_ROOT \ |
0516fc42 | 358 | MOZ_PKG_DIR=%{_libdir}/%{name} \ |
44be9ed4 | 359 | PKG_SKIP_STRIP=1 |
360 | ||
9b40a2c3 JB |
361 | %if %{with xulrunner} |
362 | # needed to find mozilla runtime | |
363 | ln -s ../xulrunner $RPM_BUILD_ROOT%{_libdir}/%{name}/xulrunner | |
364 | %endif | |
365 | ||
366 | # Enable crash reporter for Thunderbird application | |
765a3a27 ER |
367 | %if %{with crashreporter} |
368 | %{__sed} -i -e 's/\[Crash Reporter\]/[Crash Reporter]\nEnabled=1/' $RPM_BUILD_ROOT%{_libdir}/%{name}/application.ini | |
369 | ||
370 | # Add debuginfo for crash-stats.mozilla.com | |
51a3b6db | 371 | install -d $RPM_BUILD_ROOT%{_exec_prefix}/lib/debug%{_libdir}/%{name} |
765a3a27 ER |
372 | cp -a mozilla/dist/%{name}-%{version}.en-US.linux-*.crashreporter-symbols.zip $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/%{name} |
373 | %endif | |
374 | ||
ecf04393 ER |
375 | # copy manually lightning files, somewhy they are not installed by make |
376 | cp -a mozilla/dist/bin/extensions/calendar-timezones@mozilla.org \ | |
377 | mozilla/dist/bin/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103} \ | |
378 | $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions | |
379 | ||
44be9ed4 | 380 | # move arch independant ones to datadir |
381 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome | |
382 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults | |
44be9ed4 | 383 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/isp $RPM_BUILD_ROOT%{_datadir}/%{name}/isp |
9e097178 | 384 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/modules $RPM_BUILD_ROOT%{_datadir}/%{name}/modules |
eca54e0f | 385 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins $RPM_BUILD_ROOT%{_datadir}/%{name}/searchplugins |
44be9ed4 | 386 | ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome |
387 | ln -s ../../share/%{name}/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults | |
44be9ed4 | 388 | ln -s ../../share/%{name}/isp $RPM_BUILD_ROOT%{_libdir}/%{name}/isp |
9e097178 | 389 | ln -s ../../share/%{name}/modules $RPM_BUILD_ROOT%{_libdir}/%{name}/modules |
eca54e0f | 390 | ln -s ../../share/%{name}/searchplugins $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins |
73d54cb2 JB |
391 | %if %{without xulrunner} |
392 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/res $RPM_BUILD_ROOT%{_datadir}/%{name}/res | |
393 | ln -s ../../share/%{name}/res $RPM_BUILD_ROOT%{_libdir}/%{name}/res | |
394 | %endif | |
44be9ed4 | 395 | |
c6ec3c1c ER |
396 | # dir for arch independant extensions besides arch dependant extensions |
397 | # see mozilla/xpcom/build/nsXULAppAPI.h | |
398 | # XRE_SYS_LOCAL_EXTENSION_PARENT_DIR and XRE_SYS_SHARE_EXTENSION_PARENT_DIR | |
399 | install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions | |
400 | ||
73d54cb2 | 401 | %if %{without xulrunner} |
63d8f5c3 | 402 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries |
44be9ed4 | 403 | ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries |
e6bc19b3 ER |
404 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/hyphenation |
405 | ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/hyphenation | |
73d54cb2 | 406 | %endif |
e6bc19b3 | 407 | |
0889474f JR |
408 | %{__sed} -e "s|%MOZAPPDIR%|%{_libdir}/%{name}|" \ |
409 | -e "s|%MOZ_APP_DISPLAYNAME%|Icedove|" \ | |
410 | %{topdir}/mozilla/mozilla/build/unix/mozilla.in > $RPM_BUILD_ROOT%{_libdir}/%{name}/icedove | |
411 | ||
44be9ed4 | 412 | %{__sed} -e 's,@LIBDIR@,%{_libdir},' %{SOURCE5} > $RPM_BUILD_ROOT%{_bindir}/icedove |
413 | ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/thunderbird | |
414 | ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/mozilla-thunderbird | |
415 | ||
52f5507d ER |
416 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop |
417 | cp -p %{topdir}/mozilla/icedove/branding/content/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png | |
44be9ed4 | 418 | |
e8f4ba81 | 419 | # files created by regxpcom -register in post |
52fc61e6 ER |
420 | touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat |
421 | touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat | |
e8f4ba81 ER |
422 | cat << 'EOF' > $RPM_BUILD_ROOT%{_libdir}/%{name}/register |
423 | #!/bin/sh | |
424 | umask 022 | |
425 | # make temporary HOME, as it attempts to touch files in $HOME/.mozilla | |
426 | # dangerous if you run this with sudo with keep_env += HOME | |
427 | # also TMPDIR could be pointing to sudo user's homedir so we reset that too. | |
428 | t=$(mktemp -d) | |
d50a2a28 | 429 | %{__rm} -f %{_libdir}/%{name}/components/{compreg,xpti}.dat |
e8f4ba81 ER |
430 | TMPDIR= TMP= HOME=$t %{_libdir}/%{name}/icedove -register |
431 | rm -rf $t | |
432 | EOF | |
433 | chmod a+rx $RPM_BUILD_ROOT%{_libdir}/%{name}/register | |
52fc61e6 | 434 | |
44be9ed4 | 435 | %if %{with enigmail} |
283702b9 | 436 | ext_dir=$RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/\{847b3a00-7ab1-11d4-8f02-006008948af5\} |
916d4050 | 437 | install -d $ext_dir/{chrome,components,defaults/preferences,modules} |
52fc61e6 | 438 | cd mozilla/dist/bin |
916d4050 | 439 | cp -rfLp chrome/enigmail.jar $ext_dir/chrome |
52fc61e6 ER |
440 | cp -rfLp components/enig* $ext_dir/components |
441 | cp -rfLp components/libenigmime.so $ext_dir/components | |
52fc61e6 | 442 | cp -rfLp defaults/preferences/enigmail.js $ext_dir/defaults/preferences |
de09c00d | 443 | cp -rfLp modules/{commonFuncs,enigmailCommon,keyManagement,pipeConsole,subprocess}.jsm $ext_dir/modules |
916d4050 | 444 | cp -rfLp modules/{subprocess_worker_unix,subprocess_worker_win}.js $ext_dir/modules |
52fc61e6 | 445 | cd - |
52f5507d ER |
446 | cp -p %{topdir}/mozilla/mailnews/extensions/enigmail/package/install.rdf $ext_dir |
447 | cp -p %{topdir}/mozilla/mailnews/extensions/enigmail/package/chrome.manifest $ext_dir/chrome.manifest | |
44be9ed4 | 448 | %endif |
449 | ||
9cdc8923 ER |
450 | # never package these. always remove |
451 | # nss | |
452 | %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{freebl3,nss3,nssckbi,nssdbm3,nssutil3,smime3,softokn3,ssl3}.* | |
453 | # nspr | |
454 | %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{nspr4,plc4,plds4}.so | |
283702b9 | 455 | # mozldap |
9cdc8923 | 456 | %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{ldap,ldif,prldap,ssldap}60.so |
3815090b ER |
457 | # testpilot quiz |
458 | %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/%{name}/distribution/extensions/tbtestpilot@labs.mozilla.com.xpi | |
283702b9 | 459 | |
44be9ed4 | 460 | %clean |
461 | rm -rf $RPM_BUILD_ROOT | |
462 | ||
463 | %pretrans | |
464 | if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then | |
465 | mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave} | |
466 | fi | |
eca54e0f | 467 | for d in chrome defaults icons isp modules res searchplugins; do |
44be9ed4 | 468 | if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then |
469 | install -d %{_datadir}/%{name} | |
470 | mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d | |
471 | fi | |
472 | done | |
473 | exit 0 | |
474 | ||
e8f4ba81 ER |
475 | %post |
476 | %{_libdir}/%{name}/register || : | |
477 | ||
44be9ed4 | 478 | %files |
479 | %defattr(644,root,root,755) | |
480 | %attr(755,root,root) %{_bindir}/icedove | |
481 | %attr(755,root,root) %{_bindir}/mozilla-thunderbird | |
482 | %attr(755,root,root) %{_bindir}/thunderbird | |
483 | %dir %{_libdir}/%{name} | |
765a3a27 | 484 | %{_libdir}/%{name}/application.ini |
6b327de6 JB |
485 | %{_libdir}/%{name}/blocklist.xml |
486 | %{_libdir}/%{name}/chrome.manifest | |
44be9ed4 | 487 | %dir %{_libdir}/%{name}/components |
44be9ed4 | 488 | %{_libdir}/%{name}/components/*.js |
489 | %{_libdir}/%{name}/components/*.xpt | |
6b327de6 JB |
490 | %{_libdir}/%{name}/components/components.manifest |
491 | %{_libdir}/%{name}/components/interfaces.manifest | |
73d54cb2 JB |
492 | %attr(755,root,root) %{_libdir}/%{name}/*.sh |
493 | %attr(755,root,root) %{_libdir}/%{name}/*-bin | |
494 | %attr(755,root,root) %{_libdir}/%{name}/icedove | |
495 | %attr(755,root,root) %{_libdir}/%{name}/register | |
496 | %if %{without xulrunner} | |
a367af64 | 497 | %{_libdir}/%{name}/dependentlibs.list |
73d54cb2 JB |
498 | %{_libdir}/%{name}/platform.ini |
499 | %{_libdir}/%{name}/greprefs.js | |
500 | %attr(755,root,root) %{_libdir}/%{name}/components/*.so | |
0516fc42 | 501 | %attr(755,root,root) %{_libdir}/%{name}/libmozalloc.so |
283702b9 | 502 | %attr(755,root,root) %{_libdir}/%{name}/libxpcom.so |
0516fc42 | 503 | %attr(755,root,root) %{_libdir}/%{name}/libxul.so |
44be9ed4 | 504 | %attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client |
cf62736e | 505 | %attr(755,root,root) %{_libdir}/%{name}/plugin-container |
73d54cb2 | 506 | %endif |
44be9ed4 | 507 | |
508 | # symlinks | |
509 | %{_libdir}/%{name}/chrome | |
510 | %{_libdir}/%{name}/defaults | |
44be9ed4 | 511 | %{_libdir}/%{name}/isp |
9e097178 | 512 | %{_libdir}/%{name}/modules |
eca54e0f | 513 | %{_libdir}/%{name}/searchplugins |
9b40a2c3 JB |
514 | %if %{with xulrunner} |
515 | %{_libdir}/%{name}/xulrunner | |
516 | %else | |
73d54cb2 JB |
517 | %{_libdir}/%{name}/dictionaries |
518 | %{_libdir}/%{name}/hyphenation | |
519 | %{_libdir}/%{name}/res | |
520 | %endif | |
44be9ed4 | 521 | |
224cf96a JB |
522 | %{_pixmapsdir}/icedove.png |
523 | %{_desktopdir}/icedove.desktop | |
44be9ed4 | 524 | |
525 | %dir %{_datadir}/%{name} | |
526 | %{_datadir}/%{name}/chrome | |
527 | %{_datadir}/%{name}/defaults | |
eca54e0f | 528 | %{_datadir}/%{name}/extensions |
44be9ed4 | 529 | %{_datadir}/%{name}/isp |
9e097178 | 530 | %{_datadir}/%{name}/modules |
916d4050 JR |
531 | %if %{with enigmail} |
532 | %exclude %{_datadir}/%{name}/modules/commonFuncs.jsm | |
533 | %exclude %{_datadir}/%{name}/modules/enigmailCommon.jsm | |
534 | %exclude %{_datadir}/%{name}/modules/keyManagement.jsm | |
535 | %exclude %{_datadir}/%{name}/modules/pipeConsole.jsm | |
916d4050 JR |
536 | %exclude %{_datadir}/%{name}/modules/subprocess.jsm |
537 | %exclude %{_datadir}/%{name}/modules/subprocess_worker_unix.js | |
538 | %exclude %{_datadir}/%{name}/modules/subprocess_worker_win.js | |
539 | %endif | |
eca54e0f | 540 | %{_datadir}/%{name}/searchplugins |
73d54cb2 JB |
541 | %if %{without xulrunner} |
542 | %{_datadir}/%{name}/res | |
543 | %endif | |
44be9ed4 | 544 | |
765a3a27 ER |
545 | %if %{with crashreporter} |
546 | %attr(755,root,root) %{_libdir}/%{name}/crashreporter | |
547 | %{_libdir}/%{name}/crashreporter.ini | |
548 | %{_libdir}/%{name}/Throbber-small.gif | |
549 | %endif | |
550 | ||
44be9ed4 | 551 | %dir %{_libdir}/%{name}/extensions |
552 | %{_libdir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd} | |
6578c165 | 553 | |
52fc61e6 ER |
554 | # files created by regxpcom -register |
555 | %ghost %{_libdir}/%{name}/components/compreg.dat | |
556 | %ghost %{_libdir}/%{name}/components/xpti.dat | |
557 | ||
6578c165 | 558 | %if %{with lightning} |
559 | %files addon-lightning | |
560 | %defattr(644,root,root,755) | |
f3b6d696 | 561 | %dir %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103} |
cf62736e | 562 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/application.ini |
f3b6d696 ER |
563 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome |
564 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome.manifest | |
cf62736e | 565 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/defaults |
f3b6d696 ER |
566 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/install.rdf |
567 | %dir %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components | |
568 | %attr(755,root,root) %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.so | |
f3b6d696 | 569 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.js |
cf62736e JB |
570 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.manifest |
571 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.xpt | |
f3b6d696 ER |
572 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules |
573 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js | |
574 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/timezones.sqlite | |
6578c165 | 575 | %{_libdir}/%{name}/extensions/calendar-timezones@mozilla.org |
576 | %endif | |
44be9ed4 | 577 | |
578 | %if %{with enigmail} | |
579 | %files addon-enigmail | |
580 | %defattr(644,root,root,755) | |
f6a43e2f ER |
581 | %dir %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5} |
582 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/defaults | |
583 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/chrome | |
584 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/chrome.manifest | |
585 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/install.rdf | |
586 | %dir %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components | |
587 | %attr(755,root,root) %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components/*.so | |
588 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components/*.xpt | |
589 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components/*.js | |
916d4050 JR |
590 | %dir %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/modules |
591 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/modules/*.jsm | |
592 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/modules/*.js | |
44be9ed4 | 593 | %endif |