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