File libpst.spec of Package libpst

#
# spec file for package libpst (Version 0.6.17)
#
# Copyright (c) 2008 Bharath Acharya
# Copyright (c) 2008 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 http://bugs.opensuse.org/
#

# norootforbuild

BuildRequires:  gcc-c++ gd-devel
%if %{defined suse_version}
BuildRequires:  pkg-config
%endif

Name:           libpst
Version:        0.6.17
Release:        2
Summary:        A library for reading PST files
Group:          Development/Libraries/C and C++
License:        GPL v2 or later
Source0:        %{name}0-%{version}.tar.bz2
Patch1:         so_fixes.patch
Patch2:         bug_fix.patch
Url:            http://www.gnome.org/projects/evolution/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       libpst0 = %{version}-%{release}
AutoReqProv:    on 

%description
The Libpst utilities include readpst which can convert email messages
to both mbox and MH mailbox formats, pst2ldif which can convert the
contacts to .ldif format for import into ldap databases, and pst2dii
which can convert email messages to the DII load file format used by
Summation.



%package -n libpst0
License:        GPL v2 or later
Summary:        Shared library for libpst
Group:          Development/Libraries/C and C++

%description -n libpst0
The Libpst utilities include readpst which can convert email messages
to both mbox and MH mailbox formats, pst2ldif which can convert the
contacts to .ldif format for import into ldap databases, and pst2dii
which can convert email messages to the DII load file format used by
Summation.



%package devel
License:        GPL v2 or later
Summary:        A library for reading PST files (devel package)
Group:          Development/Libraries/C and C++
Requires:       libpst0 = %{version}-%{release}

%description devel
The Libpst utilities include readpst which can convert email messages
to both mbox and MH mailbox formats, pst2ldif which can convert the
contacts to .ldif format for import into ldap databases, and pst2dii
which can convert email messages to the DII load file format used by
Summation.



%prep
%setup -q -n %{name}0-%{version}
%patch1
%patch2

%build
autoreconf -fi
%{configure} --disable-static
make

%install
make DESTDIR=$RPM_BUILD_ROOT install htmldir=%{_defaultdocdir}/%{name}

%post -n libpst0 -p /sbin/ldconfig

%postun -n libpst0 -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc %{_docdir}/%{name}  
%doc %{_mandir}/man?/* 
%{_bindir}/lspst
%{_bindir}/pst2ldif
%{_bindir}/readpst
%{_bindir}/readpstlog

%files -n libpst0
%defattr(-,root,root)
%{_libdir}/libpst.so.*

%files devel
%defattr(-,root,root)
%dir %{_includedir}/libpst
%{_includedir}/libpst/*.h
%{_libdir}/pkgconfig/libpst.pc
%{_libdir}/libpst.so
%{_libdir}/libpst.la

%changelog
* Tue Sep 09 2008 abharath@suse.de 
- Added
  + so_fixes.patch - Generate shared libraries
  + bug_fix.patch - Add a current_attach member to the pst_item structure.
* Fri Sep 05 2008 abharath@suse.de 
- Release version 0.6.17:
  + Initial check-in.