+#
+# Conditional build:
+%bcond_without static_libs # don't build static libraries
+#
Summary: Library for reading .pst files
Summary(pl.UTF-8): Biblioteka do czytania plików .pst
Name: libpst
-Version: 0.6.34
+Version: 0.6.61
Release: 1
-License: GPL v2
+License: GPL v2+
Group: Libraries
Source0: http://www.five-ten-sg.com/libpst/packages/%{name}-%{version}.tar.gz
-# Source0-md5: 092067121a7f8c5f8bea8b3cdc31f5e6
+# Source0-md5: f317c8787d4db690a14f2c5e3813c3b1
URL: http://www.five-ten-sg.com/libpst/
BuildRequires: ImageMagick
BuildRequires: autoconf >= 2.59
BuildRequires: automake
+BuildRequires: boost-python-devel
BuildRequires: gd-devel
+BuildRequires: libgsf-devel
BuildRequires: libstdc++-devel
BuildRequires: libtool
+BuildRequires: python-devel
+BuildRequires: python-modules
+BuildRequires: rpm-pythonprov
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-Library for reading .pst files.
+Library for reading PST (MS Outlook Personal Folders) files.
%description -l pl.UTF-8
Biblioteka do czytania plików .pst.
%description tools -l pl.UTF-8
Narzędzia do konwertowania plików .pst Microsoft Outlooka.
+%package -n python-libpst
+Summary: libpst Python bindings
+Summary(pl.UTF-8): Wiązania libpst dla Pythona
+Group: Development/Languages/Python
+
+%description -n python-libpst
+libpst Python bindings.
+
+%description -n python-libpst -l pl.UTF-8
+Wiązania libpst dla Pythona.
+
%prep
%setup -q
%{__autoheader}
%{__automake}
%configure \
+ %{!?with_static_libs:--disable-static} \
--enable-dii \
--enable-libpst-shared
%install
rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{py_sitedir}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_libpst.{a,la}
+# packaged as %doc (split into base and -devel)
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog README TODO
+%doc AUTHORS ChangeLog NEWS README TODO
%attr(755,root,root) %{_libdir}/libpst.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libpst.so.1
+%attr(755,root,root) %ghost %{_libdir}/libpst.so.4
%files devel
%defattr(644,root,root,755)
+%doc html/*.html html/devel
%attr(755,root,root) %{_libdir}/libpst.so
%{_libdir}/libpst.la
-%{_includedir}/libpst
+%{_includedir}/libpst-4
%{_pkgconfigdir}/libpst.pc
+%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libpst.a
+%endif
%files tools
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/lspst
+%attr(755,root,root) %{_bindir}/nick2ldif
%attr(755,root,root) %{_bindir}/pst2dii
%attr(755,root,root) %{_bindir}/pst2ldif
%attr(755,root,root) %{_bindir}/readpst
-%attr(755,root,root) %{_bindir}/readpstlog
%{_mandir}/man1/lspst.1*
%{_mandir}/man1/pst2dii.1*
%{_mandir}/man1/pst2ldif.1*
%{_mandir}/man1/readpst.1*
-%{_mandir}/man1/readpstlog.1*
%{_mandir}/man5/outlook.pst.5*
+
+%files -n python-libpst
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py_sitedir}/_libpst.so