Cleanup spec file conditionals

This commit is contained in:
Merlin Mathesius 2017-12-20 11:57:44 -06:00
parent bb1c059ee4
commit d4de89a25b

View File

@ -2,7 +2,7 @@
Name: pyatspi
Version: 2.26.0
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Python bindings for at-spi
Group: Development/Languages
@ -25,7 +25,7 @@ BuildRequires: pkgconfig(pygobject-3.0) >= 2.90.1
BuildRequires: python-dbus
BuildRequires: python-enum34
%if !0%{?rhel}
%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: python3-devel
BuildRequires: python3-dbus
%endif
@ -54,7 +54,7 @@ Obsoletes: pyatspi < %{version}-%{release}
%description -n python2-pyatspi %_description
%if !0%{?rhel}
%if 0%{?fedora} || 0%{?rhel} > 7
%package -n python3-pyatspi
Summary: Python3 bindings for at-spi
Requires: at-spi2-core
@ -73,7 +73,7 @@ This package includes a python3 client library for at-spi.
%prep
%autosetup -p1
%if !0%{?rhel}
%if 0%{?fedora} || 0%{?rhel} > 7
# Make a copy of the source tree for building the python3 module
rm -rf %{py3dir}
cp -a . %{py3dir}
@ -85,7 +85,7 @@ cp -a . %{py3dir}
%configure --with-python=python2 --enable-tests
make
%if !0%{?rhel}
%if 0%{?fedora} || 0%{?rhel} > 7
# Build the python3 module
pushd %{py3dir}
%configure --with-python=python3 --enable-tests
@ -97,7 +97,7 @@ popd
%install
%make_install
%if !0%{?rhel}
%if 0%{?fedora} || 0%{?rhel} > 7
pushd %{py3dir}
%make_install
popd
@ -117,7 +117,7 @@ sed -i '1s|^#!/usr/bin/python|#!%{__python3}|' python3-examples/magFocusTracker.
%doc examples/magFocusTracker.py
%{python2_sitelib}/pyatspi/
%if !0%{?rhel}
%if 0%{?fedora} || 0%{?rhel} > 7
%files -n python3-pyatspi
%license COPYING COPYING.GPL
%doc AUTHORS README
@ -127,6 +127,9 @@ sed -i '1s|^#!/usr/bin/python|#!%{__python3}|' python3-examples/magFocusTracker.
%changelog
* Wed Dec 20 2017 Merlin Mathesius <mmathesi@redhat.com> - 2.26.0-3
- Cleanup spec file conditionals
* Thu Sep 14 2017 Kalev Lember <klember@redhat.com> - 2.26.0-2
- Update requires for python2-gobject rename