

#  
#  RPM spec file for the Evolution Brutus plugin.
#  Copyright (C) 2005-2007 OMC Denmark ApS
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
#  MA 02111-1307 USA
#

%define evo_ver @EVOLUTION_VERSION@
%define camel_provider_dir @RPM_CAMEL_providerdir@
%define eds_api_version @EDS_API_VERSION@
%define eds_base_version @EDS_BASE_VERSION@
@RPM_SPEC_SUSE_PREFIX@
@RPM_SPEC_SUSE_DOCDIR@

Summary:         A Brutus based Exchange connector for Novell Evolution 2.4 and later
Name:            @EVOLUTION_BRUTUS_NAME@
Version:         @EVOLUTION_BRUTUS_VERSION@
Release:         1%{?dist}
License:         GPLv2+
Group:           Applications/Productivity
Source0:         http://www.omesc.com/sites/default/files/downloads/dist/%{name}/@BRUTUS_DIST_RELEASE@/SOURCES/%{name}-%{version}.tar.gz
BuildRoot:       %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
URL:             http://trac.brutus.net/evolution-brutus/wiki/Faq
BuildRequires:   @RPM_SPEC_ORBIT2@-devel >= @ORBIT2_REQUIRED@
BuildRequires:   evolution-data-server-devel >= @EDS_BASE_VERSION_REQUIRED@
BuildRequires:   intltool >= @INTLTOOL_REQUIRED@
BuildRequires:   brutus-keyring-devel >= @BRUTUS_KEYRING_REQUIRED@
BuildRequires:   ImageMagick-devel
BuildRequires:   evolution-devel
BuildRequires:   db4-devel
BuildRequires:   gettext
BuildRequires:   wget
@RPM_SPEC_BUILDREQUIRES_1@
@RPM_SPEC_BUILDREQUIRES_2@
@RPM_SPEC_BUILDREQUIRES_3@
Requires:        @RPM_SPEC_ORBIT2@ >= @ORBIT2_REQUIRED@
Requires:        @RPM_SPEC_LIBIDL@ >= @LIBIDL_REQUIRED@
Requires:        evolution
Requires:        evolution-data-server >= @EDS_BASE_VERSION_REQUIRED@
Requires:        brutus-keyring >= @BRUTUS_KEYRING_REQUIRED@

%description
This is the Brutus Connector for Microsoft Exchange, which 
adds support for Microsoft Exchange 5.5 and later to Novell 
Evolution 2.4 and later. It works by connecting Evolution
to a Brutus server which in turns connects Evolution to 
Exchange.

A Brutus server must be running on the Windows side if you 
want to use this plugin. Please see <http://www.omesc.com/> 
for the details.

You will need to install this package and evolution-brutus-devel if 
you want to write programs that use Brutus technology.

%package devel
Summary:          IDL and header files for evolution-brutus
Group:            Development/Libraries
Requires:         %name = %{version}-%{release}
Requires:         pkgconfig >= @PKGCONFIG_REQUIRED@
Requires:         evolution-data-server-devel >= @EDS_BASE_VERSION_REQUIRED@
Requires:         brutus-keyring-devel >= @BRUTUS_KEYRING_REQUIRED@

%description devel 
This is the Brutus Connector for Microsoft Exchange, which 
adds support for Microsoft Exchange 5.5 and later to Novell 
Evolution 2.4 and later.

This package contains the header files, libraries and utilities
necessary to write Brutus client programs.

@RPM_SPEC_DEBUGINFO@
%prep
%setup -q 

%build
@RPM_SPEC_CONFIGURE@
make %{?_smp_mflags}

%install 
rm -rf %{buildroot}
make INSTALL="install -c -p" DESTDIR=%{buildroot} install
find %{buildroot}%{_libdir}/ -name '*.la' -exec rm {} \;

%{find_lang} %{name}-%{evo_ver}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post devel -p /sbin/ldconfig

%postun devel -p /sbin/ldconfig

%clean 
rm -rf %{buildroot}

%files -f %{name}-%{evo_ver}.lang
%defattr(-,root,root,-)
%dir %{_docdir}/@EVOLUTION_BRUTUS_NAME@-@EVOLUTION_BRUTUS_VERSION@
%{_bindir}/*
%{_libexecdir}/brutus-query-password
%{_libdir}/%{camel_provider_dir}/*
%{_libdir}/libBrutus*.so.*
%{_libdir}/evolution-data-server-%{eds_api_version}/extensions/*
%{_docdir}/@EVOLUTION_BRUTUS_NAME@-@EVOLUTION_BRUTUS_VERSION@/using_evolution-brutus
%{_docdir}/@EVOLUTION_BRUTUS_NAME@-@EVOLUTION_BRUTUS_VERSION@/COPYING
%{_docdir}/@EVOLUTION_BRUTUS_NAME@-@EVOLUTION_BRUTUS_VERSION@/README

%files devel
%defattr(-,root,root,-)
%dir %{_includedir}/evolution-data-server-%{eds_base_version}/brutus
%dir %{_includedir}/brutusd-@BRUTUSD_VERSION@
%dir %{_datadir}/@BRUTUS_idl_install_subdir@
%dir %{_docdir}/@EVOLUTION_BRUTUS_NAME@-devel-@EVOLUTION_BRUTUS_VERSION@
%{_includedir}/evolution-data-server-%{eds_base_version}/brutus/*
%{_includedir}/brutusd-@BRUTUSD_VERSION@/*
%{_includedir}/brutus-logd-@BRUTUS_LOGD_VERSION@/*
%{_libdir}/libBrutus*.so
%{_libdir}/pkgconfig/libBrutus*
%{_datadir}/@BRUTUS_idl_install_subdir@/*
%{_docdir}/@EVOLUTION_BRUTUS_NAME@-devel-@EVOLUTION_BRUTUS_VERSION@/building_from_source
%{_docdir}/@EVOLUTION_BRUTUS_NAME@-devel-@EVOLUTION_BRUTUS_VERSION@/INSTALL

%changelog
* Thu Jun 5 2008 Jules Colding <colding@42tools.com> 1.2.15-1
- New version

* Mon Apr 7 2008 Jules Colding <colding@42tools.com> 1.2.11-1
- Updated to Rawhide and Fedora 8

* Fri Aug 26 2007 Jules Colding <colding@omesc.com> 1.1.28.5-1
- Changed license tag to reflect GPLv2 "or later"

* Thu Jun 26 2007 Jules Colding <colding@omesc.com> 1.1.28.0-1
- Separated brutus-keyring from this package

* Mon Apr 30 2007 Jules Colding <colding@omesc.com> 1.1.26-2
- Fixes from Brian Pepple

* Thu Apr 26 2007 Jules Colding <colding@omesc.com> 1.1.26-1
- Migrated away from GPGME and are now using libgcrypt in brutus-keyring

* Sat Apr 14 2007 Jules Colding <colding@omesc.com> 1.1.25-9
- Added brutus-keyring related files and directories to this spec

* Thu Apr 12 2007 Jules Colding <colding@omesc.com> 1.1.25-4
- Fixed several Fedora review issues:
  a) Fixed duplicate CFLAGS due to an error in configure.in
  b) Removed redundant inclused from *.pc.in files
  c) Corrected Source0 to point at the right source tar-ball
- Stopped using gnome-keyring. Integrated with the new
  brutus-keyring instead.

* Thu Mar 29 2007 Jules Colding <colding@omesc.com> 1.1.25-3
- Fixed OpenSUSE 10.2 and Rawhide build issues

* Fri Feb 9 2007 Jules Colding <colding@omesc.com> 1.1.24-2
- German translation contributed by Daniel Paessler
- Logon issues fixed
- Makefile cleanups
- Small documentation improvements

* Fri Dec 1 2006 Jules Colding <colding@omesc.com> 1.1.22-1
- Implement offline mode for access to folders and messages
- Fix a segv in the password query helper application

* Tue Nov 14 2006 Jules Colding <colding@omesc.com> 1.1.15-1
- Fix retrieval of summary information for large MAPI folders

* Tue Nov 7 2006 Jules Colding <colding@omesc.com> 1.1.14-1
- Fix typo in libBrutus.pc.in
- Cleanup configure.in
- Fix handling of passwords with trailing whitespace in 
  brutus-query-password

* Tue Nov 7 2006 Jules Colding <colding@omesc.com> 1.1.13-1
- Fix 'non-weak-symbols' warnings from rpmlint on libBrutus

* Mon Nov 6 2006 Jules Colding <colding@omesc.com> 1.1.12-1
- Fix rpmlint warning

* Sat Nov 4 2006 Jules Colding <colding@omesc.com> 1.1.11-1
- Remove non-devel files from non-devel package
- configure.in cleanups

* Sat Nov 4 2006 Jules Colding <colding@omesc.com> 1.1.10-1
- Update the Brutus Server version requirement - now at 0.9.32.x
- Remove libglade2-devel from BuildRequires 
- Remove unneeded Requires from devel package
- Fix bad keyring password retrieval bug
- Fix nonsense in libBrutus-1.0.pc.in

* Fri Nov 3 2006 Jules Colding <colding@omesc.com> 1.1.9-1
- Added 'define's to specify version dependent directories or 
  files. These defines are automatically set to their correct 
  values when autogen.sh is executed.
- configure.in cleaned up
- I am now releasing a new source tar-ball whenever the source 
  is changed in any way. This means that changes from, say, 1.1.9-1
  to 1.1.9-2 is only happening if a patch is applied on top of 
  the original tar-ball. This probably will not happen as long as 
  I am the primary packager as I would prefer to just release a 
  new upstream tar-ball instead of distributing a patch.
- Changes related to how the Ubuntu debs are created made it
  easier for me to explicitly install the docs instead of 
  relying on the doc macro.
- Added evolution-devel to BuildRequires

* Mon Oct 30 2006 Jules Colding <colding@omesc.com> 1.1.7-3
- Fix error regarding hardcoded path for camel-providers
- Fix warning for non-weak symbol in libBrutusd
- Remove gnome-common for "Requires"
- Fix version handling of locale files
- Rewmove claim of ownership for /usr/share/idl
- Fix all .pc.in files that contained unresolved autoconf variables
- Remove IDL_INCLUDES from all .pc.in files

* Thu Oct 27 2006 Jules Colding <colding@omesc.com> 1.1.7-2
- Fix doc in devel package
- Remove an additional changelog that had crept in 
- The changes referred to in the entry below is a range of
  updates and fixes to "configure.in".
- Fix ownership of datadir/idl
- Remove unneeded AutoReq
- Fix devel "Requires:"
- Update description
- Pointed "URL" to the FAQ entry for evolution-brutus

* Thu Oct 19 2006 Jules Colding <colding@omesc.com> 1.1.7-1
- Enough changes accumulated while working on Ubuntu edgy that 
  a new release was in order.

* Mon Oct 9 2006 Jules Colding <colding@omesc.com> 1.1.6-12
- Rebuild for Brutus Server 0.9.31

* Tue Sep 19 2006 Jules Colding <colding@omesc.com> 1.1.6-11
- Rebuild

* Wed Sep 13 2006 Jules Colding <colding@omesc.com> 1.1.6-10
- Fix ownership of yet another directory created by this package
- Add automatic detection of Evolution version

* Tue Sep 12 2006 Jules Colding <colding@omesc.com> 1.1.6-9
- Preserving timestamps of installed files
- Fix ownership of directories created by this package

* Fri Sep 8 2006 Jules Colding <colding@omesc.com> 1.1.6-8
- Consistently use the buildroot macro instead of RPM_BUILD_ROOT

* Thu Sep 7 2006 Jules Colding <colding@omesc.com> 1.1.6-7
- Enabled Autoreq

* Thu Sep 7 2006 Jules Colding <colding@omesc.com> 1.1.6-6
- Replace autogenerated e-d-s base version requirement with 
  minimum e-d-s base version requirement

* Wed Sep 6 2006 Jules Colding <colding@omesc.com> 1.1.6-5
- Fix Fedora Core 6 Test 2 build issues

* Tue Sep 5 2006 Jules Colding <colding@omesc.com> 1.1.6-4
- Remove libtool archive files from install

* Tue Sep 5 2006 Jules Colding <colding@omesc.com> 1.1.6-4
- Replace makeinstall macro with recommended make command

* Wed Aug 23 2006 Jules Colding <colding@omesc.com> 1.1.6-2
- rpmlint warnings fixed

* Tue Aug 22 2006 Jules Colding <colding@omesc.com> 1.1.6-1
- Submitted for review and inclusion in Fedora Extras

* Tue Jan 31 2006 Jules Colding <colding@omesc.com> 0.9.3-1
- Initial RPM release

