+
+%bcond_without ldap
+
%define mver 1.4
-%define subver 0
+%define subver 6
%define _db3ver 3.1.17
-%define _dbdir $RPM_BUILD_DIR/%{name}-%{version}/db3-headers-%{_db3ver}
+%define _dbdir $RPM_BUILD_DIR/%{name}-%{version}/db-%{_db3ver}
Summary: The GNOME2 Email/Calendar/Addressbook Suite
Summary(pl): Klient poczty dla GNOME2/Kalendarz/Ksi±¿ka Adresowa
Release: 1
License: GPL
Group: Applications/Mail
-Source0: http://ftp.gnome.org/mirror/gnome.org/sources/evolution/%{mver}/%{name}-%{version}.tar.bz2
-# Source0-md5: cc671769a912e315dc895f5b458e1a33
-Source1: http://www.t17.ds.pwr.wroc.pl/~wiget/%{name}-db3-headers-%{_db3ver}.tar.bz2
-# Source1-md5: 6e5690aa2f0e5ec3e3bdfeb9106ea42a
-Patch0: %{name}-nostaticdb3.patch
-Patch2: %{name}-configure_in.patch
-Patch3: %{name}-desktop.patch
+Source0: http://ftp.gnome.org/pub/gnome/sources/%{name}/%{mver}/%{name}-%{version}.tar.bz2
+# Source0-md5: 4138610c027177e6ffe92bdd565128a6
+Source1: http://www.sleepycat.com/update/snapshot/db-%{_db3ver}.tar.gz
+# Source1-md5: 5baeb94fb934d0bf783ea42117c400be
+Patch0: %{name}-nolibs.patch
+Patch1: %{name}-configure_in.patch
+Patch2: %{name}-desktop.patch
+Patch3: %{name}-pldify.patch
+Patch4: %{name}-iconv_flush.patch
+Patch5: %{name}-div_by_zero.patch
+Patch6: %{name}-ipv6.patch
+Patch7: %{name}-ipv6_smtp.patch
+Patch8: %{name}-timezone_offsets.patch
+Patch9: %{name}-gethostbyaddr.patch
+Patch10: %{name}-addrconfig.patch
+Patch11: %{name}-libpcs_libpas.patch
+Patch12: %{name}-no-static-in-shared.patch
+Patch13: %{name}-attachment_require_terminal.patch
URL: http://www.ximian.com/products/ximian_evolution/
BuildRequires: GConf2-devel
-BuildRequires: ORBit2-devel >= 2.3.0
+BuildRequires: ORBit2-devel >= 2.8.0
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
BuildRequires: flex
BuildRequires: freetype-devel >= 2.0.5
-BuildRequires: gal-devel >= 1.99.7
+BuildRequires: gal-devel >= 1:1.99.11
+BuildRequires: gcc-g77
BuildRequires: gettext-devel
+BuildRequires: gnome-common
BuildRequires: gnome-pilot-devel >= 2.0.0
-BuildRequires: gnome-vfs2-devel
-BuildRequires: gtk+2-devel
-Buildrequires: gtk-doc >= 0.6
-BuildRequires: gtkhtml-devel >= 3.0.5
+BuildRequires: gnome-vfs2-devel >= 2.4.0
+BuildRequires: gtk-doc >= 1.1
+BuildRequires: gtkhtml-devel >= 3.0.8
BuildRequires: intltool >= 0.18
-BuildRequires: libbonoboui-devel
BuildRequires: libglade2-devel
-BuildRequires: libgnomecanvas-devel
-BuildRequires: libgnomeprintui-devel >= 2.2.1
-BuildRequires: libgnomeui-devel
-BuildRequires: libsoup-devel >= 1.99.23
+BuildRequires: libgnomeprintui-devel >= 2.4.0
+BuildRequires: libgnomeui-devel >= 2.4.0
+BuildRequires: libsoup-devel >= 1.99.26-3
BuildRequires: libtool
-BuildRequires: libunicode-devel >= 0.4
BuildRequires: libxml2
BuildRequires: nspr-devel
BuildRequires: nss-devel
-BuildRequires: openldap-devel >= 2.0.0
-BuildRequires: openssl-devel >= 0.9.7
+%{?with_ldap:BuildRequires: openldap-devel >= 2.0.0}
+BuildRequires: openssl-devel >= 0.9.7d
BuildRequires: pilot-link-devel >= 0.11.4
BuildRequires: pkgconfig
BuildRequires: psmisc
BuildRequires: python
BuildRequires: scrollkeeper >= 0.1.4
+BuildRequires: which
Requires(post,postun): /sbin/ldconfig
Requires(post,postun): /usr/bin/scrollkeeper-update
Requires(post): GConf2
Requires: GConf2
Requires: bonobo-activation
-Requires: db3 = %{_db3ver}
-Requires: gal >= 1.99.4
-Requires: gtkhtml >= 3.0.3
+Requires: gal >= 1:1.99.11
+Requires: gtkhtml >= 3.0.8
Requires: libglade2
Requires: psmisc
Requires: scrollkeeper >= 0.1.4
Summary(pt_BR): Bibliotecas e arquivos de inclusão para desenvolvimento
Summary(zh_CN): Evolution×é¼þ¿ª·¢¿â
Group: Development/Libraries
+Requires: %{name} = %{version}
Requires: cyrus-sasl-devel
Requires: freetype-devel
-Requires: gal-devel >= 1.99.4
-Requires: gnome-vfs2-devel
-Requires: gtkhtml-devel >= 3.0.3
-Requires: libglade2-devel
-Requires: libgnomeprintui-devel >= 2.2.1
-Requires: libgnomeui-devel
-Requires: libunicode-devel
+Requires: gal-devel >= 1:1.99.9
+Requires: gnome-vfs2-devel >= 2.4.0
+Requires: gtkhtml-devel >= 3.0.8
+Requires: libglade2-devel >= 2.0.1
+Requires: libgnomeprintui-devel >= 2.4.0
+Requires: libgnomeui-devel >= 2.4.0
+Requires: libsoup-devel >= 1.99.23
Requires: nspr-devel
Requires: nss-devel
-Requires: openldap-devel
-Requires: openssl-devel >= 0.9.7
-Requires: %{name} = %{version}
+%{?with_ldap:Requires: openldap-devel >= 2.0.0}
+Requires: openssl-devel >= 0.9.7c
Obsoletes: evolution2-devel
%description devel
Summary(pl): Biblioteki statyczne dla evolution
Summary(pt_BR): Bibliotecas estáticas para desenvolvimento
Group: Development/Libraries
-Requires: %{name} = %{version}
+Requires: %{name}-devel = %{version}
Obsoletes: evolution2-static
%description static
Palmem.
%prep
-%setup -q -a 1
+%setup -q -a1
%patch0 -p1
+%patch1 -p1
%patch2 -p1
%patch3 -p1
+#%patch4 -p0
+#%patch5 -p0
+#%patch6 -p0
+#%patch7 -p0
+#%patch8 -p0
+#%patch9 -p1
+#%patch10 -p0
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
%build
-rm -f missing
+# first build db3 (only static, C interface)
+cd %{_dbdir}/build_unix
+CFLAGS="%{rpmcflags}" \
+../dist/configure \
+ --prefix=%{_prefix} \
+ --enable-static
+%{__make}
+cd $RPM_BUILD_DIR/%{name}-%{version}
+
+# build evolution
glib-gettextize --copy --force
intltoolize --copy --force
%{__libtoolize}
%{__autoconf}
%{__automake}
cd libical
-# workaround for libtoolize to install ltmain.sh in . not ..
-touch install-sh
%{__libtoolize}
%{__aclocal}
%{__autoheader}
%{__autoconf}
-%{__automake}
+# don't use -f here
+automake -a -c --foreign
cd ..
%configure \
--enable-gtk-doc \
--enable-pilot-conduits=yes \
- --with-openldap=yes \
+ %{?with_ldap:--with-openldap=yes} \
+ %{!?with_ldap:--with-openldap=no} \
--without-static-ldap \
--enable-nntp=no \
--enable-file-locking=fcntl --enable-dot-locking=no \
--with-nss-libs="%{_libdir}" \
--enable-ipv6=yes \
--with-html-dir=%{_gtkdocdir} \
- --with-db3-includes=%{_dbdir} \
- --with-db3-libs=/lib \
+ --with-db3-includes=%{_dbdir}/build_unix \
+ --with-db3-libs=%{_dbdir}/build_unix \
--with-kde-applnk-path=no
# hack to rebuild *.c and *.h from *.idl (check if needed with new versions)
omf_dest_dir=%{_omf_dest_dir}/%{name} \
GTKHTML_DATADIR=%{_datadir}/idl
-# strip doesn't pass this files and they aren't necessary, so remove them
+# strip doesn't pass these files and they aren't necessary, so remove them
# probably this should be done differently, but I have no idea
rm -f $RPM_BUILD_ROOT%{_libdir}/evolution/%{mver}/*/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/evolution/%{mver}/libemiscwidgets.a
-rm -f $RPM_BUILD_ROOT%{_libdir}/gnome-pilot/*/*.a
+rm -f $RPM_BUILD_ROOT%{_libdir}/gnome-pilot/*/*.{a,la}
-%find_lang %{name} --with-gnome --all-name
+%find_lang evolution-1.4 --with-gnome
%clean
rm -rf $RPM_BUILD_ROOT
%post
-/sbin/ldconfig %{_libdir}/evolution/%{mver}
/sbin/ldconfig
/usr/bin/scrollkeeper-update
%gconf_schema_install
/sbin/ldconfig
/usr/bin/scrollkeeper-update
-%files -f %{name}.lang
+%files -f evolution-1.4.lang
%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog NEWS* README
+%doc AUTHORS ChangeLog NEWS* README
%attr(755,root,root) %{_bindir}/*
%attr(755,root,root) %{_libdir}/evolution/*/*/*.so*
-%attr(755,root,root) %{_libdir}/evolution/%{mver}/*.so.*.*.*
+%attr(755,root,root) %{_libdir}/evolution/%{mver}/*.so.*
%attr(755,root,root) %{_libdir}/evolution/%{mver}/camel/*
%attr(755,root,root) %{_libdir}/evolution/%{mver}/evolution-alarm-notify
%attr(755,root,root) %{_libdir}/evolution/%{mver}/evolution-ldif-importer
%attr(755,root,root) %{_libdir}/evolution/%{mver}/evolution-wombat
%attr(755,root,root) %{_libdir}/evolution/%{mver}/evolution-addressbook-clean
%attr(755,root,root) %{_libdir}/evolution/%{mver}/evolution-addressbook-import
-%attr(755,root,root) %{_libdir}/evolution/%{mver}/evolution-launch-composer
%attr(755,root,root) %{_libdir}/evolution/%{mver}/csv2vcard
%attr(755,root,root) %{_libdir}/evolution/%{mver}/killev
%attr(755,root,root) %{_libdir}/evolution/%{mver}/load-*
%{_pixmapsdir}/*
%{_sysconfdir}/gconf/schemas/*
%{_omf_dest_dir}/%{name}
-%{_datadir}/gnome/help/*
%files devel
%defattr(644,root,root,755)
%files pilot
%defattr(644,root,root,755)
-%{_libdir}/gnome-pilot/conduits/*
+%attr(755,root,root) %{_libdir}/gnome-pilot/conduits/*
%{_datadir}/gnome-pilot/conduits/*