]>
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 | ||
c0baf171 | 22 | %define enigmail_ver 1.4.1 |
64b4570d JB |
23 | %define nspr_ver 4.9 |
24 | %define nss_ver 3.13.3 | |
44be9ed4 | 25 | |
5297cd2e | 26 | %define xulrunner_ver 12.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 | |
c0baf171 | 36 | Version: 12.0.1 |
3815090b | 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 |
c0baf171 | 41 | # Source0-md5: 64cacde4cb2b1e8736f1c3a0ea6a02db |
44be9ed4 | 42 | Source1: http://www.mozilla-enigmail.org/download/source/enigmail-%{enigmail_ver}.tar.gz |
c0baf171 | 43 | # Source1-md5: 0eba75fbcf8f0bb32d538df102fbb8e9 |
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 |
3815090b ER |
58 | # this is only workaround, check if it is fixed with newer firefox |
59 | Patch9: bug-722975-workaround.patch | |
ccc206fe | 60 | Patch10: %{name}-extensiondir.patch |
765a3a27 | 61 | Patch11: crashreporter.patch |
268e7766 | 62 | Patch12: no-subshell.patch |
5745d706 | 63 | URL: http://www.pld-linux.org/Packages/Icedove |
6458b220 | 64 | BuildRequires: GConf2-devel >= 1.2.1 |
51a3b6db | 65 | BuildRequires: alsa-lib-devel |
44be9ed4 | 66 | BuildRequires: automake |
51a3b6db | 67 | BuildRequires: bzip2-devel |
e820c55e JB |
68 | BuildRequires: cairo-devel >= 1.10 |
69 | BuildRequires: dbus-glib-devel >= 0.60 | |
44be9ed4 | 70 | BuildRequires: freetype-devel >= 1:2.1.8 |
6458b220 | 71 | BuildRequires: glib2-devel >= 2.0 |
e820c55e | 72 | BuildRequires: gtk+2-devel >= 2:2.10.0 |
5e9bb798 | 73 | BuildRequires: hunspell-devel |
44be9ed4 | 74 | BuildRequires: libIDL-devel >= 0.8.0 |
6458b220 | 75 | %{?with_gnomeui:BuildRequires: libgnome-devel >= 2.0} |
51a3b6db | 76 | %{?with_gnomeui:BuildRequires: libgnome-keyring-devel} |
44be9ed4 | 77 | %{?with_gnomeui:BuildRequires: libgnomeui-devel >= 2.2.0} |
51a3b6db | 78 | BuildRequires: libiw-devel |
44be9ed4 | 79 | BuildRequires: libjpeg-devel >= 6b |
51a3b6db | 80 | BuildRequires: libnotify-devel >= 0.4 |
e820c55e | 81 | BuildRequires: libpng-devel >= 1.4.1 |
44be9ed4 | 82 | BuildRequires: libstdc++-devel |
f4114a7f ER |
83 | BuildRequires: nspr-devel >= 1:%{nspr_ver} |
84 | BuildRequires: nss-devel >= 1:%{nss_ver} | |
3815090b | 85 | BuildRequires: pango-devel >= 1:1.14.0 |
e820c55e | 86 | BuildRequires: perl-base >= 1:5.6 |
1c62cadb | 87 | BuildRequires: pkgconfig |
e820c55e | 88 | BuildRequires: python >= 1:2.5 |
44be9ed4 | 89 | BuildRequires: sed >= 4.0 |
9d1bfad8 | 90 | BuildRequires: sqlite3-devel >= 3.7.4 |
1c62cadb | 91 | BuildRequires: startup-notification-devel >= 0.8 |
44be9ed4 | 92 | BuildRequires: xorg-lib-libXext-devel |
44be9ed4 | 93 | BuildRequires: xorg-lib-libXinerama-devel |
44be9ed4 | 94 | BuildRequires: xorg-lib-libXt-devel |
5745d706 | 95 | BuildRequires: yasm |
1c62cadb | 96 | BuildRequires: zip |
7d981f69 | 97 | %if %{with xulrunner} |
4f34f106 | 98 | BuildRequires: xulrunner-devel >= 2:%{xulrunner_ver} |
7d981f69 | 99 | %else |
44be9ed4 | 100 | Requires: myspell-common |
f4114a7f ER |
101 | Requires: nspr >= 1:%{nspr_ver} |
102 | Requires: nss >= 1:%{nss_ver} | |
4b6bc367 | 103 | Requires: sqlite3 >= %{sqlite_build_version} |
7d981f69 | 104 | %endif |
4f34f106 ER |
105 | Requires(post): mktemp >= 1.5-18 |
106 | %if %{with xulrunner} | |
107 | %requires_eq_to xulrunner xulrunner-devel | |
108 | %endif | |
44be9ed4 | 109 | Obsoletes: mozilla-thunderbird |
110 | Obsoletes: mozilla-thunderbird-dictionary-en-US | |
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 |
f4114a7f | 187 | mv comm-release 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} |
73d54cb2 | 194 | %{?with_xulrunner:%patch2 -p1} |
4ccc2157 | 195 | %patch3 -p1 |
faa5c89d | 196 | %patch4 -p1 |
983562b1 | 197 | %patch6 -p1 |
9a743685 | 198 | %patch7 -p1 |
f4114a7f | 199 | %patch8 -p2 |
3815090b ER |
200 | cd mozilla |
201 | %patch9 -p1 | |
202 | cd - | |
ccc206fe | 203 | %patch10 -p2 |
765a3a27 | 204 | %patch11 -p2 |
268e7766 | 205 | %patch12 -p1 |
44be9ed4 | 206 | |
207 | %build | |
983562b1 | 208 | cd mozilla |
cadfb931 SP |
209 | cp -f %{_datadir}/automake/config.* mozilla/build/autoconf |
210 | cp -f %{_datadir}/automake/config.* mozilla/nsprpub/build/autoconf | |
f4114a7f | 211 | cp -f %{_datadir}/automake/config.* ldap/sdks/c-sdk/config/autoconf |
44be9ed4 | 212 | |
fbac75ca | 213 | cat << EOF > .mozconfig |
9e7875fc | 214 | mk_add_options MOZ_OBJDIR=%{objdir} |
cb0e4412 | 215 | |
fac7e24d | 216 | export CFLAGS="%{rpmcflags}" |
73d54cb2 | 217 | export CXXFLAGS="%{rpmcflags}" |
765a3a27 ER |
218 | |
219 | %if %{with crashreporter} | |
220 | export MOZ_DEBUG_SYMBOLS=1 | |
221 | %endif | |
222 | ||
59c5a0e8 | 223 | # Options for 'configure' (same as command-line options). |
44be9ed4 | 224 | ac_add_options --prefix=%{_prefix} |
225 | ac_add_options --exec-prefix=%{_exec_prefix} | |
226 | ac_add_options --bindir=%{_bindir} | |
227 | ac_add_options --sbindir=%{_sbindir} | |
228 | ac_add_options --sysconfdir=%{_sysconfdir} | |
229 | ac_add_options --datadir=%{_datadir} | |
230 | ac_add_options --includedir=%{_includedir} | |
231 | ac_add_options --libdir=%{_libdir} | |
232 | ac_add_options --libexecdir=%{_libexecdir} | |
233 | ac_add_options --localstatedir=%{_localstatedir} | |
234 | ac_add_options --sharedstatedir=%{_sharedstatedir} | |
235 | ac_add_options --mandir=%{_mandir} | |
236 | ac_add_options --infodir=%{_infodir} | |
237 | %if %{?debug:1}0 | |
59c5a0e8 | 238 | ac_add_options --disable-optimize |
44be9ed4 | 239 | ac_add_options --enable-debug |
240 | ac_add_options --enable-debug-modules | |
59c5a0e8 SP |
241 | ac_add_options --enable-debugger-info-modules |
242 | ac_add_options --enable-crash-on-assert | |
44be9ed4 | 243 | %else |
244 | ac_add_options --disable-debug | |
245 | ac_add_options --disable-debug-modules | |
59c5a0e8 SP |
246 | ac_add_options --disable-logging |
247 | ac_add_options --enable-optimize="%{rpmcflags} -Os" | |
44be9ed4 | 248 | %endif |
88149483 ER |
249 | ac_add_options --disable-strip |
250 | ac_add_options --disable-strip-libs | |
44be9ed4 | 251 | %if %{with tests} |
252 | ac_add_options --enable-tests | |
253 | %else | |
254 | ac_add_options --disable-tests | |
255 | %endif | |
6458b220 | 256 | ac_add_options --enable-gio |
44be9ed4 | 257 | %if %{with gnomeui} |
258 | ac_add_options --enable-gnomeui | |
259 | %else | |
260 | ac_add_options --disable-gnomeui | |
261 | %endif | |
44be9ed4 | 262 | ac_add_options --disable-gnomevfs |
44be9ed4 | 263 | %if %{with ldap} |
264 | ac_add_options --enable-ldap | |
9a743685 | 265 | ac_add_options --with-system-ldap |
44be9ed4 | 266 | %else |
267 | ac_add_options --disable-ldap | |
268 | %endif | |
765a3a27 ER |
269 | %if %{with crashreporter} |
270 | ac_add_options --enable-crashreporter | |
271 | %else | |
59c5a0e8 | 272 | ac_add_options --disable-crashreporter |
765a3a27 | 273 | %endif |
59c5a0e8 | 274 | ac_add_options --disable-xterm-updates |
59c5a0e8 | 275 | ac_add_options --enable-postscript |
d076d93e | 276 | %if %{with lightning} |
cb0e4412 | 277 | ac_add_options --enable-calendar |
d076d93e SP |
278 | %else |
279 | ac_add_options --disable-calendar | |
280 | %endif | |
44be9ed4 | 281 | ac_add_options --disable-installer |
88149483 | 282 | ac_add_options --disable-updater |
44be9ed4 | 283 | ac_add_options --disable-xprint |
cadfb931 SP |
284 | ac_add_options --disable-permissions |
285 | ac_add_options --disable-pref-extensions | |
44be9ed4 | 286 | ac_add_options --enable-canvas |
287 | ac_add_options --enable-crypto | |
44be9ed4 | 288 | ac_add_options --enable-mathml |
44be9ed4 | 289 | ac_add_options --enable-pango |
290 | ac_add_options --enable-reorder | |
88149483 ER |
291 | ac_add_options --enable-startup-notification |
292 | ac_add_options --enable-svg | |
44be9ed4 | 293 | ac_add_options --enable-system-cairo |
5e9bb798 | 294 | ac_add_options --enable-system-hunspell |
7d981f69 | 295 | ac_add_options --enable-system-sqlite |
44be9ed4 | 296 | ac_add_options --enable-xft |
cadfb931 SP |
297 | ac_add_options --enable-application=mail |
298 | ac_add_options --enable-default-toolkit=cairo-gtk2 | |
44be9ed4 | 299 | ac_add_options --enable-xinerama |
88149483 ER |
300 | ac_add_options --with-distribution-id=org.pld-linux |
301 | ac_add_options --with-branding=icedove/branding | |
302 | %if %{with xulrunner} | |
fac7e24d JB |
303 | ac_add_options --enable-shared-js |
304 | ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul) | |
f4114a7f | 305 | ac_add_options --with-system-libxul |
88149483 ER |
306 | %endif |
307 | ac_add_options --with-pthreads | |
308 | ac_add_options --with-system-bz2 | |
44be9ed4 | 309 | ac_add_options --with-system-jpeg |
310 | ac_add_options --with-system-nspr | |
311 | ac_add_options --with-system-nss | |
312 | ac_add_options --with-system-png | |
313 | ac_add_options --with-system-zlib | |
44be9ed4 | 314 | ac_add_options --enable-single-profile |
315 | ac_add_options --disable-profilesharing | |
44be9ed4 | 316 | ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name} |
317 | EOF | |
318 | ||
90e998ba | 319 | %{__make} -j1 -f client.mk build \ |
d076d93e | 320 | STRIP="/bin/true" \ |
765a3a27 | 321 | MOZ_MAKE_FLAGS="%{?_smp_mflags}" \ |
d076d93e | 322 | CC="%{__cc}" \ |
44be9ed4 | 323 | CXX="%{__cxx}" |
324 | ||
765a3a27 ER |
325 | %if %{with crashreporter} |
326 | # create debuginfo for crash-stats.mozilla.com | |
327 | %{__make} -j1 -C obj-%{_target_cpu} buildsymbols | |
328 | %endif | |
329 | ||
44be9ed4 | 330 | %if %{with enigmail} |
59c5a0e8 | 331 | cd mailnews/extensions/enigmail |
9e7875fc ER |
332 | ./makemake -r -o %{objdir} |
333 | %{__make} -C %{objdir}/mailnews/extensions/enigmail \ | |
d076d93e SP |
334 | STRIP="/bin/true" \ |
335 | CC="%{__cc}" \ | |
336 | CXX="%{__cxx}" | |
44be9ed4 | 337 | %endif |
338 | ||
339 | %install | |
340 | rm -rf $RPM_BUILD_ROOT | |
765a3a27 | 341 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name},%{_datadir}/%{name},%{_pixmapsdir},%{_desktopdir}} |
44be9ed4 | 342 | |
9e7875fc | 343 | cd %{objdir} |
ecf04393 | 344 | %{__make} -C mail/installer stage-package \ |
44be9ed4 | 345 | DESTDIR=$RPM_BUILD_ROOT \ |
0516fc42 | 346 | MOZ_PKG_DIR=%{_libdir}/%{name} \ |
44be9ed4 | 347 | PKG_SKIP_STRIP=1 |
348 | ||
9b40a2c3 JB |
349 | %if %{with xulrunner} |
350 | # needed to find mozilla runtime | |
351 | ln -s ../xulrunner $RPM_BUILD_ROOT%{_libdir}/%{name}/xulrunner | |
352 | %endif | |
353 | ||
354 | # Enable crash reporter for Thunderbird application | |
765a3a27 ER |
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 | |
51a3b6db | 359 | install -d $RPM_BUILD_ROOT%{_exec_prefix}/lib/debug%{_libdir}/%{name} |
765a3a27 ER |
360 | cp -a mozilla/dist/%{name}-%{version}.en-US.linux-*.crashreporter-symbols.zip $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/%{name} |
361 | %endif | |
362 | ||
ecf04393 ER |
363 | # copy manually lightning files, somewhy they are not installed by make |
364 | cp -a mozilla/dist/bin/extensions/calendar-timezones@mozilla.org \ | |
365 | mozilla/dist/bin/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103} \ | |
366 | $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions | |
367 | ||
44be9ed4 | 368 | # move arch independant ones to datadir |
369 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome | |
370 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults | |
44be9ed4 | 371 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/isp $RPM_BUILD_ROOT%{_datadir}/%{name}/isp |
9e097178 | 372 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/modules $RPM_BUILD_ROOT%{_datadir}/%{name}/modules |
eca54e0f | 373 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins $RPM_BUILD_ROOT%{_datadir}/%{name}/searchplugins |
44be9ed4 | 374 | ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome |
375 | ln -s ../../share/%{name}/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults | |
44be9ed4 | 376 | ln -s ../../share/%{name}/isp $RPM_BUILD_ROOT%{_libdir}/%{name}/isp |
9e097178 | 377 | ln -s ../../share/%{name}/modules $RPM_BUILD_ROOT%{_libdir}/%{name}/modules |
eca54e0f | 378 | ln -s ../../share/%{name}/searchplugins $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins |
73d54cb2 JB |
379 | %if %{without xulrunner} |
380 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/res $RPM_BUILD_ROOT%{_datadir}/%{name}/res | |
381 | ln -s ../../share/%{name}/res $RPM_BUILD_ROOT%{_libdir}/%{name}/res | |
382 | %endif | |
44be9ed4 | 383 | |
c6ec3c1c ER |
384 | # dir for arch independant extensions besides arch dependant extensions |
385 | # see mozilla/xpcom/build/nsXULAppAPI.h | |
386 | # XRE_SYS_LOCAL_EXTENSION_PARENT_DIR and XRE_SYS_SHARE_EXTENSION_PARENT_DIR | |
387 | install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions | |
388 | ||
73d54cb2 | 389 | %if %{without xulrunner} |
63d8f5c3 | 390 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries |
44be9ed4 | 391 | ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries |
e6bc19b3 ER |
392 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/hyphenation |
393 | ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/hyphenation | |
73d54cb2 | 394 | %endif |
e6bc19b3 | 395 | |
44be9ed4 | 396 | %{__sed} -e 's,@LIBDIR@,%{_libdir},' %{SOURCE5} > $RPM_BUILD_ROOT%{_bindir}/icedove |
397 | ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/thunderbird | |
398 | ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/mozilla-thunderbird | |
399 | ||
52f5507d ER |
400 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop |
401 | cp -p %{topdir}/mozilla/icedove/branding/content/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png | |
44be9ed4 | 402 | |
e8f4ba81 | 403 | # files created by regxpcom -register in post |
52fc61e6 ER |
404 | touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat |
405 | touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat | |
e8f4ba81 ER |
406 | cat << 'EOF' > $RPM_BUILD_ROOT%{_libdir}/%{name}/register |
407 | #!/bin/sh | |
408 | umask 022 | |
409 | # make temporary HOME, as it attempts to touch files in $HOME/.mozilla | |
410 | # dangerous if you run this with sudo with keep_env += HOME | |
411 | # also TMPDIR could be pointing to sudo user's homedir so we reset that too. | |
412 | t=$(mktemp -d) | |
d50a2a28 | 413 | %{__rm} -f %{_libdir}/%{name}/components/{compreg,xpti}.dat |
e8f4ba81 ER |
414 | TMPDIR= TMP= HOME=$t %{_libdir}/%{name}/icedove -register |
415 | rm -rf $t | |
416 | EOF | |
417 | chmod a+rx $RPM_BUILD_ROOT%{_libdir}/%{name}/register | |
52fc61e6 | 418 | |
44be9ed4 | 419 | %if %{with enigmail} |
283702b9 ER |
420 | ext_dir=$RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/\{847b3a00-7ab1-11d4-8f02-006008948af5\} |
421 | install -d $ext_dir/{chrome,components,defaults/preferences} | |
52fc61e6 | 422 | cd mozilla/dist/bin |
0516fc42 | 423 | #cp -rfLp chrome/enigmail.jar $ext_dir/chrome |
424 | #cp -rfLp chrome/enigmime.jar $ext_dir/chrome | |
52fc61e6 ER |
425 | cp -rfLp components/enig* $ext_dir/components |
426 | cp -rfLp components/libenigmime.so $ext_dir/components | |
f6a43e2f | 427 | cp -rfLp components/libipc.so $ext_dir/components |
52fc61e6 ER |
428 | cp -rfLp components/ipc.xpt $ext_dir/components |
429 | cp -rfLp defaults/preferences/enigmail.js $ext_dir/defaults/preferences | |
430 | cd - | |
52f5507d ER |
431 | cp -p %{topdir}/mozilla/mailnews/extensions/enigmail/package/install.rdf $ext_dir |
432 | cp -p %{topdir}/mozilla/mailnews/extensions/enigmail/package/chrome.manifest $ext_dir/chrome.manifest | |
44be9ed4 | 433 | %endif |
434 | ||
9cdc8923 ER |
435 | # never package these. always remove |
436 | # nss | |
437 | %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{freebl3,nss3,nssckbi,nssdbm3,nssutil3,smime3,softokn3,ssl3}.* | |
438 | # nspr | |
439 | %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{nspr4,plc4,plds4}.so | |
283702b9 | 440 | # mozldap |
9cdc8923 | 441 | %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{ldap,ldif,prldap,ssldap}60.so |
3815090b ER |
442 | # testpilot quiz |
443 | %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/%{name}/distribution/extensions/tbtestpilot@labs.mozilla.com.xpi | |
283702b9 | 444 | |
44be9ed4 | 445 | %clean |
446 | rm -rf $RPM_BUILD_ROOT | |
447 | ||
448 | %pretrans | |
449 | if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then | |
450 | mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave} | |
451 | fi | |
eca54e0f | 452 | for d in chrome defaults icons isp modules res searchplugins; do |
44be9ed4 | 453 | if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then |
454 | install -d %{_datadir}/%{name} | |
455 | mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d | |
456 | fi | |
457 | done | |
458 | exit 0 | |
459 | ||
e8f4ba81 ER |
460 | %post |
461 | %{_libdir}/%{name}/register || : | |
462 | ||
44be9ed4 | 463 | %files |
464 | %defattr(644,root,root,755) | |
465 | %attr(755,root,root) %{_bindir}/icedove | |
466 | %attr(755,root,root) %{_bindir}/mozilla-thunderbird | |
467 | %attr(755,root,root) %{_bindir}/thunderbird | |
468 | %dir %{_libdir}/%{name} | |
765a3a27 | 469 | %{_libdir}/%{name}/application.ini |
6b327de6 JB |
470 | %{_libdir}/%{name}/blocklist.xml |
471 | %{_libdir}/%{name}/chrome.manifest | |
44be9ed4 | 472 | %dir %{_libdir}/%{name}/components |
44be9ed4 | 473 | %{_libdir}/%{name}/components/*.js |
474 | %{_libdir}/%{name}/components/*.xpt | |
6b327de6 JB |
475 | %{_libdir}/%{name}/components/components.manifest |
476 | %{_libdir}/%{name}/components/interfaces.manifest | |
73d54cb2 JB |
477 | %attr(755,root,root) %{_libdir}/%{name}/*.sh |
478 | %attr(755,root,root) %{_libdir}/%{name}/*-bin | |
479 | %attr(755,root,root) %{_libdir}/%{name}/icedove | |
480 | %attr(755,root,root) %{_libdir}/%{name}/register | |
481 | %if %{without xulrunner} | |
482 | %{_libdir}/%{name}/platform.ini | |
483 | %{_libdir}/%{name}/greprefs.js | |
484 | %attr(755,root,root) %{_libdir}/%{name}/components/*.so | |
0516fc42 | 485 | %attr(755,root,root) %{_libdir}/%{name}/libmozalloc.so |
283702b9 | 486 | %attr(755,root,root) %{_libdir}/%{name}/libxpcom.so |
0516fc42 | 487 | %attr(755,root,root) %{_libdir}/%{name}/libxul.so |
44be9ed4 | 488 | %attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client |
cf62736e | 489 | %attr(755,root,root) %{_libdir}/%{name}/plugin-container |
73d54cb2 | 490 | %endif |
44be9ed4 | 491 | |
492 | # symlinks | |
493 | %{_libdir}/%{name}/chrome | |
494 | %{_libdir}/%{name}/defaults | |
44be9ed4 | 495 | %{_libdir}/%{name}/isp |
9e097178 | 496 | %{_libdir}/%{name}/modules |
eca54e0f | 497 | %{_libdir}/%{name}/searchplugins |
9b40a2c3 JB |
498 | %if %{with xulrunner} |
499 | %{_libdir}/%{name}/xulrunner | |
500 | %else | |
73d54cb2 JB |
501 | %{_libdir}/%{name}/dictionaries |
502 | %{_libdir}/%{name}/hyphenation | |
503 | %{_libdir}/%{name}/res | |
504 | %endif | |
44be9ed4 | 505 | |
224cf96a JB |
506 | %{_pixmapsdir}/icedove.png |
507 | %{_desktopdir}/icedove.desktop | |
44be9ed4 | 508 | |
509 | %dir %{_datadir}/%{name} | |
510 | %{_datadir}/%{name}/chrome | |
511 | %{_datadir}/%{name}/defaults | |
eca54e0f | 512 | %{_datadir}/%{name}/extensions |
44be9ed4 | 513 | %{_datadir}/%{name}/isp |
9e097178 | 514 | %{_datadir}/%{name}/modules |
eca54e0f | 515 | %{_datadir}/%{name}/searchplugins |
73d54cb2 JB |
516 | %if %{without xulrunner} |
517 | %{_datadir}/%{name}/res | |
518 | %endif | |
44be9ed4 | 519 | |
765a3a27 ER |
520 | %if %{with crashreporter} |
521 | %attr(755,root,root) %{_libdir}/%{name}/crashreporter | |
522 | %{_libdir}/%{name}/crashreporter.ini | |
523 | %{_libdir}/%{name}/Throbber-small.gif | |
524 | %endif | |
525 | ||
44be9ed4 | 526 | %dir %{_libdir}/%{name}/extensions |
527 | %{_libdir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd} | |
6578c165 | 528 | |
52fc61e6 ER |
529 | # files created by regxpcom -register |
530 | %ghost %{_libdir}/%{name}/components/compreg.dat | |
531 | %ghost %{_libdir}/%{name}/components/xpti.dat | |
532 | ||
6578c165 | 533 | %if %{with lightning} |
534 | %files addon-lightning | |
535 | %defattr(644,root,root,755) | |
f3b6d696 | 536 | %dir %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103} |
cf62736e | 537 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/application.ini |
f3b6d696 ER |
538 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome |
539 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome.manifest | |
cf62736e | 540 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/defaults |
f3b6d696 ER |
541 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/install.rdf |
542 | %dir %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components | |
543 | %attr(755,root,root) %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.so | |
f3b6d696 | 544 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.js |
cf62736e JB |
545 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.manifest |
546 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.xpt | |
f3b6d696 ER |
547 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules |
548 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js | |
549 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/timezones.sqlite | |
6578c165 | 550 | %{_libdir}/%{name}/extensions/calendar-timezones@mozilla.org |
551 | %endif | |
44be9ed4 | 552 | |
553 | %if %{with enigmail} | |
554 | %files addon-enigmail | |
555 | %defattr(644,root,root,755) | |
f6a43e2f ER |
556 | %dir %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5} |
557 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/defaults | |
558 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/chrome | |
559 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/chrome.manifest | |
560 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/install.rdf | |
561 | %dir %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components | |
562 | %attr(755,root,root) %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components/*.so | |
563 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components/*.xpt | |
564 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components/*.js | |
44be9ed4 | 565 | %endif |