File evolution-exchange.spec of Package evolution-exchange

# spec file for package evolution-exchange
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define USE_EVOLDAP 0

Name:           evolution-exchange
# This should be updated upon major version changes; it should match BASE_VERSION as defined in of evolution.
%define evolution_base_version 3.4
BuildRequires:  db-devel
BuildRequires:  evoldap2-devel
BuildRequires:  openldap2-devel
BuildRequires:  evolution-devel >= 3.3.5
BuildRequires:  fdupes
BuildRequires:  intltool
BuildRequires:  krb5-devel
BuildRequires:  lzo-devel
BuildRequires:  mozilla-nss-devel
BuildRequires:  nss-shared-helper-devel
BuildRequires:  translation-update-upstream
BuildRequires:  pkgconfig(libical) >= 0.43
Version:        3.4.4
Release:        0
Summary:        Evolution Connector for Microsoft Exchange Server 2000/2003
License:        GPL-2.0+
Group:          Productivity/Networking/Email/Utilities
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
DocDir:         %{_defaultdocdir}/evolution-exchange
Recommends:     %{name}-lang
Provides:       ximian-connector
Obsoletes:      %{name}-doc <= %{version}
Obsoletes:      ximian-connector

With the Connector for Microsoft Exchange installed, Evolution
functions as an Exchange client, enabling users to become full
participants in companywide group scheduling and other collaborative
tasks. Linux and Solaris users can access public folders, Global
Address Lists, e-mail, calendar, task lists, and group scheduling

%setup -q

%{configure} \
        --with-openldap=%{_libdir}/evoldap \
        --with-openldap=yes \
        --with-krb5=%{_prefix} \
make %{?_smp_mflags} V=1

find %{buildroot} -name '*.la' -type f -delete -print
%find_lang evolution-exchange-%evolution_base_version %{?no_lang_C}
# Since there's no devel subpackage, there's no point in shipping
# gtk-doc documentation.
rm -r %{buildroot}%{_datadir}/gtk-doc/html/%{name}
  %{__mv} %{buildroot}%{_bindir}/exchange-connector-setup-%{evolution_base_version} %{buildroot}%{_bindir}/exchange-connector-setup-%{evolution_base_version}.bin
  echo -e "#!/bin/bash\n\nLD_LIBRARY_PATH=%{_libdir}/evoldap/lib exec -a \"%{_bindir}/exchange-connector-setup-%{evolution_base_version}\" %{_bindir}/exchange-connector-setup-%{evolution_base_version}.bin \"\$@\"" > %{buildroot}%{_bindir}/exchange-connector-setup-%{evolution_base_version}
  %{__chmod} +x %{buildroot}%{_bindir}/exchange-connector-setup-%{evolution_base_version}
%fdupes %{buildroot}

%pre -f %{name}.schemas_pre

%posttrans -f %{name}.schemas_posttrans

%preun -f %{name}.schemas_preun

%files -f evolution-exchange.schemas_list
%defattr(-, root, root)

%files lang -f evolution-exchange-%{evolution_base_version}.lang