]> git.pld-linux.org Git - packages/libpst.git/blame - libpst.spec
boost rebuild
[packages/libpst.git] / libpst.spec
CommitLineData
c66895d8
ER
1#
2# Conditional build:
ada9d5a3
JB
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
c66895d8 5%bcond_without static_libs # don't build static libraries
35f6d1e2 6#
31608406
MB
7Summary: Library for reading .pst files
8Summary(pl.UTF-8): Biblioteka do czytania plików .pst
790368a3 9Name: libpst
4bdefffa 10Version: 0.6.76
4a69f9a2 11Release: 2
5b65699d 12License: GPL v2+
31608406 13Group: Libraries
ada9d5a3 14Source0: https://www.five-ten-sg.com/libpst/packages/%{name}-%{version}.tar.gz
4bdefffa 15# Source0-md5: e821b94e8d7790ee314059f751182ebf
ada9d5a3 16URL: https://www.five-ten-sg.com/libpst/
31608406 17BuildRequires: ImageMagick
48987ec7 18BuildRequires: autoconf >= 2.60
31608406
MB
19BuildRequires: automake
20BuildRequires: gd-devel
762b0f98 21BuildRequires: libgsf-devel
31608406 22BuildRequires: libstdc++-devel
ada9d5a3
JB
23BuildRequires: libtool >= 2:1.5
24BuildRequires: pkgconfig
25%if %{with python2}
93b58b2a 26BuildRequires: boost-python-devel
ada9d5a3
JB
27BuildRequires: python-devel >= 2
28BuildRequires: python-modules >= 2
29%endif
30%if %{with python3}
93b58b2a 31BuildRequires: boost-python3-devel
ada9d5a3
JB
32BuildRequires: python3-devel >= 1:3.2
33BuildRequires: python3-modules >= 1:3.2
34%endif
8cc9c34d 35BuildRequires: rpm-pythonprov
ada9d5a3 36BuildRequires: zlib-devel
790368a3
JB
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39%description
1f2cd581 40Library for reading PST (MS Outlook Personal Folders) files.
790368a3 41
5cca55a2 42%description -l pl.UTF-8
31608406
MB
43Biblioteka do czytania plików .pst.
44
45%package devel
46Summary: Header files for libpst library
47Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libpst
48Group: Development/Libraries
49Requires: %{name} = %{version}-%{release}
50
51%description devel
52Header files for libpst library.
53
54%description devel -l pl.UTF-8
55Pliki nagłówkowe biblioteki libpst.
56
57%package static
58Summary: Static libpst library
59Summary(pl.UTF-8): Statyczna biblioteka libpst
60Group: Development/Libraries
61Requires: %{name}-devel = %{version}-%{release}
62
63%description static
64Static libpst library.
65
66%description static -l pl.UTF-8
67Statyczna biblioteka libpst.
68
69%package tools
70Summary: Utilities for converting Microsoft Outlook .pst files
71Summary(pl.UTF-8): Narzędzia do konwertowania plików .pst Microsoft Outlooka
72Group: Applications
73Requires: %{name} = %{version}-%{release}
74Requires: ImageMagick
75Obsoletes: readpst
76
77%description tools
78Utilities for converting Microsoft Outlook .pst files.
34878604 79
31608406
MB
80%description tools -l pl.UTF-8
81Narzędzia do konwertowania plików .pst Microsoft Outlooka.
790368a3 82
8a1b1bd1 83%package -n python-libpst
ada9d5a3
JB
84Summary: libpst Python 2 bindings
85Summary(pl.UTF-8): Wiązania libpst dla Pythona 2
8a1b1bd1
MB
86Group: Development/Languages/Python
87
88%description -n python-libpst
ada9d5a3 89libpst Python 2 bindings.
8a1b1bd1
MB
90
91%description -n python-libpst -l pl.UTF-8
ada9d5a3
JB
92Wiązania libpst dla Pythona 2.
93
94%package -n python3-libpst
95Summary: libpst Python 3 bindings
96Summary(pl.UTF-8): Wiązania libpst dla Pythona 3
97Group: Development/Languages/Python
98
99%description -n python3-libpst
100libpst Python 3 bindings.
101
102%description -n python3-libpst -l pl.UTF-8
103Wiązania libpst dla Pythona 3.
8a1b1bd1 104
790368a3 105%prep
b18e1b26 106%setup -q
790368a3
JB
107
108%build
31608406
MB
109%{__libtoolize}
110%{__aclocal} -I m4
111%{__autoconf}
112%{__autoheader}
113%{__automake}
114%configure \
c66895d8 115 %{!?with_static_libs:--disable-static} \
31608406 116 --enable-dii \
ada9d5a3
JB
117 --enable-libpst-shared \
118 %{!?with_python3:--disable-python}
31608406
MB
119
120%{__make}
790368a3 121
ada9d5a3
JB
122%if %{with python2}
123install -d build-py2
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 .)
126%endif
127
790368a3
JB
128%install
129rm -rf $RPM_BUILD_ROOT
31608406 130
34878604 131%{__make} install \
34878604 132 DESTDIR=$RPM_BUILD_ROOT
790368a3 133
ada9d5a3
JB
134%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/_libpst.la
135%if %{with static_libs}
136%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/_libpst.a
137%endif
138
139%if %{with python2}
140install -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
143%endif
144
54afb24f
JB
145# packaged as %doc (split into base and -devel)
146%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
8a1b1bd1 147
790368a3
JB
148%clean
149rm -rf $RPM_BUILD_ROOT
150
31608406
MB
151%post -p /sbin/ldconfig
152%postun -p /sbin/ldconfig
153
790368a3
JB
154%files
155%defattr(644,root,root,755)
558bf123 156%doc AUTHORS ChangeLog NEWS README TODO
31608406 157%attr(755,root,root) %{_libdir}/libpst.so.*.*.*
8a1b1bd1 158%attr(755,root,root) %ghost %{_libdir}/libpst.so.4
31608406
MB
159
160%files devel
161%defattr(644,root,root,755)
54afb24f 162%doc html/*.html html/devel
31608406
MB
163%attr(755,root,root) %{_libdir}/libpst.so
164%{_libdir}/libpst.la
8a1b1bd1 165%{_includedir}/libpst-4
31608406
MB
166%{_pkgconfigdir}/libpst.pc
167
c66895d8 168%if %{with static_libs}
31608406
MB
169%files static
170%defattr(644,root,root,755)
171%{_libdir}/libpst.a
c66895d8 172%endif
31608406
MB
173
174%files tools
175%defattr(644,root,root,755)
176%attr(755,root,root) %{_bindir}/lspst
558bf123 177%attr(755,root,root) %{_bindir}/nick2ldif
31608406
MB
178%attr(755,root,root) %{_bindir}/pst2dii
179%attr(755,root,root) %{_bindir}/pst2ldif
34878604 180%attr(755,root,root) %{_bindir}/readpst
31608406
MB
181%{_mandir}/man1/lspst.1*
182%{_mandir}/man1/pst2dii.1*
183%{_mandir}/man1/pst2ldif.1*
34878604 184%{_mandir}/man1/readpst.1*
31608406 185%{_mandir}/man5/outlook.pst.5*
8a1b1bd1 186
ada9d5a3 187%if %{with python2}
8a1b1bd1
MB
188%files -n python-libpst
189%defattr(644,root,root,755)
190%attr(755,root,root) %{py_sitedir}/_libpst.so
ada9d5a3
JB
191%endif
192
193%if %{with python3}
194%files -n python3-libpst
195%defattr(644,root,root,755)
196%attr(755,root,root) %{py3_sitedir}/_libpst.so
197%endif
This page took 0.220408 seconds and 4 git commands to generate.