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