3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
5 %bcond_without static_libs # don't build static libraries
7 Summary: Library for reading .pst files
8 Summary(pl.UTF-8): Biblioteka do czytania plików .pst
14 Source0: https://www.five-ten-sg.com/libpst/packages/%{name}-%{version}.tar.gz
15 # Source0-md5: e821b94e8d7790ee314059f751182ebf
16 Patch0: python3.10.patch
17 URL: https://www.five-ten-sg.com/libpst/
18 BuildRequires: ImageMagick
19 BuildRequires: autoconf >= 2.60
20 BuildRequires: automake
21 BuildRequires: gd-devel
22 BuildRequires: libgsf-devel
23 BuildRequires: libstdc++-devel
24 BuildRequires: libtool >= 2:1.5
25 BuildRequires: pkgconfig
27 BuildRequires: boost-python-devel
28 BuildRequires: python-devel >= 2
29 BuildRequires: python-modules >= 2
32 BuildRequires: boost-python3-devel
33 BuildRequires: python3-devel >= 1:3.2
34 BuildRequires: python3-modules >= 1:3.2
36 BuildRequires: rpm-pythonprov
37 BuildRequires: zlib-devel
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 Library for reading PST (MS Outlook Personal Folders) files.
43 %description -l pl.UTF-8
44 Biblioteka do czytania plików .pst.
47 Summary: Header files for libpst library
48 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libpst
49 Group: Development/Libraries
50 Requires: %{name} = %{version}-%{release}
53 Header files for libpst library.
55 %description devel -l pl.UTF-8
56 Pliki nagłówkowe biblioteki libpst.
59 Summary: Static libpst library
60 Summary(pl.UTF-8): Statyczna biblioteka libpst
61 Group: Development/Libraries
62 Requires: %{name}-devel = %{version}-%{release}
65 Static libpst library.
67 %description static -l pl.UTF-8
68 Statyczna biblioteka libpst.
71 Summary: Utilities for converting Microsoft Outlook .pst files
72 Summary(pl.UTF-8): Narzędzia do konwertowania plików .pst Microsoft Outlooka
74 Requires: %{name} = %{version}-%{release}
79 Utilities for converting Microsoft Outlook .pst files.
81 %description tools -l pl.UTF-8
82 Narzędzia do konwertowania plików .pst Microsoft Outlooka.
84 %package -n python-libpst
85 Summary: libpst Python 2 bindings
86 Summary(pl.UTF-8): Wiązania libpst dla Pythona 2
87 Group: Development/Languages/Python
89 %description -n python-libpst
90 libpst Python 2 bindings.
92 %description -n python-libpst -l pl.UTF-8
93 Wiązania libpst dla Pythona 2.
95 %package -n python3-libpst
96 Summary: libpst Python 3 bindings
97 Summary(pl.UTF-8): Wiązania libpst dla Pythona 3
98 Group: Development/Languages/Python
100 %description -n python3-libpst
101 libpst Python 3 bindings.
103 %description -n python3-libpst -l pl.UTF-8
104 Wiązania libpst dla Pythona 3.
117 %{!?with_static_libs:--disable-static} \
119 --enable-libpst-shared \
120 %{!?with_python3:--disable-python}
126 ./libtool --mode=compile %{__cxx} %{rpmcxxflags} %{rpmcppflags} -I. -Isrc -I%{py_incdir} -o build-py2/python-libpst.lo -c python/python-libpst.cpp
127 ./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 .)
131 rm -rf $RPM_BUILD_ROOT
134 DESTDIR=$RPM_BUILD_ROOT
136 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/_libpst.la
137 %if %{with static_libs}
138 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/_libpst.a
142 install -d $RPM_BUILD_ROOT%{py_sitedir}
143 ./libtool --mode=install install build-py2/_libpst.la $RPM_BUILD_ROOT%{py_sitedir}
144 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_libpst.la
147 # packaged as %doc (split into base and -devel)
148 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
151 rm -rf $RPM_BUILD_ROOT
153 %post -p /sbin/ldconfig
154 %postun -p /sbin/ldconfig
157 %defattr(644,root,root,755)
158 %doc AUTHORS ChangeLog NEWS README TODO
159 %attr(755,root,root) %{_libdir}/libpst.so.*.*.*
160 %attr(755,root,root) %ghost %{_libdir}/libpst.so.4
163 %defattr(644,root,root,755)
164 %doc html/*.html html/devel
165 %attr(755,root,root) %{_libdir}/libpst.so
167 %{_includedir}/libpst-4
168 %{_pkgconfigdir}/libpst.pc
170 %if %{with static_libs}
172 %defattr(644,root,root,755)
177 %defattr(644,root,root,755)
178 %attr(755,root,root) %{_bindir}/lspst
179 %attr(755,root,root) %{_bindir}/nick2ldif
180 %attr(755,root,root) %{_bindir}/pst2dii
181 %attr(755,root,root) %{_bindir}/pst2ldif
182 %attr(755,root,root) %{_bindir}/readpst
183 %{_mandir}/man1/lspst.1*
184 %{_mandir}/man1/pst2dii.1*
185 %{_mandir}/man1/pst2ldif.1*
186 %{_mandir}/man1/readpst.1*
187 %{_mandir}/man5/outlook.pst.5*
190 %files -n python-libpst
191 %defattr(644,root,root,755)
192 %attr(755,root,root) %{py_sitedir}/_libpst.so
196 %files -n python3-libpst
197 %defattr(644,root,root,755)
198 %attr(755,root,root) %{py3_sitedir}/_libpst.so