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: c0fb28dc7d6b9d2af1701027dc7154fe
16 URL: https://www.five-ten-sg.com/libpst/
17 BuildRequires: ImageMagick
18 BuildRequires: autoconf >= 2.60
19 BuildRequires: automake
20 BuildRequires: gd-devel
21 BuildRequires: libgsf-devel
22 BuildRequires: libstdc++-devel
23 BuildRequires: libtool >= 2:1.5
24 BuildRequires: pkgconfig
26 BuildRequires: boost-python-devel
27 BuildRequires: python-devel >= 2
28 BuildRequires: python-modules >= 2
31 BuildRequires: boost-python3-devel
32 BuildRequires: python3-devel >= 1:3.2
33 BuildRequires: python3-modules >= 1:3.2
35 BuildRequires: rpm-pythonprov
36 BuildRequires: zlib-devel
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 Library for reading PST (MS Outlook Personal Folders) files.
42 %description -l pl.UTF-8
43 Biblioteka do czytania plików .pst.
46 Summary: Header files for libpst library
47 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libpst
48 Group: Development/Libraries
49 Requires: %{name} = %{version}-%{release}
52 Header files for libpst library.
54 %description devel -l pl.UTF-8
55 Pliki nagłówkowe biblioteki libpst.
58 Summary: Static libpst library
59 Summary(pl.UTF-8): Statyczna biblioteka libpst
60 Group: Development/Libraries
61 Requires: %{name}-devel = %{version}-%{release}
64 Static libpst library.
66 %description static -l pl.UTF-8
67 Statyczna biblioteka libpst.
70 Summary: Utilities for converting Microsoft Outlook .pst files
71 Summary(pl.UTF-8): Narzędzia do konwertowania plików .pst Microsoft Outlooka
73 Requires: %{name} = %{version}-%{release}
78 Utilities for converting Microsoft Outlook .pst files.
80 %description tools -l pl.UTF-8
81 Narzędzia do konwertowania plików .pst Microsoft Outlooka.
83 %package -n python-libpst
84 Summary: libpst Python 2 bindings
85 Summary(pl.UTF-8): Wiązania libpst dla Pythona 2
86 Group: Development/Languages/Python
88 %description -n python-libpst
89 libpst Python 2 bindings.
91 %description -n python-libpst -l pl.UTF-8
92 Wiązania libpst dla Pythona 2.
94 %package -n python3-libpst
95 Summary: libpst Python 3 bindings
96 Summary(pl.UTF-8): Wiązania libpst dla Pythona 3
97 Group: Development/Languages/Python
99 %description -n python3-libpst
100 libpst Python 3 bindings.
102 %description -n python3-libpst -l pl.UTF-8
103 Wiązania libpst dla Pythona 3.
115 %{!?with_static_libs:--disable-static} \
117 --enable-libpst-shared \
118 %{!?with_python3:--disable-python}
124 ./libtool --mode=compile %{__cxx} %{rpmcxxflags} %{rpmcppflags} -I. -Isrc -I%{py_incdir} -o build-py2/python-libpst.lo -c python/python-libpst.cpp
125 ./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 .)
129 rm -rf $RPM_BUILD_ROOT
132 DESTDIR=$RPM_BUILD_ROOT
134 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/_libpst.la
135 %if %{with static_libs}
136 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/_libpst.a
140 install -d $RPM_BUILD_ROOT%{py_sitedir}
141 ./libtool --mode=install install build-py2/_libpst.la $RPM_BUILD_ROOT%{py_sitedir}
142 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_libpst.la
145 # packaged as %doc (split into base and -devel)
146 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
149 rm -rf $RPM_BUILD_ROOT
151 %post -p /sbin/ldconfig
152 %postun -p /sbin/ldconfig
155 %defattr(644,root,root,755)
156 %doc AUTHORS ChangeLog NEWS README TODO
157 %attr(755,root,root) %{_libdir}/libpst.so.*.*.*
158 %attr(755,root,root) %ghost %{_libdir}/libpst.so.4
161 %defattr(644,root,root,755)
162 %doc html/*.html html/devel
163 %attr(755,root,root) %{_libdir}/libpst.so
165 %{_includedir}/libpst-4
166 %{_pkgconfigdir}/libpst.pc
168 %if %{with static_libs}
170 %defattr(644,root,root,755)
175 %defattr(644,root,root,755)
176 %attr(755,root,root) %{_bindir}/lspst
177 %attr(755,root,root) %{_bindir}/nick2ldif
178 %attr(755,root,root) %{_bindir}/pst2dii
179 %attr(755,root,root) %{_bindir}/pst2ldif
180 %attr(755,root,root) %{_bindir}/readpst
181 %{_mandir}/man1/lspst.1*
182 %{_mandir}/man1/pst2dii.1*
183 %{_mandir}/man1/pst2ldif.1*
184 %{_mandir}/man1/readpst.1*
185 %{_mandir}/man5/outlook.pst.5*
188 %files -n python-libpst
189 %defattr(644,root,root,755)
190 %attr(755,root,root) %{py_sitedir}/_libpst.so
194 %files -n python3-libpst
195 %defattr(644,root,root,755)
196 %attr(755,root,root) %{py3_sitedir}/_libpst.so