diff libpst.spec.in @ 405:af8ae7bd3fed stable-0-6-75

allow building on el8
author Carl Byington <carl@five-ten-sg.com>
date Tue, 16 Jun 2020 16:21:47 -0700
parents 6c69b56d7173
children 24871e6cdd69
line wrap: on
line diff
--- a/libpst.spec.in	Thu Mar 26 12:10:04 2020 -0700
+++ b/libpst.spec.in	Tue Jun 16 16:21:47 2020 -0700
@@ -9,6 +9,9 @@
 BuildRequires:      libtool gcc-c++
 BuildRequires:      ImageMagick gd-devel zlib-devel boost-devel libgsf-devel gettext-devel
 
+%if "%{?dist}" == ".el8"
+    %define fedora 32
+%endif
 %if 0%{?fedora} > 27
 BuildRequires:      python3 python3-devel boost-python3 boost-python3-devel
 Requires:           boost-python3
@@ -19,9 +22,14 @@
 Requires:           ImageMagick%{?_isa} libgsf gettext
 Requires:           %{name}-libs%{?_isa} = %{version}-%{release}
 
-%{!?python_sitelib:  %global python_sitelib  %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
-
+%if "%{?dist}" == ".el8"
+    %define __python /usr/bin/python3
+    %{!?python_sitelib:  %global python_sitelib  %(python3 -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+    %{!?python_sitearch: %global python_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+%else
+    %{!?python_sitelib:  %global python_sitelib  %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+    %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+%endif
 
 %description
 The Libpst utilities include readpst which can convert email messages
@@ -628,4 +636,3 @@
 
 * Sun Feb 19 2006 Carl Byington <carl@five-ten-sg.com> - 0.5.3
 - initial spec file using autoconf and http://www.fedora.us/docs/rpm-packaging-guidelines.html
-