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