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