]>
Commit | Line | Data |
---|---|---|
c4ddd260 | 1 | # TODO: |
c4ddd260 | 2 | # - separate spec for enigmail |
283702b9 | 3 | # - build with system mozldap |
af42cf6d | 4 | # - files: |
6458b220 | 5 | # /usr/lib/icedove/hyphenation/hyph_en_US.dic (and more, more hyph dicts) |
f14018b4 | 6 | # - enigmail - new version needed |
c4ddd260 | 7 | # |
44be9ed4 | 8 | # Conditional builds |
9 | %bcond_without enigmail # don't build enigmail - GPG/PGP support | |
10 | %bcond_without gnomeui # disable gnomeui support | |
6458b220 | 11 | %bcond_without gnome # alias for gnomeui |
44be9ed4 | 12 | %bcond_without ldap # disable e-mail address lookups in LDAP directories |
e820c55e | 13 | %bcond_without lightning # disable Sunbird/Lightning calendar |
f4114a7f | 14 | %bcond_without xulrunner # build with xulrunner |
765a3a27 | 15 | %bcond_with crashreporter # report crashes to crash-stats.mozilla.com |
88149483 | 16 | |
44be9ed4 | 17 | %if %{without gnome} |
18 | %undefine with_gnomeui | |
44be9ed4 | 19 | %endif |
88149483 | 20 | |
f4114a7f | 21 | %if 0%{?_enable_debug_packages} != 1 |
765a3a27 ER |
22 | %undefine crashreporter |
23 | %endif | |
24 | ||
f14018b4 | 25 | %define enigmail_ver 1.3.4 |
af42cf6d JB |
26 | %define nspr_ver 4.8.8 |
27 | %define nss_ver 3.12.10 | |
44be9ed4 | 28 | |
d06a830c | 29 | # convert firefox release number to platform version: 9.0.x -> 9.0.x |
f14018b4 AZ |
30 | %define xulrunner_main 9.0 |
31 | %define xulrunner_ver %(v=%{version}; echo %{xulrunner_main}${v#9.0}) | |
4f34f106 | 32 | |
7d981f69 ER |
33 | %if %{without xulrunner} |
34 | # The actual sqlite version (see RHBZ#480989): | |
35 | %define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR) | |
36 | %endif | |
37 | ||
44be9ed4 | 38 | Summary: Icedove - email client |
39 | Summary(pl.UTF-8): Icedove - klient poczty | |
40 | Name: icedove | |
e064532d | 41 | Version: 9.0.1 |
af42cf6d | 42 | Release: 0.1 |
44be9ed4 | 43 | License: MPL 1.1 or GPL v2+ or LGPL v2.1+ |
75c0f419 | 44 | Group: X11/Applications/Networking |
cadfb931 | 45 | Source0: http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/thunderbird-%{version}.source.tar.bz2 |
e064532d | 46 | # Source0-md5: a5904751dbd33074682b438b732fdbab |
44be9ed4 | 47 | Source1: http://www.mozilla-enigmail.org/download/source/enigmail-%{enigmail_ver}.tar.gz |
f14018b4 | 48 | # Source1-md5: 2b5f188791811d248b6ff1fc51a5806a |
44be9ed4 | 49 | Source2: %{name}-branding.tar.bz2 |
c105f759 | 50 | # Source2-md5: 2da351522bdd7f4a3bd8aaff4c776976 |
44be9ed4 | 51 | Source3: %{name}-rm_nonfree.sh |
52 | Source4: %{name}.desktop | |
53 | Source5: %{name}.sh | |
44be9ed4 | 54 | Patch0: %{name}-branding.patch |
faa5c89d SP |
55 | Patch1: %{name}-enigmail-shared.patch |
56 | Patch2: %{name}-gcc.patch | |
57 | Patch3: %{name}-fonts.patch | |
58 | Patch4: %{name}-install.patch | |
5e9bb798 | 59 | Patch5: %{name}-hunspell.patch |
faa5c89d | 60 | Patch6: %{name}-prefs.patch |
9a743685 | 61 | Patch7: system-mozldap.patch |
a85e0ecb | 62 | Patch8: %{name}-makefile.patch |
d06a830c | 63 | Patch9: %{name}-libpng.patch |
ccc206fe | 64 | Patch10: %{name}-extensiondir.patch |
765a3a27 | 65 | Patch11: crashreporter.patch |
268e7766 | 66 | Patch12: no-subshell.patch |
5745d706 | 67 | URL: http://www.pld-linux.org/Packages/Icedove |
6458b220 | 68 | BuildRequires: GConf2-devel >= 1.2.1 |
51a3b6db | 69 | BuildRequires: alsa-lib-devel |
44be9ed4 | 70 | BuildRequires: automake |
51a3b6db | 71 | BuildRequires: bzip2-devel |
e820c55e JB |
72 | BuildRequires: cairo-devel >= 1.10 |
73 | BuildRequires: dbus-glib-devel >= 0.60 | |
44be9ed4 | 74 | BuildRequires: freetype-devel >= 1:2.1.8 |
6458b220 | 75 | BuildRequires: glib2-devel >= 2.0 |
e820c55e | 76 | BuildRequires: gtk+2-devel >= 2:2.10.0 |
5e9bb798 | 77 | BuildRequires: hunspell-devel |
44be9ed4 | 78 | BuildRequires: libIDL-devel >= 0.8.0 |
6458b220 | 79 | %{?with_gnomeui:BuildRequires: libgnome-devel >= 2.0} |
51a3b6db | 80 | %{?with_gnomeui:BuildRequires: libgnome-keyring-devel} |
44be9ed4 | 81 | %{?with_gnomeui:BuildRequires: libgnomeui-devel >= 2.2.0} |
51a3b6db | 82 | BuildRequires: libiw-devel |
44be9ed4 | 83 | BuildRequires: libjpeg-devel >= 6b |
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} | |
44be9ed4 | 89 | BuildRequires: pango-devel >= 1:1.1.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} |
4f34f106 | 102 | BuildRequires: xulrunner-devel >= 2:%{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 | |
44be9ed4 | 113 | Obsoletes: mozilla-thunderbird |
114 | Obsoletes: mozilla-thunderbird-dictionary-en-US | |
115 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
116 | ||
9e366f18 AM |
117 | %define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+ |
118 | ||
44be9ed4 | 119 | # iceweasel/icedove/iceape provide their own versions |
c072808a | 120 | %define _noautoreqdep libgfxpsshar.so libgkgfx.so libgtkxtbin.so libjsj.so libxpcom_compat.so libxpistub.so |
44be9ed4 | 121 | %define _noautoprovfiles %{_libdir}/%{name}/components |
122 | # we don't want these to satisfy xulrunner-devel | |
c072808a | 123 | %define _noautoprov libgtkembedmoz.so libmozjs.so libxpcom.so libxul.so libxpcom_core.so |
44be9ed4 | 124 | # and as we don't provide them, don't require either |
c072808a | 125 | %define _noautoreq libgtkembedmoz.so libmozjs.so libxpcom.so libxul.so libxpcom_core.so |
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 | |
154 | License: MPL/LGPL | |
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 |
f4114a7f | 190 | mv comm-release mozilla |
983562b1 | 191 | %setup -q -T -D -a2 |
192 | cd mozilla | |
1c70899a | 193 | %{?with_enigmail:%{__gzip} -dc %{SOURCE1} | %{__tar} -xf - -C mailnews/extensions} |
44be9ed4 | 194 | /bin/sh %{SOURCE3} |
983562b1 | 195 | %patch0 -p1 |
faa5c89d SP |
196 | %{?with_enigmail:%patch1 -p1} |
197 | %patch2 -p1 | |
4ccc2157 | 198 | %patch3 -p1 |
faa5c89d | 199 | %patch4 -p1 |
983562b1 | 200 | %patch6 -p1 |
9a743685 | 201 | %patch7 -p1 |
f4114a7f | 202 | %patch8 -p2 |
d06a830c | 203 | %patch9 -p1 |
ccc206fe | 204 | %patch10 -p2 |
765a3a27 | 205 | %patch11 -p2 |
268e7766 | 206 | %patch12 -p1 |
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 | |
9a743685 ER |
214 | install -d libxul-sdk |
215 | ln -snf %{_libdir}/xulrunner-sdk libxul-sdk/sdk | |
9a743685 | 216 | |
fbac75ca | 217 | cat << EOF > .mozconfig |
9e7875fc | 218 | mk_add_options MOZ_OBJDIR=%{objdir} |
cb0e4412 | 219 | |
5745d706 | 220 | export CFLAGS="%{rpmcflags} -fpermissive -I/usr/include/xulrunner" |
221 | export CXXFLAGS="%{rpmcflags} -fpermissive -I/usr/include/xulrunner" | |
765a3a27 ER |
222 | |
223 | %if %{with crashreporter} | |
224 | export MOZ_DEBUG_SYMBOLS=1 | |
225 | %endif | |
226 | ||
59c5a0e8 | 227 | # Options for 'configure' (same as command-line options). |
44be9ed4 | 228 | ac_add_options --prefix=%{_prefix} |
229 | ac_add_options --exec-prefix=%{_exec_prefix} | |
230 | ac_add_options --bindir=%{_bindir} | |
231 | ac_add_options --sbindir=%{_sbindir} | |
232 | ac_add_options --sysconfdir=%{_sysconfdir} | |
233 | ac_add_options --datadir=%{_datadir} | |
234 | ac_add_options --includedir=%{_includedir} | |
235 | ac_add_options --libdir=%{_libdir} | |
236 | ac_add_options --libexecdir=%{_libexecdir} | |
237 | ac_add_options --localstatedir=%{_localstatedir} | |
238 | ac_add_options --sharedstatedir=%{_sharedstatedir} | |
239 | ac_add_options --mandir=%{_mandir} | |
240 | ac_add_options --infodir=%{_infodir} | |
241 | %if %{?debug:1}0 | |
59c5a0e8 | 242 | ac_add_options --disable-optimize |
44be9ed4 | 243 | ac_add_options --enable-debug |
244 | ac_add_options --enable-debug-modules | |
59c5a0e8 SP |
245 | ac_add_options --enable-debugger-info-modules |
246 | ac_add_options --enable-crash-on-assert | |
44be9ed4 | 247 | %else |
248 | ac_add_options --disable-debug | |
249 | ac_add_options --disable-debug-modules | |
59c5a0e8 SP |
250 | ac_add_options --disable-logging |
251 | ac_add_options --enable-optimize="%{rpmcflags} -Os" | |
44be9ed4 | 252 | %endif |
88149483 ER |
253 | ac_add_options --disable-strip |
254 | ac_add_options --disable-strip-libs | |
44be9ed4 | 255 | %if %{with tests} |
256 | ac_add_options --enable-tests | |
257 | %else | |
258 | ac_add_options --disable-tests | |
259 | %endif | |
6458b220 | 260 | ac_add_options --enable-gio |
44be9ed4 | 261 | %if %{with gnomeui} |
262 | ac_add_options --enable-gnomeui | |
263 | %else | |
264 | ac_add_options --disable-gnomeui | |
265 | %endif | |
44be9ed4 | 266 | ac_add_options --disable-gnomevfs |
44be9ed4 | 267 | %if %{with ldap} |
268 | ac_add_options --enable-ldap | |
9a743685 | 269 | ac_add_options --with-system-ldap |
44be9ed4 | 270 | %else |
271 | ac_add_options --disable-ldap | |
272 | %endif | |
765a3a27 ER |
273 | %if %{with crashreporter} |
274 | ac_add_options --enable-crashreporter | |
275 | %else | |
59c5a0e8 | 276 | ac_add_options --disable-crashreporter |
765a3a27 | 277 | %endif |
59c5a0e8 | 278 | ac_add_options --disable-xterm-updates |
59c5a0e8 | 279 | ac_add_options --enable-postscript |
d076d93e | 280 | %if %{with lightning} |
cb0e4412 | 281 | ac_add_options --enable-calendar |
d076d93e SP |
282 | %else |
283 | ac_add_options --disable-calendar | |
284 | %endif | |
44be9ed4 | 285 | ac_add_options --disable-installer |
286 | ac_add_options --disable-jsd | |
88149483 | 287 | ac_add_options --disable-updater |
44be9ed4 | 288 | ac_add_options --disable-xprint |
cadfb931 SP |
289 | ac_add_options --disable-permissions |
290 | ac_add_options --disable-pref-extensions | |
44be9ed4 | 291 | ac_add_options --enable-canvas |
292 | ac_add_options --enable-crypto | |
44be9ed4 | 293 | ac_add_options --enable-mathml |
44be9ed4 | 294 | ac_add_options --enable-pango |
295 | ac_add_options --enable-reorder | |
88149483 ER |
296 | ac_add_options --enable-startup-notification |
297 | ac_add_options --enable-svg | |
44be9ed4 | 298 | ac_add_options --enable-system-cairo |
5e9bb798 | 299 | ac_add_options --enable-system-hunspell |
7d981f69 | 300 | ac_add_options --enable-system-sqlite |
44be9ed4 | 301 | ac_add_options --enable-xft |
cadfb931 SP |
302 | ac_add_options --enable-application=mail |
303 | ac_add_options --enable-default-toolkit=cairo-gtk2 | |
44be9ed4 | 304 | ac_add_options --enable-xinerama |
88149483 ER |
305 | ac_add_options --with-distribution-id=org.pld-linux |
306 | ac_add_options --with-branding=icedove/branding | |
307 | %if %{with xulrunner} | |
f4114a7f ER |
308 | #ac_add_options --with-libxul-sdk=$(pwd)/libxul-sdk/sdk |
309 | ac_add_options --with-system-libxul | |
fbac75ca | 310 | ac_add_options --enable-shared |
f4114a7f | 311 | ac_add_options --enable-libxul |
fbac75ca | 312 | %else |
f4114a7f | 313 | ac_add_options --disable-xul |
88149483 ER |
314 | %endif |
315 | ac_add_options --with-pthreads | |
316 | ac_add_options --with-system-bz2 | |
44be9ed4 | 317 | ac_add_options --with-system-jpeg |
318 | ac_add_options --with-system-nspr | |
319 | ac_add_options --with-system-nss | |
320 | ac_add_options --with-system-png | |
321 | ac_add_options --with-system-zlib | |
44be9ed4 | 322 | ac_add_options --enable-single-profile |
323 | ac_add_options --disable-profilesharing | |
44be9ed4 | 324 | ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name} |
325 | EOF | |
326 | ||
90e998ba | 327 | %{__make} -j1 -f client.mk build \ |
d076d93e | 328 | STRIP="/bin/true" \ |
765a3a27 | 329 | MOZ_MAKE_FLAGS="%{?_smp_mflags}" \ |
d076d93e | 330 | CC="%{__cc}" \ |
44be9ed4 | 331 | CXX="%{__cxx}" |
332 | ||
765a3a27 ER |
333 | %if %{with crashreporter} |
334 | # create debuginfo for crash-stats.mozilla.com | |
335 | %{__make} -j1 -C obj-%{_target_cpu} buildsymbols | |
336 | %endif | |
337 | ||
44be9ed4 | 338 | %if %{with enigmail} |
59c5a0e8 | 339 | cd mailnews/extensions/enigmail |
9e7875fc ER |
340 | ./makemake -r -o %{objdir} |
341 | %{__make} -C %{objdir}/mailnews/extensions/enigmail \ | |
d076d93e SP |
342 | STRIP="/bin/true" \ |
343 | CC="%{__cc}" \ | |
344 | CXX="%{__cxx}" | |
44be9ed4 | 345 | %endif |
346 | ||
347 | %install | |
348 | rm -rf $RPM_BUILD_ROOT | |
765a3a27 | 349 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name},%{_datadir}/%{name},%{_pixmapsdir},%{_desktopdir}} |
44be9ed4 | 350 | |
9e7875fc | 351 | cd %{objdir} |
ecf04393 | 352 | %{__make} -C mail/installer stage-package \ |
44be9ed4 | 353 | DESTDIR=$RPM_BUILD_ROOT \ |
0516fc42 | 354 | MOZ_PKG_DIR=%{_libdir}/%{name} \ |
44be9ed4 | 355 | PKG_SKIP_STRIP=1 |
356 | ||
765a3a27 ER |
357 | # Enable crash reporter for Firefox application |
358 | %if %{with crashreporter} | |
359 | %{__sed} -i -e 's/\[Crash Reporter\]/[Crash Reporter]\nEnabled=1/' $RPM_BUILD_ROOT%{_libdir}/%{name}/application.ini | |
360 | ||
361 | # Add debuginfo for crash-stats.mozilla.com | |
51a3b6db | 362 | install -d $RPM_BUILD_ROOT%{_exec_prefix}/lib/debug%{_libdir}/%{name} |
765a3a27 ER |
363 | cp -a mozilla/dist/%{name}-%{version}.en-US.linux-*.crashreporter-symbols.zip $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/%{name} |
364 | %endif | |
365 | ||
ecf04393 ER |
366 | # copy manually lightning files, somewhy they are not installed by make |
367 | cp -a mozilla/dist/bin/extensions/calendar-timezones@mozilla.org \ | |
368 | mozilla/dist/bin/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103} \ | |
369 | $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions | |
370 | ||
44be9ed4 | 371 | # move arch independant ones to datadir |
372 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome | |
373 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults | |
44be9ed4 | 374 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/isp $RPM_BUILD_ROOT%{_datadir}/%{name}/isp |
9e097178 | 375 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/modules $RPM_BUILD_ROOT%{_datadir}/%{name}/modules |
44be9ed4 | 376 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/res $RPM_BUILD_ROOT%{_datadir}/%{name}/res |
377 | ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome | |
378 | ln -s ../../share/%{name}/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults | |
44be9ed4 | 379 | ln -s ../../share/%{name}/isp $RPM_BUILD_ROOT%{_libdir}/%{name}/isp |
9e097178 | 380 | ln -s ../../share/%{name}/modules $RPM_BUILD_ROOT%{_libdir}/%{name}/modules |
44be9ed4 | 381 | ln -s ../../share/%{name}/res $RPM_BUILD_ROOT%{_libdir}/%{name}/res |
382 | ||
c6ec3c1c ER |
383 | # dir for arch independant extensions besides arch dependant extensions |
384 | # see mozilla/xpcom/build/nsXULAppAPI.h | |
385 | # XRE_SYS_LOCAL_EXTENSION_PARENT_DIR and XRE_SYS_SHARE_EXTENSION_PARENT_DIR | |
386 | install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions | |
387 | ||
63d8f5c3 | 388 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries |
44be9ed4 | 389 | ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries |
390 | ||
391 | %{__sed} -e 's,@LIBDIR@,%{_libdir},' %{SOURCE5} > $RPM_BUILD_ROOT%{_bindir}/icedove | |
392 | ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/thunderbird | |
393 | ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/mozilla-thunderbird | |
394 | ||
52f5507d ER |
395 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop |
396 | cp -p %{topdir}/mozilla/icedove/branding/content/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png | |
44be9ed4 | 397 | |
e8f4ba81 | 398 | # files created by regxpcom -register in post |
52fc61e6 ER |
399 | touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat |
400 | touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat | |
e8f4ba81 ER |
401 | cat << 'EOF' > $RPM_BUILD_ROOT%{_libdir}/%{name}/register |
402 | #!/bin/sh | |
403 | umask 022 | |
404 | # make temporary HOME, as it attempts to touch files in $HOME/.mozilla | |
405 | # dangerous if you run this with sudo with keep_env += HOME | |
406 | # also TMPDIR could be pointing to sudo user's homedir so we reset that too. | |
407 | t=$(mktemp -d) | |
d50a2a28 | 408 | %{__rm} -f %{_libdir}/%{name}/components/{compreg,xpti}.dat |
e8f4ba81 ER |
409 | TMPDIR= TMP= HOME=$t %{_libdir}/%{name}/icedove -register |
410 | rm -rf $t | |
411 | EOF | |
412 | chmod a+rx $RPM_BUILD_ROOT%{_libdir}/%{name}/register | |
52fc61e6 | 413 | |
44be9ed4 | 414 | %if %{with enigmail} |
283702b9 ER |
415 | ext_dir=$RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/\{847b3a00-7ab1-11d4-8f02-006008948af5\} |
416 | install -d $ext_dir/{chrome,components,defaults/preferences} | |
52fc61e6 | 417 | cd mozilla/dist/bin |
0516fc42 | 418 | #cp -rfLp chrome/enigmail.jar $ext_dir/chrome |
419 | #cp -rfLp chrome/enigmime.jar $ext_dir/chrome | |
52fc61e6 ER |
420 | cp -rfLp components/enig* $ext_dir/components |
421 | cp -rfLp components/libenigmime.so $ext_dir/components | |
f6a43e2f | 422 | cp -rfLp components/libipc.so $ext_dir/components |
52fc61e6 ER |
423 | cp -rfLp components/ipc.xpt $ext_dir/components |
424 | cp -rfLp defaults/preferences/enigmail.js $ext_dir/defaults/preferences | |
425 | cd - | |
52f5507d ER |
426 | cp -p %{topdir}/mozilla/mailnews/extensions/enigmail/package/install.rdf $ext_dir |
427 | cp -p %{topdir}/mozilla/mailnews/extensions/enigmail/package/chrome.manifest $ext_dir/chrome.manifest | |
44be9ed4 | 428 | %endif |
429 | ||
9a743685 | 430 | # remove unecessary stuff |
9e402408 | 431 | #%%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/README.txt |
0516fc42 | 432 | #%%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/components/components.list |
433 | #%%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/components.list | |
44be9ed4 | 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 |
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 | |
6b327de6 | 450 | for d in chrome defaults icons isp modules res; 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 ER |
467 | %{_libdir}/%{name}/application.ini |
468 | %{_libdir}/%{name}/platform.ini | |
6b327de6 JB |
469 | %{_libdir}/%{name}/blocklist.xml |
470 | %{_libdir}/%{name}/chrome.manifest | |
471 | %{_libdir}/%{name}/greprefs.js | |
44be9ed4 | 472 | %dir %{_libdir}/%{name}/components |
473 | %attr(755,root,root) %{_libdir}/%{name}/components/*.so | |
474 | %{_libdir}/%{name}/components/*.js | |
475 | %{_libdir}/%{name}/components/*.xpt | |
6b327de6 JB |
476 | %{_libdir}/%{name}/components/components.manifest |
477 | %{_libdir}/%{name}/components/interfaces.manifest | |
0516fc42 | 478 | %attr(755,root,root) %{_libdir}/%{name}/libmozalloc.so |
479 | #%%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so | |
283702b9 | 480 | %attr(755,root,root) %{_libdir}/%{name}/libxpcom.so |
0516fc42 | 481 | #%%attr(755,root,root) %{_libdir}/%{name}/libxpcom_core.so |
482 | %attr(755,root,root) %{_libdir}/%{name}/libxul.so | |
44be9ed4 | 483 | %attr(755,root,root) %{_libdir}/%{name}/*.sh |
484 | %attr(755,root,root) %{_libdir}/%{name}/*-bin | |
485 | %attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client | |
bc9cd18a | 486 | %attr(755,root,root) %{_libdir}/%{name}/icedove |
cf62736e | 487 | %attr(755,root,root) %{_libdir}/%{name}/plugin-container |
e8f4ba81 | 488 | %attr(755,root,root) %{_libdir}/%{name}/register |
44be9ed4 | 489 | |
490 | # symlinks | |
491 | %{_libdir}/%{name}/chrome | |
492 | %{_libdir}/%{name}/defaults | |
493 | %{_libdir}/%{name}/dictionaries | |
0516fc42 | 494 | #%%{_libdir}/%{name}/greprefs |
44be9ed4 | 495 | %{_libdir}/%{name}/isp |
9e097178 | 496 | %{_libdir}/%{name}/modules |
44be9ed4 | 497 | %{_libdir}/%{name}/res |
498 | ||
293928f3 | 499 | %{_pixmapsdir}/*.png |
44be9ed4 | 500 | %{_desktopdir}/*.desktop |
501 | ||
502 | %dir %{_datadir}/%{name} | |
503 | %{_datadir}/%{name}/chrome | |
504 | %{_datadir}/%{name}/defaults | |
0516fc42 | 505 | #%%{_datadir}/%{name}/greprefs |
44be9ed4 | 506 | %{_datadir}/%{name}/isp |
9e097178 | 507 | %{_datadir}/%{name}/modules |
44be9ed4 | 508 | %{_datadir}/%{name}/res |
c6ec3c1c | 509 | %{_datadir}/%{name}/extensions |
44be9ed4 | 510 | |
765a3a27 ER |
511 | %if %{with crashreporter} |
512 | %attr(755,root,root) %{_libdir}/%{name}/crashreporter | |
513 | %{_libdir}/%{name}/crashreporter.ini | |
514 | %{_libdir}/%{name}/Throbber-small.gif | |
515 | %endif | |
516 | ||
44be9ed4 | 517 | %dir %{_libdir}/%{name}/extensions |
518 | %{_libdir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd} | |
6578c165 | 519 | |
52fc61e6 ER |
520 | # files created by regxpcom -register |
521 | %ghost %{_libdir}/%{name}/components/compreg.dat | |
522 | %ghost %{_libdir}/%{name}/components/xpti.dat | |
523 | ||
6578c165 | 524 | %if %{with lightning} |
525 | %files addon-lightning | |
526 | %defattr(644,root,root,755) | |
f3b6d696 | 527 | %dir %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103} |
cf62736e | 528 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/application.ini |
f3b6d696 ER |
529 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome |
530 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome.manifest | |
cf62736e | 531 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/defaults |
f3b6d696 ER |
532 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/install.rdf |
533 | %dir %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components | |
534 | %attr(755,root,root) %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.so | |
f3b6d696 | 535 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.js |
cf62736e JB |
536 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.manifest |
537 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.xpt | |
f3b6d696 ER |
538 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules |
539 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js | |
540 | %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/timezones.sqlite | |
6578c165 | 541 | %{_libdir}/%{name}/extensions/calendar-timezones@mozilla.org |
542 | %endif | |
44be9ed4 | 543 | |
544 | %if %{with enigmail} | |
545 | %files addon-enigmail | |
546 | %defattr(644,root,root,755) | |
f6a43e2f ER |
547 | %dir %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5} |
548 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/defaults | |
549 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/chrome | |
550 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/chrome.manifest | |
551 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/install.rdf | |
552 | %dir %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components | |
553 | %attr(755,root,root) %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components/*.so | |
554 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components/*.xpt | |
555 | %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components/*.js | |
44be9ed4 | 556 | %endif |