]> git.pld-linux.org Git - packages/thunderbird.git/blame - icedove.spec
- up to 7.0.1; now it builds, but there are many unpackaged files
[packages/thunderbird.git] / icedove.spec
CommitLineData
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 59Summary: Icedove - email client
60Summary(pl.UTF-8): Icedove - klient poczty
61Name: icedove
af42cf6d
JB
62Version: 7.0.1
63Release: 0.1
44be9ed4 64License: MPL 1.1 or GPL v2+ or LGPL v2.1+
75c0f419 65Group: X11/Applications/Networking
cadfb931 66Source0: http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/thunderbird-%{version}.source.tar.bz2
af42cf6d 67# Source0-md5: ad177fe5202deabda44882ff5c871f1b
44be9ed4 68Source1: http://www.mozilla-enigmail.org/download/source/enigmail-%{enigmail_ver}.tar.gz
9bdca747 69# Source1-md5: 2318d60320dc6c3db3c34d968bb7d533
44be9ed4 70Source2: %{name}-branding.tar.bz2
c105f759 71# Source2-md5: 2da351522bdd7f4a3bd8aaff4c776976
44be9ed4 72Source3: %{name}-rm_nonfree.sh
73Source4: %{name}.desktop
74Source5: %{name}.sh
44be9ed4 75Patch0: %{name}-branding.patch
faa5c89d
SP
76Patch1: %{name}-enigmail-shared.patch
77Patch2: %{name}-gcc.patch
78Patch3: %{name}-fonts.patch
79Patch4: %{name}-install.patch
5e9bb798 80Patch5: %{name}-hunspell.patch
faa5c89d 81Patch6: %{name}-prefs.patch
9a743685 82Patch7: system-mozldap.patch
a85e0ecb 83Patch8: %{name}-makefile.patch
ccc206fe 84Patch10: %{name}-extensiondir.patch
765a3a27 85Patch11: crashreporter.patch
268e7766 86Patch12: no-subshell.patch
5745d706 87URL: http://www.pld-linux.org/Packages/Icedove
071d16e9 88%{?with_gnomevfs:BuildRequires: GConf2-devel >= 1.2.1}
51a3b6db 89BuildRequires: alsa-lib-devel
44be9ed4 90BuildRequires: automake
51a3b6db 91BuildRequires: bzip2-devel
44be9ed4 92BuildRequires: freetype-devel >= 1:2.1.8
93%{?with_gnomevfs:BuildRequires: gnome-vfs2-devel >= 2.0}
94BuildRequires: gtk+2-devel >= 1:2.0.0
5e9bb798 95BuildRequires: hunspell-devel
44be9ed4 96BuildRequires: 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 100BuildRequires: libiw-devel
44be9ed4 101BuildRequires: libjpeg-devel >= 6b
51a3b6db 102BuildRequires: libnotify-devel >= 0.4
44be9ed4 103BuildRequires: libpng-devel >= 1.2.0
104BuildRequires: libstdc++-devel
f4114a7f
ER
105BuildRequires: nspr-devel >= 1:%{nspr_ver}
106BuildRequires: nss-devel >= 1:%{nss_ver}
44be9ed4 107BuildRequires: pango-devel >= 1:1.1.0
1c62cadb 108BuildRequires: pkgconfig
44be9ed4 109BuildRequires: sed >= 4.0
9d1bfad8 110BuildRequires: sqlite3-devel >= 3.7.4
1c62cadb 111BuildRequires: startup-notification-devel >= 0.8
44be9ed4 112BuildRequires: xorg-lib-libXext-devel
44be9ed4 113BuildRequires: xorg-lib-libXinerama-devel
44be9ed4 114BuildRequires: xorg-lib-libXt-devel
5745d706 115BuildRequires: yasm
1c62cadb 116BuildRequires: zip
7d981f69 117%if %{with xulrunner}
4f34f106 118BuildRequires: xulrunner-devel >= 2:%{xulrunner_ver}
7d981f69 119%else
44be9ed4 120Requires: myspell-common
f4114a7f
ER
121Requires: nspr >= 1:%{nspr_ver}
122Requires: nss >= 1:%{nss_ver}
4b6bc367 123Requires: sqlite3 >= %{sqlite_build_version}
7d981f69 124%endif
4f34f106
ER
125Requires(post): mktemp >= 1.5-18
126%if %{with xulrunner}
127%requires_eq_to xulrunner xulrunner-devel
128%endif
44be9ed4 129Obsoletes: mozilla-thunderbird
130Obsoletes: mozilla-thunderbird-dictionary-en-US
131BuildRoot: %{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
147Icedove is an open-source,fast and portable email client.
148
149%description -l pl.UTF-8
150Icedove jest open sourcowym, szybkim i przenośnym klientem poczty.
151
6578c165 152%package addon-lightning
153Summary: An integrated calendar for Icedove
154Summary(pl.UTF-8): Zintegrowany kalendarz dla Icedove
155License: MPL 1.1 or GPL v2+ or LGPL v2.1+
156Group: Applications/Networking
157Requires: %{name} = %{version}-%{release}
158
159%description addon-lightning
160Lightning is an calendar extension to Icedove email client.
161
162%description addon-lightning -l pl.UTF-8
163Lightning to rozszerzenie do klienta poczty Icedove dodające
164funkcjonalność kalendarza.
165
44be9ed4 166%package addon-enigmail
167Summary: Extension for the authentication and encryption features provided by GnuPG
168Summary(pl.UTF-8): Rozszerzenie do uwierzytelniania i szyfrowania zapewnianego przez GnuPG
169License: MPL/LGPL
170Group: Applications/Networking
171URL: http://enigmail.mozdev.org/
cd056caa 172Requires: %{name} = %{version}-%{release}
d076d93e 173Requires: gnupg
75991bbb 174Obsoletes: mozilla-thunderbird-addon-enigmail
44be9ed4 175
176%description addon-enigmail
c5e06599 177Enigmail is an extension to the Icedove mail client which allows users
178to access the authentication and encryption features provided by
179GnuPG.
44be9ed4 180
181Main 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 190Enigmail to rozszerzenie klienta pocztowego Icedove pozwalające
faa5c89d
SP
191użytkownikom na dostęp do uwierzytelniania i szyfrowania zapewnianego
192przez GnuPG.
44be9ed4 193
194Głó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 205mv comm-release mozilla
983562b1 206%setup -q -T -D -a2
207cd 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 223cd mozilla
cadfb931
SP
224cp -f %{_datadir}/automake/config.* mozilla/build/autoconf
225cp -f %{_datadir}/automake/config.* mozilla/nsprpub/build/autoconf
f4114a7f 226cp -f %{_datadir}/automake/config.* ldap/sdks/c-sdk/config/autoconf
44be9ed4 227
9a743685
ER
228install -d libxul-sdk
229ln -snf %{_libdir}/xulrunner-sdk libxul-sdk/sdk
9a743685 230
fbac75ca 231cat << EOF > .mozconfig
9e7875fc 232mk_add_options MOZ_OBJDIR=%{objdir}
cb0e4412 233
5745d706 234export CFLAGS="%{rpmcflags} -fpermissive -I/usr/include/xulrunner"
235export CXXFLAGS="%{rpmcflags} -fpermissive -I/usr/include/xulrunner"
765a3a27
ER
236
237%if %{with crashreporter}
238export MOZ_DEBUG_SYMBOLS=1
239%endif
240
59c5a0e8 241# Options for 'configure' (same as command-line options).
44be9ed4 242ac_add_options --prefix=%{_prefix}
243ac_add_options --exec-prefix=%{_exec_prefix}
244ac_add_options --bindir=%{_bindir}
245ac_add_options --sbindir=%{_sbindir}
246ac_add_options --sysconfdir=%{_sysconfdir}
247ac_add_options --datadir=%{_datadir}
248ac_add_options --includedir=%{_includedir}
249ac_add_options --libdir=%{_libdir}
250ac_add_options --libexecdir=%{_libexecdir}
251ac_add_options --localstatedir=%{_localstatedir}
252ac_add_options --sharedstatedir=%{_sharedstatedir}
253ac_add_options --mandir=%{_mandir}
254ac_add_options --infodir=%{_infodir}
255%if %{?debug:1}0
59c5a0e8 256ac_add_options --disable-optimize
44be9ed4 257ac_add_options --enable-debug
258ac_add_options --enable-debug-modules
59c5a0e8
SP
259ac_add_options --enable-debugger-info-modules
260ac_add_options --enable-crash-on-assert
44be9ed4 261%else
262ac_add_options --disable-debug
263ac_add_options --disable-debug-modules
59c5a0e8
SP
264ac_add_options --disable-logging
265ac_add_options --enable-optimize="%{rpmcflags} -Os"
44be9ed4 266%endif
88149483
ER
267ac_add_options --disable-strip
268ac_add_options --disable-strip-libs
44be9ed4 269%if %{with tests}
270ac_add_options --enable-tests
271%else
272ac_add_options --disable-tests
273%endif
274%if %{with gnomeui}
275ac_add_options --enable-gnomeui
276%else
277ac_add_options --disable-gnomeui
278%endif
279%if %{with gnomevfs}
280ac_add_options --enable-gnomevfs
281%else
282ac_add_options --disable-gnomevfs
283%endif
284%if %{with ldap}
285ac_add_options --enable-ldap
9a743685 286ac_add_options --with-system-ldap
44be9ed4 287%else
288ac_add_options --disable-ldap
289%endif
765a3a27
ER
290%if %{with crashreporter}
291ac_add_options --enable-crashreporter
292%else
59c5a0e8 293ac_add_options --disable-crashreporter
765a3a27 294%endif
59c5a0e8 295ac_add_options --disable-xterm-updates
59c5a0e8 296ac_add_options --enable-postscript
d076d93e 297%if %{with lightning}
cb0e4412 298ac_add_options --enable-calendar
d076d93e
SP
299%else
300ac_add_options --disable-calendar
301%endif
44be9ed4 302ac_add_options --disable-installer
303ac_add_options --disable-jsd
88149483 304ac_add_options --disable-updater
44be9ed4 305ac_add_options --disable-xprint
cadfb931
SP
306ac_add_options --disable-permissions
307ac_add_options --disable-pref-extensions
44be9ed4 308ac_add_options --enable-canvas
309ac_add_options --enable-crypto
44be9ed4 310ac_add_options --enable-mathml
44be9ed4 311ac_add_options --enable-pango
312ac_add_options --enable-reorder
88149483
ER
313ac_add_options --enable-startup-notification
314ac_add_options --enable-svg
44be9ed4 315ac_add_options --enable-system-cairo
5e9bb798 316ac_add_options --enable-system-hunspell
7d981f69 317ac_add_options --enable-system-sqlite
44be9ed4 318ac_add_options --enable-xft
cadfb931
SP
319ac_add_options --enable-application=mail
320ac_add_options --enable-default-toolkit=cairo-gtk2
44be9ed4 321ac_add_options --enable-xinerama
88149483
ER
322ac_add_options --with-distribution-id=org.pld-linux
323ac_add_options --with-branding=icedove/branding
324%if %{with xulrunner}
f4114a7f
ER
325#ac_add_options --with-libxul-sdk=$(pwd)/libxul-sdk/sdk
326ac_add_options --with-system-libxul
fbac75ca 327ac_add_options --enable-shared
f4114a7f 328ac_add_options --enable-libxul
fbac75ca 329%else
f4114a7f 330ac_add_options --disable-xul
88149483
ER
331%endif
332ac_add_options --with-pthreads
333ac_add_options --with-system-bz2
44be9ed4 334ac_add_options --with-system-jpeg
335ac_add_options --with-system-nspr
336ac_add_options --with-system-nss
337ac_add_options --with-system-png
338ac_add_options --with-system-zlib
44be9ed4 339ac_add_options --enable-single-profile
340ac_add_options --disable-profilesharing
44be9ed4 341ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
342EOF
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 356cd 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
365rm -rf $RPM_BUILD_ROOT
765a3a27 366install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name},%{_datadir}/%{name},%{_pixmapsdir},%{_desktopdir}}
44be9ed4 367
9e7875fc 368cd %{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 379install -d $RPM_BUILD_ROOT%{_exec_prefix}/lib/debug%{_libdir}/%{name}
765a3a27
ER
380cp -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
384cp -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
389mv $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome
390mv $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 392mv $RPM_BUILD_ROOT%{_libdir}/%{name}/isp $RPM_BUILD_ROOT%{_datadir}/%{name}/isp
9e097178 393mv $RPM_BUILD_ROOT%{_libdir}/%{name}/modules $RPM_BUILD_ROOT%{_datadir}/%{name}/modules
44be9ed4 394mv $RPM_BUILD_ROOT%{_libdir}/%{name}/res $RPM_BUILD_ROOT%{_datadir}/%{name}/res
395ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome
396ln -s ../../share/%{name}/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults
0516fc42 397#ln -s ../../share/%{name}/greprefs $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs
44be9ed4 398ln -s ../../share/%{name}/isp $RPM_BUILD_ROOT%{_libdir}/%{name}/isp
9e097178 399ln -s ../../share/%{name}/modules $RPM_BUILD_ROOT%{_libdir}/%{name}/modules
44be9ed4 400ln -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
405install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions
406
63d8f5c3 407%{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
44be9ed4 408ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
409
410%{__sed} -e 's,@LIBDIR@,%{_libdir},' %{SOURCE5} > $RPM_BUILD_ROOT%{_bindir}/icedove
411ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/thunderbird
412ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/mozilla-thunderbird
413
52f5507d
ER
414cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
415cp -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
418touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat
419touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat
e8f4ba81
ER
420cat << 'EOF' > $RPM_BUILD_ROOT%{_libdir}/%{name}/register
421#!/bin/sh
422umask 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.
426t=$(mktemp -d)
d50a2a28 427%{__rm} -f %{_libdir}/%{name}/components/{compreg,xpti}.dat
e8f4ba81
ER
428TMPDIR= TMP= HOME=$t %{_libdir}/%{name}/icedove -register
429rm -rf $t
430EOF
431chmod a+rx $RPM_BUILD_ROOT%{_libdir}/%{name}/register
52fc61e6 432
44be9ed4 433%if %{with enigmail}
283702b9
ER
434ext_dir=$RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/\{847b3a00-7ab1-11d4-8f02-006008948af5\}
435install -d $ext_dir/{chrome,components,defaults/preferences}
52fc61e6 436cd mozilla/dist/bin
0516fc42 437#cp -rfLp chrome/enigmail.jar $ext_dir/chrome
438#cp -rfLp chrome/enigmime.jar $ext_dir/chrome
52fc61e6
ER
439cp -rfLp components/enig* $ext_dir/components
440cp -rfLp components/libenigmime.so $ext_dir/components
f6a43e2f 441cp -rfLp components/libipc.so $ext_dir/components
52fc61e6
ER
442cp -rfLp components/ipc.xpt $ext_dir/components
443cp -rfLp defaults/preferences/enigmail.js $ext_dir/defaults/preferences
444cd -
52f5507d
ER
445cp -p %{topdir}/mozilla/mailnews/extensions/enigmail/package/install.rdf $ext_dir
446cp -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
463rm -rf $RPM_BUILD_ROOT
464
465%pretrans
466if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
467 mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
468fi
9e097178 469for 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
474done
475exit 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
This page took 0.130038 seconds and 4 git commands to generate.