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