From 34fa7877c3c30b291712914b9834c79154a020cd Mon Sep 17 00:00:00 2001 From: Leigh Scott Date: Sat, 8 Jun 2019 10:39:06 +0100 Subject: [PATCH] remove all old fedora conditionals --- libpst.spec | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/libpst.spec b/libpst.spec index c199d9b..c52ca09 100644 --- a/libpst.spec +++ b/libpst.spec @@ -9,11 +9,8 @@ Requires: ImageMagick libgsf Requires: %{name}-libs = %{version}-%{release} BuildRequires: libtool gcc-c++ BuildRequires: ImageMagick gd-devel zlib-devel boost-devel libgsf-devel -%if 0%{?fedora} > 27 BuildRequires: python3 python3-devel boost-python3 boost-python3-devel -%else -BuildRequires: python-devel -%endif + %{!?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)")} @@ -35,32 +32,14 @@ The libpst-libs package contains the shared library used by the pst utilities. -%if 0%{?fedora} > 27 %package -n python3-%{name} Requires: python3 Provides: %{name}-python = %{version}-%{release} -%else -%package python -Requires: python -%endif -Summary: Python bindings for libpst -Requires: %{name}-libs = %{version}-%{release} -%if 0%{?fedora} >= 20 %global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{python_sitearch}/_.*\.so$ -%else -%{?filter_setup: -%filter_provides_in %{python_sitearch}/_.*\.so$ -%filter_setup -} -%endif -%if 0%{?fedora} > 27 %description -n python3-%{name} -%else -%description python -%endif The libpst-python package allows you to use the libpst shared object from python code. @@ -104,20 +83,11 @@ libpst utilities. autoreconf -v -f -i %configure --enable-libpst-shared \ --with-boost-python=boost_python%{python3_version_nodots} -%if 0%{?fedora} > 27 %make_build -%else -make %{?_smp_mflags} -%endif %install -%if 0%{?fedora} > 27 %make_install -%else -rm -rf $RPM_BUILD_ROOT -make DESTDIR=$RPM_BUILD_ROOT install -%endif rm $RPM_BUILD_ROOT%{_libdir}/libpst.la rm $RPM_BUILD_ROOT%{_libdir}/libpst.a mv $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version} $RPM_BUILD_ROOT%{_datadir}/doc/%{name} @@ -139,19 +109,11 @@ mv $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version} $RPM_BUILD_ROOT%{_datadir}/ %doc COPYING -%if 0%{?fedora} > 27 %files -n python3-%{name} %defattr(-,root,root,-) %{python3_sitearch}/_*.so %exclude %{python3_sitearch}/*.a %exclude %{python3_sitearch}/*.la -%else -%files python -%defattr(-,root,root,-) -%{python_sitearch}/_*.so -%exclude %{python_sitearch}/*.a -%exclude %{python_sitearch}/*.la -%endif %files devel