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