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