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