[packages/libpst] - updated to 0.6.72 - added link patch
qboosh
qboosh at pld-linux.org
Tue Apr 23 21:46:57 CEST 2019
commit ada9d5a3a80c35717da3ce0c7a1266b9c79effa9
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Apr 23 21:47:12 2019 +0200
- updated to 0.6.72
- added link patch
libpst-link.patch | 11 ++++++++
libpst.spec | 75 ++++++++++++++++++++++++++++++++++++++++++++-----------
2 files changed, 72 insertions(+), 14 deletions(-)
---
diff --git a/libpst.spec b/libpst.spec
index 6960aa2..292662c 100644
--- a/libpst.spec
+++ b/libpst.spec
@@ -1,17 +1,20 @@
#
# Conditional build:
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
%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.70
+Version: 0.6.72
Release: 1
License: GPL v2+
Group: Libraries
-Source0: http://www.five-ten-sg.com/libpst/packages/%{name}-%{version}.tar.gz
-# Source0-md5: 3708ef8e8ec30b689072fd9fb482a81a
-URL: http://www.five-ten-sg.com/libpst/
+Source0: https://www.five-ten-sg.com/libpst/packages/%{name}-%{version}.tar.gz
+# Source0-md5: 0085c9769a163e7ac59dba6518e0cc1e
+Patch0: %{name}-link.patch
+URL: https://www.five-ten-sg.com/libpst/
BuildRequires: ImageMagick
BuildRequires: autoconf >= 2.60
BuildRequires: automake
@@ -19,10 +22,18 @@ BuildRequires: boost-python-devel
BuildRequires: gd-devel
BuildRequires: libgsf-devel
BuildRequires: libstdc++-devel
-BuildRequires: libtool
-BuildRequires: python-devel
-BuildRequires: python-modules
+BuildRequires: libtool >= 2:1.5
+BuildRequires: pkgconfig
+%if %{with python2}
+BuildRequires: python-devel >= 2
+BuildRequires: python-modules >= 2
+%endif
+%if %{with python3}
+BuildRequires: python3-devel >= 1:3.2
+BuildRequires: python3-modules >= 1:3.2
+%endif
BuildRequires: rpm-pythonprov
+BuildRequires: zlib-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -70,18 +81,30 @@ Utilities for converting Microsoft Outlook .pst files.
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
+Summary: libpst Python 2 bindings
+Summary(pl.UTF-8): Wiązania libpst dla Pythona 2
Group: Development/Languages/Python
%description -n python-libpst
-libpst Python bindings.
+libpst Python 2 bindings.
%description -n python-libpst -l pl.UTF-8
-Wiązania libpst dla Pythona.
+Wiązania libpst dla Pythona 2.
+
+%package -n python3-libpst
+Summary: libpst Python 3 bindings
+Summary(pl.UTF-8): Wiązania libpst dla Pythona 3
+Group: Development/Languages/Python
+
+%description -n python3-libpst
+libpst Python 3 bindings.
+
+%description -n python3-libpst -l pl.UTF-8
+Wiązania libpst dla Pythona 3.
%prep
%setup -q
+%patch0 -p1
%build
%{__libtoolize}
@@ -92,18 +115,34 @@ Wiązania libpst dla Pythona.
%configure \
%{!?with_static_libs:--disable-static} \
--enable-dii \
- --enable-libpst-shared
+ --enable-libpst-shared \
+ %{!?with_python3:--disable-python}
%{__make}
+%if %{with python2}
+install -d build-py2
+./libtool --mode=compile %{__cxx} %{rpmcxxflags} %{rpmcppflags} -I. -Isrc -I%{py_incdir} -o build-py2/python-libpst.lo -c python/python-libpst.cpp
+./libtool --mode=link %{__cxx} -shared -module -avoid-version -rpath %{py_sitedir} %{rpmldflags} %{rpmcxxflags} -o build-py2/_libpst.la build-py2/python-libpst.lo src/libpst.la -lboost_python%(echo %{py_ver} | tr -d .)
+%endif
+
%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}
+%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/_libpst.la
+%if %{with static_libs}
+%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/_libpst.a
+%endif
+
+%if %{with python2}
+install -d $RPM_BUILD_ROOT%{py_sitedir}
+./libtool --mode=install install build-py2/_libpst.la $RPM_BUILD_ROOT%{py_sitedir}
+%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_libpst.la
+%endif
+
# packaged as %doc (split into base and -devel)
%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
@@ -146,6 +185,14 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/readpst.1*
%{_mandir}/man5/outlook.pst.5*
+%if %{with python2}
%files -n python-libpst
%defattr(644,root,root,755)
%attr(755,root,root) %{py_sitedir}/_libpst.so
+%endif
+
+%if %{with python3}
+%files -n python3-libpst
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py3_sitedir}/_libpst.so
+%endif
diff --git a/libpst-link.patch b/libpst-link.patch
new file mode 100644
index 0000000..f985ed1
--- /dev/null
+++ b/libpst-link.patch
@@ -0,0 +1,11 @@
+--- libpst-0.6.72/src/Makefile.am.orig 2018-08-01 17:15:48.000000000 +0200
++++ libpst-0.6.72/src/Makefile.am 2019-04-23 21:41:45.026697783 +0200
+@@ -80,7 +80,7 @@
+ endif
+
+ libpst_la_SOURCES = $(common_source) $(common_header)
+-libpst_la_LIBADD = $(LTLIBICONV)
++libpst_la_LIBADD = $(LTLIBICONV) $(ZLIB_LIBS)
+
+ EXTRA_DIST =
+ if !NEED_XGETOPT
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libpst.git/commitdiff/ada9d5a3a80c35717da3ce0c7a1266b9c79effa9
More information about the pld-cvs-commit
mailing list