]> git.pld-linux.org Git - packages/thunderbird.git/blame - icedove.spec
- forcibly remove nss/nspr/sqlite/mozldap libraries
[packages/thunderbird.git] / icedove.spec
CommitLineData
c4ddd260 1# TODO:
c4ddd260 2# - separate spec for enigmail
283702b9
ER
3# - fix icedove (building) and installing nss/nspr libs!
4# - build and use system sqlite3 library!
5# - build with system mozldap
c4ddd260 6#
44be9ed4 7# Conditional builds
8%bcond_without enigmail # don't build enigmail - GPG/PGP support
9%bcond_without gnomeui # disable gnomeui support
10%bcond_without gnomevfs # disable GNOME comp. (gconf+libgnome+gnomevfs) and gnomevfs ext.
11%bcond_without gnome # disable all GNOME components (gnome+gnomeui+gnomevfs)
12%bcond_without ldap # disable e-mail address lookups in LDAP directories
6578c165 13%bcond_without lightning # disable sunbird calendar
88149483
ER
14%bcond_with xulrunner # build with system xulrunner
15
44be9ed4 16%if %{without gnome}
17%undefine with_gnomeui
18%undefine with_gnomevfs
19%endif
88149483 20
6578c165 21%define enigmail_ver 1.0.1
44be9ed4 22
23Summary: Icedove - email client
24Summary(pl.UTF-8): Icedove - klient poczty
25Name: icedove
c3fd9af5 26Version: 3.0.4
283702b9 27Release: 1.2
44be9ed4 28License: MPL 1.1 or GPL v2+ or LGPL v2.1+
29Group: Applications/Networking
cadfb931 30Source0: http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/thunderbird-%{version}.source.tar.bz2
c3fd9af5 31# Source0-md5: bb87ca7e62d5869422137765126798be
44be9ed4 32Source1: http://www.mozilla-enigmail.org/download/source/enigmail-%{enigmail_ver}.tar.gz
6578c165 33# Source1-md5: 508ca9ab0396afb49e82eda88014924b
44be9ed4 34Source2: %{name}-branding.tar.bz2
6578c165 35# Source2-md5: 2da351522bdd7f4a3bd8aaff4c776976
44be9ed4 36Source3: %{name}-rm_nonfree.sh
37Source4: %{name}.desktop
38Source5: %{name}.sh
2f151de0 39Source6: %{name}-enigmail.manifest
44be9ed4 40Patch0: %{name}-branding.patch
faa5c89d
SP
41Patch1: %{name}-enigmail-shared.patch
42Patch2: %{name}-gcc.patch
43Patch3: %{name}-fonts.patch
44Patch4: %{name}-install.patch
5e9bb798 45Patch5: %{name}-hunspell.patch
faa5c89d 46Patch6: %{name}-prefs.patch
4922c320 47URL: http://www.pld-linux.org/Packages/Icedove
44be9ed4 48%{?with_gnomevfs:BuildRequires: GConf2-devel >= 1.2.1}
49BuildRequires: automake
50BuildRequires: freetype-devel >= 1:2.1.8
51%{?with_gnomevfs:BuildRequires: gnome-vfs2-devel >= 2.0}
52BuildRequires: gtk+2-devel >= 1:2.0.0
5e9bb798 53BuildRequires: hunspell-devel
44be9ed4 54BuildRequires: libIDL-devel >= 0.8.0
55%{?with_gnomevfs:BuildRequires: libgnome-devel >= 2.0}
56%{?with_gnomeui:BuildRequires: libgnomeui-devel >= 2.2.0}
57BuildRequires: libjpeg-devel >= 6b
58BuildRequires: libpng-devel >= 1.2.0
59BuildRequires: libstdc++-devel
cadfb931
SP
60BuildRequires: nspr-devel >= 1:4.8
61BuildRequires: nss-devel >= 1:3.12.0
44be9ed4 62BuildRequires: pango-devel >= 1:1.1.0
1c62cadb 63BuildRequires: pkgconfig
44be9ed4 64BuildRequires: sed >= 4.0
1c62cadb 65BuildRequires: startup-notification-devel >= 0.8
44be9ed4 66BuildRequires: xorg-lib-libXext-devel
44be9ed4 67BuildRequires: xorg-lib-libXinerama-devel
44be9ed4 68BuildRequires: xorg-lib-libXt-devel
1c62cadb 69BuildRequires: zip
44be9ed4 70Requires: myspell-common
71Requires: nspr >= 1:4.6.1
72Requires: nss >= 1:3.11.3
73Obsoletes: mozilla-thunderbird
74Obsoletes: mozilla-thunderbird-dictionary-en-US
75BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
76
9e366f18
AM
77%define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+
78
44be9ed4 79# iceweasel/icedove/iceape provide their own versions
80%define _noautoreqdep libgfxpsshar.so libgkgfx.so libgtkxtbin.so libjsj.so libxpcom_compat.so libxpcom_core.so libxpistub.so
81%define _noautoprovfiles %{_libdir}/%{name}/components
82# we don't want these to satisfy xulrunner-devel
83%define _noautoprov libgtkembedmoz.so libldap50.so libmozjs.so libprldap50.so libssldap50.so libxpcom.so libxul.so
84# and as we don't provide them, don't require either
85%define _noautoreq libgtkembedmoz.so libldap50.so libmozjs.so libprldap50.so libssldap50.so libxpcom.so libxul.so
86
87%description
88Icedove is an open-source,fast and portable email client.
89
90%description -l pl.UTF-8
91Icedove jest open sourcowym, szybkim i przenośnym klientem poczty.
92
6578c165 93%package addon-lightning
94Summary: An integrated calendar for Icedove
95Summary(pl.UTF-8): Zintegrowany kalendarz dla Icedove
96License: MPL 1.1 or GPL v2+ or LGPL v2.1+
97Group: Applications/Networking
98Requires: %{name} = %{version}-%{release}
99
100%description addon-lightning
101Lightning is an calendar extension to Icedove email client.
102
103%description addon-lightning -l pl.UTF-8
104Lightning to rozszerzenie do klienta poczty Icedove dodające
105funkcjonalność kalendarza.
106
44be9ed4 107%package addon-enigmail
108Summary: Extension for the authentication and encryption features provided by GnuPG
109Summary(pl.UTF-8): Rozszerzenie do uwierzytelniania i szyfrowania zapewnianego przez GnuPG
110License: MPL/LGPL
111Group: Applications/Networking
112URL: http://enigmail.mozdev.org/
cd056caa 113Requires: %{name} = %{version}-%{release}
d076d93e 114Requires: gnupg
75991bbb 115Obsoletes: mozilla-thunderbird-addon-enigmail
44be9ed4 116
117%description addon-enigmail
c5e06599 118Enigmail is an extension to the Icedove mail client which allows users
119to access the authentication and encryption features provided by
120GnuPG.
44be9ed4 121
122Main Features:
123- Encrypt/sign mail when sending, decrypt/authenticate received mail
124- Support for inline-PGP (RFC 2440) and PGP/MIME (RFC 3156)
125- Per-Account based encryption and signing defaults
126- Per-Recipient rules for automated key selection, and
127 enabling/disabling encryption and signing
128- OpenPGP key management interface
129
130%description addon-enigmail -l pl.UTF-8
c5e06599 131Enigmail to rozszerzenie klienta pocztowego Icedove pozwalające
faa5c89d
SP
132użytkownikom na dostęp do uwierzytelniania i szyfrowania zapewnianego
133przez GnuPG.
44be9ed4 134
135Główne możliwości:
136- szyfrowanie/podpisywanie poczty przy wysyłaniu,
137 odszyfrowywanie/uwierzytelnianie poczty odebranej
138- obsługa inline-PGP (RFC 2440) i PGP/MIME (RFC 3156)
139- ustawienia domyślne szyfrowania i podpisywania dla każdego konta
140- reguły automatycznego wyboru kluczy i włączenia szyfrowania oraz
141 podpisywania dla każdego adresata
142- interfejs do zarządzania kluczami OpenPGP
143
144%prep
983562b1 145%setup -qc
146mv -f comm-1.9.1 mozilla
147%setup -q -T -D -a2
148cd mozilla
44be9ed4 149%{?with_enigmail:tar xvfz %{SOURCE1} -C mailnews/extensions}
150/bin/sh %{SOURCE3}
983562b1 151%patch0 -p1
faa5c89d
SP
152%{?with_enigmail:%patch1 -p1}
153%patch2 -p1
4ccc2157 154%patch3 -p1
faa5c89d 155%patch4 -p1
5e9bb798 156%patch5 -p1
983562b1 157%patch6 -p1
44be9ed4 158
159%build
983562b1 160cd mozilla
44be9ed4 161export CFLAGS="%{rpmcflags} `%{_bindir}/pkg-config mozilla-nspr --cflags-only-I`"
162export CXXFLAGS="%{rpmcflags} `%{_bindir}/pkg-config mozilla-nspr --cflags-only-I`"
163
cadfb931
SP
164cp -f %{_datadir}/automake/config.* mozilla/build/autoconf
165cp -f %{_datadir}/automake/config.* mozilla/nsprpub/build/autoconf
44be9ed4 166cp -f %{_datadir}/automake/config.* directory/c-sdk/config/autoconf
167
168cat << 'EOF' > .mozconfig
cb0e4412
SP
169mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu}
170
59c5a0e8 171# Options for 'configure' (same as command-line options).
44be9ed4 172ac_add_options --prefix=%{_prefix}
173ac_add_options --exec-prefix=%{_exec_prefix}
174ac_add_options --bindir=%{_bindir}
175ac_add_options --sbindir=%{_sbindir}
176ac_add_options --sysconfdir=%{_sysconfdir}
177ac_add_options --datadir=%{_datadir}
178ac_add_options --includedir=%{_includedir}
179ac_add_options --libdir=%{_libdir}
180ac_add_options --libexecdir=%{_libexecdir}
181ac_add_options --localstatedir=%{_localstatedir}
182ac_add_options --sharedstatedir=%{_sharedstatedir}
183ac_add_options --mandir=%{_mandir}
184ac_add_options --infodir=%{_infodir}
185%if %{?debug:1}0
59c5a0e8 186ac_add_options --disable-optimize
44be9ed4 187ac_add_options --enable-debug
188ac_add_options --enable-debug-modules
59c5a0e8
SP
189ac_add_options --enable-debugger-info-modules
190ac_add_options --enable-crash-on-assert
44be9ed4 191%else
192ac_add_options --disable-debug
193ac_add_options --disable-debug-modules
59c5a0e8
SP
194ac_add_options --disable-logging
195ac_add_options --enable-optimize="%{rpmcflags} -Os"
44be9ed4 196%endif
88149483
ER
197ac_add_options --disable-strip
198ac_add_options --disable-strip-libs
44be9ed4 199%if %{with tests}
200ac_add_options --enable-tests
201%else
202ac_add_options --disable-tests
203%endif
204%if %{with gnomeui}
205ac_add_options --enable-gnomeui
206%else
207ac_add_options --disable-gnomeui
208%endif
209%if %{with gnomevfs}
210ac_add_options --enable-gnomevfs
211%else
212ac_add_options --disable-gnomevfs
213%endif
214%if %{with ldap}
215ac_add_options --enable-ldap
216%else
217ac_add_options --disable-ldap
218%endif
59c5a0e8 219ac_add_options --disable-crashreporter
59c5a0e8 220ac_add_options --disable-xterm-updates
59c5a0e8 221ac_add_options --enable-postscript
d076d93e 222%if %{with lightning}
cb0e4412 223ac_add_options --enable-calendar
d076d93e
SP
224%else
225ac_add_options --disable-calendar
226%endif
44be9ed4 227ac_add_options --disable-installer
228ac_add_options --disable-jsd
88149483 229ac_add_options --disable-updater
44be9ed4 230ac_add_options --disable-xprint
cadfb931
SP
231ac_add_options --disable-permissions
232ac_add_options --disable-pref-extensions
44be9ed4 233ac_add_options --enable-canvas
234ac_add_options --enable-crypto
44be9ed4 235ac_add_options --enable-mathml
44be9ed4 236ac_add_options --enable-pango
237ac_add_options --enable-reorder
5f2ef1b6 238ac_add_options --enable-static
88149483
ER
239ac_add_options --enable-startup-notification
240ac_add_options --enable-svg
44be9ed4 241ac_add_options --enable-system-cairo
5e9bb798 242ac_add_options --enable-system-hunspell
44be9ed4 243ac_add_options --enable-xft
cadfb931
SP
244ac_add_options --enable-application=mail
245ac_add_options --enable-default-toolkit=cairo-gtk2
44be9ed4 246ac_add_options --enable-xinerama
88149483
ER
247ac_add_options --with-distribution-id=org.pld-linux
248ac_add_options --with-branding=icedove/branding
249%if %{with xulrunner}
250ac_add_options --with-libxul-sdk=%{_libdir}/xulrunner-sdk
251%endif
252ac_add_options --with-pthreads
253ac_add_options --with-system-bz2
44be9ed4 254ac_add_options --with-system-jpeg
255ac_add_options --with-system-nspr
256ac_add_options --with-system-nss
257ac_add_options --with-system-png
258ac_add_options --with-system-zlib
44be9ed4 259ac_add_options --enable-single-profile
260ac_add_options --disable-profilesharing
44be9ed4 261ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
262EOF
263
90e998ba 264%{__make} -j1 -f client.mk build \
d076d93e
SP
265 STRIP="/bin/true" \
266 CC="%{__cc}" \
44be9ed4 267 CXX="%{__cxx}"
268
269%if %{with enigmail}
59c5a0e8 270cd mailnews/extensions/enigmail
d076d93e 271./makemake -r
59c5a0e8 272%{__make} -C ../../../obj-%{_target_cpu}/mailnews/extensions/enigmail \
d076d93e
SP
273 STRIP="/bin/true" \
274 CC="%{__cc}" \
275 CXX="%{__cxx}"
44be9ed4 276%endif
277
278%install
279rm -rf $RPM_BUILD_ROOT
280install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_pixmapsdir},%{_desktopdir}} \
60c77977
SP
281 $RPM_BUILD_ROOT%{_datadir}/%{name}
282install -d $RPM_BUILD_ROOT%{_libdir}/%{name}
44be9ed4 283
983562b1 284cd mozilla
cb0e4412 285%{__make} -C obj-%{_target_cpu}/mail/installer stage-package \
44be9ed4 286 DESTDIR=$RPM_BUILD_ROOT \
287 MOZ_PKG_APPDIR=%{_libdir}/%{name} \
288 PKG_SKIP_STRIP=1
289
290# move arch independant ones to datadir
291mv $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome
292mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults
293mv $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs $RPM_BUILD_ROOT%{_datadir}/%{name}/greprefs
44be9ed4 294mv $RPM_BUILD_ROOT%{_libdir}/%{name}/isp $RPM_BUILD_ROOT%{_datadir}/%{name}/isp
295mv $RPM_BUILD_ROOT%{_libdir}/%{name}/res $RPM_BUILD_ROOT%{_datadir}/%{name}/res
296ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome
297ln -s ../../share/%{name}/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults
298ln -s ../../share/%{name}/greprefs $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs
44be9ed4 299ln -s ../../share/%{name}/isp $RPM_BUILD_ROOT%{_libdir}/%{name}/isp
300ln -s ../../share/%{name}/res $RPM_BUILD_ROOT%{_libdir}/%{name}/res
301
302rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
303ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
304
305%{__sed} -e 's,@LIBDIR@,%{_libdir},' %{SOURCE5} > $RPM_BUILD_ROOT%{_bindir}/icedove
306ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/thunderbird
307ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/mozilla-thunderbird
308
309install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
310
311%if %{with enigmail}
283702b9
ER
312ext_dir=$RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/\{847b3a00-7ab1-11d4-8f02-006008948af5\}
313install -d $ext_dir/{chrome,components,defaults/preferences}
314mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome/enigmail.jar $ext_dir/chrome
315mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/components/enig* $ext_dir/components
316mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/components/libenigmime.so $ext_dir/components
317mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/components/ipc.xpt $ext_dir/components
318mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults/preferences/enigmail.js $ext_dir/defaults/preferences
319cp -f mailnews/extensions/enigmail/package/install.rdf $ext_dir
44be9ed4 320rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults/preferences
321rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome/enigmail-en-US.jar
322rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome/enigmail-skin.jar
323rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome/enigmime.jar
324rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/components/enig*
325rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/components/libenigmime.so
326rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/components/ipc.xpt
283702b9 327cp -f %{SOURCE6} $ext_dir/chrome.manifest
983562b1 328cp -f icedove/branding/content/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/icedove.png
44be9ed4 329%endif
330
331# win32 stuff
332rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/dirver
333
283702b9
ER
334# nss
335rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{freebl3,nss3,nssckbi,nssdbm3,nssutil3,smime3,softokn3,ssl3}.*
336# nspr
337rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{nspr4,plc4,plds4}.so
338# sqlite3
339rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/libsqlite3.so
340# mozldap
341rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{ldap,ldif,prldap,ssldap}60.so
342
44be9ed4 343%clean
344rm -rf $RPM_BUILD_ROOT
345
346%pretrans
347if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
348 mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
349fi
bc9cd18a 350for d in chrome defaults greprefs icons isp res; do
44be9ed4 351 if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then
352 install -d %{_datadir}/%{name}
353 mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d
354 fi
355done
356exit 0
357
358%files
359%defattr(644,root,root,755)
360%attr(755,root,root) %{_bindir}/icedove
361%attr(755,root,root) %{_bindir}/mozilla-thunderbird
362%attr(755,root,root) %{_bindir}/thunderbird
363%dir %{_libdir}/%{name}
60c77977 364%{_libdir}/%{name}/*.ini
44be9ed4 365%dir %{_libdir}/%{name}/components
366%attr(755,root,root) %{_libdir}/%{name}/components/*.so
367%{_libdir}/%{name}/components/*.js
368%{_libdir}/%{name}/components/*.xpt
283702b9
ER
369%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so
370%attr(755,root,root) %{_libdir}/%{name}/libxpcom.so
371%attr(755,root,root) %{_libdir}/%{name}/libxpcom_core.so
44be9ed4 372%attr(755,root,root) %{_libdir}/%{name}/*.sh
373%attr(755,root,root) %{_libdir}/%{name}/*-bin
374%attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client
bc9cd18a 375%attr(755,root,root) %{_libdir}/%{name}/icedove
44be9ed4 376
377# symlinks
378%{_libdir}/%{name}/chrome
379%{_libdir}/%{name}/defaults
380%{_libdir}/%{name}/dictionaries
381%{_libdir}/%{name}/greprefs
44be9ed4 382%{_libdir}/%{name}/isp
383%{_libdir}/%{name}/res
384
385%{_libdir}/%{name}/dependentlibs.list
5e9bb798 386%{_pixmapsdir}/*.png
44be9ed4 387%{_desktopdir}/*.desktop
388
389%dir %{_datadir}/%{name}
390%{_datadir}/%{name}/chrome
391%{_datadir}/%{name}/defaults
392%{_datadir}/%{name}/greprefs
44be9ed4 393%{_datadir}/%{name}/isp
394%{_datadir}/%{name}/res
395
60c77977
SP
396%dir %{_libdir}/%{name}/modules
397%{_libdir}/%{name}/modules/*.js*
398%dir %{_libdir}/%{name}/modules/activity
399%{_libdir}/%{name}/modules/activity/*.js
400%dir %{_libdir}/%{name}/modules/gloda
401%{_libdir}/%{name}/modules/gloda/*.js
402
44be9ed4 403%dir %{_libdir}/%{name}/extensions
404%{_libdir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
6578c165 405
406%if %{with lightning}
407%files addon-lightning
408%defattr(644,root,root,755)
94402182 409%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}
6578c165 410%{_libdir}/%{name}/extensions/calendar-timezones@mozilla.org
411%endif
44be9ed4 412
413%if %{with enigmail}
414%files addon-enigmail
415%defattr(644,root,root,755)
416%{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}
417%endif
This page took 0.141397 seconds and 4 git commands to generate.