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