comparison libpst.spec.in @ 407:24871e6cdd69

Stuart C. Naifeh - fix rfc2231 encoding when saving messages to both .eml and msg formats
author Carl Byington <carl@five-ten-sg.com>
date Sat, 27 Mar 2021 14:53:01 -0700
parents af8ae7bd3fed
children 1c458f13d1d3
comparison
equal deleted inserted replaced
406:7200790e46ac 407:24871e6cdd69
1 %if "%{?dist}" == ".el8"
2 %define fedora 32
3 %endif
4
5 %if 0%{?fedora} > 27 || 0%{?rhel} >= 9
6 %global use_python3 1
7 %define __python %{__python3}
8 %endif
9
10 %if 0%{?rhel} >= 9
11 %global with_dii 0
12 %else
13 %global with_dii 1
14 %endif
1 Summary: Utilities to convert Outlook .pst files to other formats 15 Summary: Utilities to convert Outlook .pst files to other formats
2 Name: @PACKAGE@ 16 Name: @PACKAGE@
3 Version: @VERSION@ 17 Version: @VERSION@
4 Release: 1%{?dist} 18 Release: 1%{?dist}
5 License: GPLv2+ 19 License: GPLv2+
6 URL: http://www.five-ten-sg.com/%{name}/ 20 URL: http://www.five-ten-sg.com/%{name}/
7 Source: %{url}/packages/%{name}-%{version}.tar.gz 21 Source: %{url}/packages/%{name}-%{version}.tar.gz
8 22
23 BuildRequires: make
9 BuildRequires: libtool gcc-c++ 24 BuildRequires: libtool gcc-c++
10 BuildRequires: ImageMagick gd-devel zlib-devel boost-devel libgsf-devel gettext-devel 25 BuildRequires: gd-devel zlib-devel boost-devel libgsf-devel gettext-devel
11 26
12 %if "%{?dist}" == ".el8" 27 %if 0%{with_dii}
13 %define fedora 32 28 BuildRequires: ImageMagick
14 %endif 29 %endif
15 %if 0%{?fedora} > 27 30
31 %if 0%{?use_python3}
16 BuildRequires: python3 python3-devel boost-python3 boost-python3-devel 32 BuildRequires: python3 python3-devel boost-python3 boost-python3-devel
17 Requires: boost-python3 33 Requires: boost-python3
18 %else 34 %else
19 BuildRequires: python-devel 35 BuildRequires: python-devel
20 %endif 36 %endif
21 37
22 Requires: ImageMagick%{?_isa} libgsf gettext 38 Requires: libgsf gettext
23 Requires: %{name}-libs%{?_isa} = %{version}-%{release} 39 Requires: %{name}-libs%{?_isa} = %{version}-%{release}
24 40
25 %if "%{?dist}" == ".el8" 41 %if 0%{with_dii}
26 %define __python /usr/bin/python3 42 Requires: ImageMagick%{?_isa}
27 %{!?python_sitelib: %global python_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} 43 %endif
28 %{!?python_sitearch: %global python_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} 44
29 %else 45 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
30 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} 46 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
31 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} 47
32 %endif 48
33 49 %if 0%{with_dii}
34 %description 50 %description
35 The Libpst utilities include readpst which can convert email messages 51 The Libpst utilities include readpst which can convert email messages
36 to both mbox and MH mailbox formats, pst2ldif which can convert the 52 to both mbox and MH mailbox formats, pst2ldif which can convert the
37 contacts to .ldif format for import into ldap databases, and pst2dii 53 contacts to .ldif format for import into ldap databases, and pst2dii
38 which can convert email messages to the DII load file format used by 54 which can convert email messages to the DII load file format used by
39 Summation. 55 Summation.
56 %else
57 %description
58 The Libpst utilities include readpst which can convert email messages
59 to both mbox and MH mailbox formats, pst2ldif which can convert the
60 contacts to .ldif format for import into ldap databases.
61 %endif
40 62
41 63
42 %package libs 64 %package libs
43 Summary: Shared library used by the pst utilities 65 Summary: Shared library used by the pst utilities
44 66
45 %description libs 67 %description libs
46 The libpst-libs package contains the shared library used by the pst 68 The libpst-libs package contains the shared library used by the pst
47 utilities. 69 utilities.
48 70
49 71
50 %if 0%{?fedora} > 27 72 %if 0%{?use_python3}
51 %package -n python3-%{name} 73 %package -n python3-%{name}
52 Requires: python3 74 Requires: python3
53 Provides: %{name}-python = %{version}-%{release} 75 Provides: %{name}-python = %{version}-%{release}
54 %else 76 %else
55 %package python 77 %package python
56 Requires: python 78 Requires: python
57 %endif 79 %endif
58 Summary: Python bindings for libpst 80 Summary: Python bindings for libpst
59 Requires: %{name}-libs%{?_isa} = %{version}-%{release} 81 Requires: %{name}-libs%{?_isa} = %{version}-%{release}
60 82
61 %if 0%{?fedora} >= 20 83 %if 0%{?fedora} >= 20 || 0%{?rhel} >= 9
62 %global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{python_sitearch}/_.*\.so$ 84 %global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{python_sitearch}/_.*\.so$
63 %else 85 %else
64 %{?filter_setup: 86 %{?filter_setup:
65 %filter_provides_in %{python_sitearch}/_.*\.so$ 87 %filter_provides_in %{python_sitearch}/_.*\.so$
66 %filter_setup 88 %filter_setup
67 } 89 }
68 %endif 90 %endif
69 91
70 92
71 %if 0%{?fedora} > 27 93 %if 0%{?use_python3}
72 %description -n python3-%{name} 94 %description -n python3-%{name}
73 %else 95 %else
74 %description python 96 %description python
75 %endif 97 %endif
76 The libpst-python package allows you to use the libpst shared object 98 The libpst-python package allows you to use the libpst shared object
113 135
114 136
115 %build 137 %build
116 autoreconf -fiv 138 autoreconf -fiv
117 %configure --enable-libpst-shared \ 139 %configure --enable-libpst-shared \
140 %if 0%{with_dii}
141 --enable-dii \
142 %else
143 --disable-dii \
144 %endif
118 --with-boost-python=boost_python%{python3_version_nodots} 145 --with-boost-python=boost_python%{python3_version_nodots}
119 %if 0%{?fedora} > 27 146 %if 0%{?use_python3}
120 %make_build 147 %make_build
121 %else 148 %else
122 make %{?_smp_mflags} 149 make %{?_smp_mflags}
123 %endif 150 %endif
124 151
125 152
126 %install 153 %install
127 %if 0%{?fedora} > 27 154 %if 0%{?use_python3}
128 %make_install 155 %make_install
129 %else 156 %else
130 rm -rf $RPM_BUILD_ROOT 157 rm -rf $RPM_BUILD_ROOT
131 make DESTDIR=$RPM_BUILD_ROOT install 158 make DESTDIR=$RPM_BUILD_ROOT install
132 %endif 159 %endif
133 #Remove libtool archives. 160 #Remove libtool archives.
134 find %{buildroot} -name '*.la' -or -name '*.a' | xargs rm -f 161 find %{buildroot} -name '*.la' -or -name '*.a' | xargs rm -f
135 mv %{buildroot}%{_datadir}/doc/%{name}-%{version} %{buildroot}%{_datadir}/doc/%{name} 162 mv %{buildroot}%{_datadir}/doc/%{name}-%{version} %{buildroot}%{_datadir}/doc/%{name}
136 163
137 164 # Remove pst2dii man page, when it's not built
138 %if 0%{?fedora} > 27 165 %if !0%{with_dii}
166 rm %{buildroot}%{_mandir}/man1/pst2dii.1*
167 %endif
168
169 %if 0%{?use_python3}
139 %ldconfig_scriptlets libs 170 %ldconfig_scriptlets libs
140 %else 171 %else
141 %post libs -p /sbin/ldconfig 172 %post libs -p /sbin/ldconfig
142 %postun libs -p /sbin/ldconfig 173 %postun libs -p /sbin/ldconfig
143 %endif 174 %endif
151 %files libs 182 %files libs
152 %{_libdir}/libpst.so.* 183 %{_libdir}/libpst.so.*
153 %doc COPYING 184 %doc COPYING
154 185
155 186
156 %if 0%{?fedora} > 27 187 %if 0%{?use_python3}
157 %files -n python3-%{name} 188 %files -n python3-%{name}
158 %defattr(-,root,root,-) 189 %defattr(-,root,root,-)
159 %{python3_sitearch}/_*.so 190 %{python3_sitearch}/_*.so
160 %else 191 %else
161 %files python 192 %files python
182 %{_datadir}/doc/%{name}/NEWS 213 %{_datadir}/doc/%{name}/NEWS
183 %{_datadir}/doc/%{name}/README 214 %{_datadir}/doc/%{name}/README
184 215
185 216
186 %changelog 217 %changelog
218 * Sat Mar 27 2021 Carl Byington <carl@five-ten-sg.com> 0.6.76-1
219 - Stuart C. Naifeh - fix rfc2231 encoding when saving messages to
220 both .eml and .msg formats.
221
222 * Tue Feb 02 2021 Milan Crha <mcrha@redhat.com> - 0.6.75-9
223 - Resolves: #1913613 (Disable DII (and ImageMagic dependency) for RHEL 9)
224
225 * Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.75-8
226 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
227
228 * Fri Jan 22 2021 Jonathan Wakely <jwakely@redhat.com> - 0.6.75-7
229 - Rebuilt for Boost 1.75
230
231 * Tue Jul 28 2020 Merlin Mathesius <mmathesi@redhat.com> - 0.6.75-6
232 - FTBFS fix: %%{__python} must now be explicitly defined
233
234 * Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.75-5
235 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
236
237 * Thu Jul 16 2020 Merlin Mathesius <mmathesi@redhat.com> - 0.6.75-4
238 - Cleanup conditionals for using python3
239
240 * Fri May 29 2020 Jonathan Wakely <jwakely@redhat.com> - 0.6.75-3
241 - Rebuilt for Boost 1.73
242
243 * Tue May 26 2020 Miro HronĨok <mhroncok@redhat.com> - 0.6.75-2
244 - Rebuilt for Python 3.9
245
187 * Sun Mar 22 2020 Carl Byington <carl@five-ten-sg.com> 0.6.75-1 246 * Sun Mar 22 2020 Carl Byington <carl@five-ten-sg.com> 0.6.75-1
188 - Markus Schnalke - fix from Debian for vcard version format. 247 - Markus Schnalke - fix from Debian for vcard version format.
189 248
190 * Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.74-2 249 * Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.74-2
191 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild 250 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild