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