]>
Commit | Line | Data |
---|---|---|
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 |
7 | Summary: Library for reading .pst files |
8 | Summary(pl.UTF-8): Biblioteka do czytania plików .pst | |
790368a3 | 9 | Name: libpst |
4bdefffa | 10 | Version: 0.6.76 |
fa9f5720 | 11 | Release: 4 |
5b65699d | 12 | License: GPL v2+ |
31608406 | 13 | Group: Libraries |
ada9d5a3 | 14 | Source0: https://www.five-ten-sg.com/libpst/packages/%{name}-%{version}.tar.gz |
4bdefffa | 15 | # Source0-md5: e821b94e8d7790ee314059f751182ebf |
0b7fd0ba | 16 | Patch0: python3.10.patch |
ada9d5a3 | 17 | URL: https://www.five-ten-sg.com/libpst/ |
31608406 | 18 | BuildRequires: ImageMagick |
48987ec7 | 19 | BuildRequires: autoconf >= 2.60 |
31608406 MB |
20 | BuildRequires: automake |
21 | BuildRequires: gd-devel | |
762b0f98 | 22 | BuildRequires: libgsf-devel |
31608406 | 23 | BuildRequires: libstdc++-devel |
ada9d5a3 JB |
24 | BuildRequires: libtool >= 2:1.5 |
25 | BuildRequires: pkgconfig | |
26 | %if %{with python2} | |
93b58b2a | 27 | BuildRequires: boost-python-devel |
ada9d5a3 JB |
28 | BuildRequires: python-devel >= 2 |
29 | BuildRequires: python-modules >= 2 | |
30 | %endif | |
31 | %if %{with python3} | |
93b58b2a | 32 | BuildRequires: boost-python3-devel |
ada9d5a3 JB |
33 | BuildRequires: python3-devel >= 1:3.2 |
34 | BuildRequires: python3-modules >= 1:3.2 | |
35 | %endif | |
8cc9c34d | 36 | BuildRequires: rpm-pythonprov |
ada9d5a3 | 37 | BuildRequires: zlib-devel |
790368a3 JB |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
40 | %description | |
1f2cd581 | 41 | Library for reading PST (MS Outlook Personal Folders) files. |
790368a3 | 42 | |
5cca55a2 | 43 | %description -l pl.UTF-8 |
31608406 MB |
44 | Biblioteka do czytania plików .pst. |
45 | ||
46 | %package devel | |
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} | |
51 | ||
52 | %description devel | |
53 | Header files for libpst library. | |
54 | ||
55 | %description devel -l pl.UTF-8 | |
56 | Pliki nagłówkowe biblioteki libpst. | |
57 | ||
58 | %package static | |
59 | Summary: Static libpst library | |
60 | Summary(pl.UTF-8): Statyczna biblioteka libpst | |
61 | Group: Development/Libraries | |
62 | Requires: %{name}-devel = %{version}-%{release} | |
63 | ||
64 | %description static | |
65 | Static libpst library. | |
66 | ||
67 | %description static -l pl.UTF-8 | |
68 | Statyczna biblioteka libpst. | |
69 | ||
70 | %package tools | |
71 | Summary: Utilities for converting Microsoft Outlook .pst files | |
72 | Summary(pl.UTF-8): Narzędzia do konwertowania plików .pst Microsoft Outlooka | |
73 | Group: Applications | |
74 | Requires: %{name} = %{version}-%{release} | |
75 | Requires: ImageMagick | |
76 | Obsoletes: readpst | |
77 | ||
78 | %description tools | |
79 | Utilities for converting Microsoft Outlook .pst files. | |
34878604 | 80 | |
31608406 MB |
81 | %description tools -l pl.UTF-8 |
82 | Narzędzia do konwertowania plików .pst Microsoft Outlooka. | |
790368a3 | 83 | |
8a1b1bd1 | 84 | %package -n python-libpst |
ada9d5a3 JB |
85 | Summary: libpst Python 2 bindings |
86 | Summary(pl.UTF-8): Wiązania libpst dla Pythona 2 | |
8a1b1bd1 MB |
87 | Group: Development/Languages/Python |
88 | ||
89 | %description -n python-libpst | |
ada9d5a3 | 90 | libpst Python 2 bindings. |
8a1b1bd1 MB |
91 | |
92 | %description -n python-libpst -l pl.UTF-8 | |
ada9d5a3 JB |
93 | Wiązania libpst dla Pythona 2. |
94 | ||
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 | |
99 | ||
100 | %description -n python3-libpst | |
101 | libpst Python 3 bindings. | |
102 | ||
103 | %description -n python3-libpst -l pl.UTF-8 | |
104 | Wią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} |
125 | install -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 |
131 | rm -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} | |
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 | |
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 |
151 | rm -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 |