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