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