diff --git a/evemu.spec b/evemu.spec index e172479..d154629 100644 --- a/evemu.spec +++ b/evemu.spec @@ -1,9 +1,13 @@ +%if 0%{?rhel} && 0%{?rhel} < 8 +%bcond_without legacy_python +%endif + #global gitdate 20150818 #global gitversion eba96a4 Name: evemu Version: 2.7.0 -Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 5%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Event Device Query and Emulation Program Group: Development/Tools @@ -19,7 +23,11 @@ Source0: http://www.freedesktop.org/software/%{name}/%{name}-%{version}.t %endif BuildRequires: automake libtool gcc gcc-c++ +%if %{with legacy_python} BuildRequires: python2-devel +%else +BuildRequires: python3-devel +%endif BuildRequires: xmlto asciidoc BuildRequires: libevdev-devel >= 1.3 Requires: libevdev >= 0.5 @@ -36,7 +44,6 @@ and replay that stream on a virtual input device. Summary: Event Device Query and Emulation Program Development Package Requires: %{name} = %{version}-%{release} Requires: pkgconfig -Requires: python2 Provides: utouch-evemu-devel = %{version}-%{release} Obsoletes: utouch-evemu-devel < 1.0.10 @@ -49,6 +56,11 @@ Obsoletes: utouch-evemu-devel < 1.0.10 %build autoreconf -v --install --force || exit 1 +%if %{with legacy_python} +export PYTHON=python2 +%else +export PYTHON=python3 +%endif %configure --disable-static --disable-silent-rules make %{?_smp_mflags} @@ -76,10 +88,16 @@ rm -f %{buildroot}%{_libdir}/*.la %{_includedir}/evemu.h %{_libdir}/libevemu.so %{_libdir}/pkgconfig/evemu.pc -%dir %{python_sitelib}/evemu/ -%{python_sitelib}/evemu/* +%if %{with legacy_python} +%{python2_sitelib}/evemu +%else +%{python3_sitelib}/evemu +%endif %changelog +* Fri Mar 30 2018 Carl George - 2.7.0-5 +- Build with python3 on Fedora + * Thu Mar 08 2018 Peter Hutterer 2.7.0-4 - Add BuildRequires for gcc-c++, needed for a test build