]>
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 |
4a69f9a2 | 11 | Release: 2 |
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 |
ada9d5a3 | 16 | URL: https://www.five-ten-sg.com/libpst/ |
31608406 | 17 | BuildRequires: ImageMagick |
48987ec7 | 18 | BuildRequires: autoconf >= 2.60 |
31608406 MB |
19 | BuildRequires: automake |
20 | BuildRequires: gd-devel | |
762b0f98 | 21 | BuildRequires: libgsf-devel |
31608406 | 22 | BuildRequires: libstdc++-devel |
ada9d5a3 JB |
23 | BuildRequires: libtool >= 2:1.5 |
24 | BuildRequires: pkgconfig | |
25 | %if %{with python2} | |
93b58b2a | 26 | BuildRequires: boost-python-devel |
ada9d5a3 JB |
27 | BuildRequires: python-devel >= 2 |
28 | BuildRequires: python-modules >= 2 | |
29 | %endif | |
30 | %if %{with python3} | |
93b58b2a | 31 | BuildRequires: boost-python3-devel |
ada9d5a3 JB |
32 | BuildRequires: python3-devel >= 1:3.2 |
33 | BuildRequires: python3-modules >= 1:3.2 | |
34 | %endif | |
8cc9c34d | 35 | BuildRequires: rpm-pythonprov |
ada9d5a3 | 36 | BuildRequires: zlib-devel |
790368a3 JB |
37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
38 | ||
39 | %description | |
1f2cd581 | 40 | Library for reading PST (MS Outlook Personal Folders) files. |
790368a3 | 41 | |
5cca55a2 | 42 | %description -l pl.UTF-8 |
31608406 MB |
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. | |
34878604 | 79 | |
31608406 MB |
80 | %description tools -l pl.UTF-8 |
81 | Narzędzia do konwertowania plików .pst Microsoft Outlooka. | |
790368a3 | 82 | |
8a1b1bd1 | 83 | %package -n python-libpst |
ada9d5a3 JB |
84 | Summary: libpst Python 2 bindings |
85 | Summary(pl.UTF-8): Wiązania libpst dla Pythona 2 | |
8a1b1bd1 MB |
86 | Group: Development/Languages/Python |
87 | ||
88 | %description -n python-libpst | |
ada9d5a3 | 89 | libpst Python 2 bindings. |
8a1b1bd1 MB |
90 | |
91 | %description -n python-libpst -l pl.UTF-8 | |
ada9d5a3 JB |
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. | |
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} |
123 | install -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 |
129 | rm -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} | |
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 | |
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 |
149 | rm -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 |