# HG changeset patch # User Carl Byington # Date 1592349707 25200 # Node ID af8ae7bd3fed4feb49efd9ecbd066c372190ebef # Parent be1714cd4d36621841c3d7800ea3680d9eb9132b allow building on el8 diff -r be1714cd4d36 -r af8ae7bd3fed libpst.spec.in --- 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 - 0.5.3 - initial spec file using autoconf and http://www.fedora.us/docs/rpm-packaging-guidelines.html -