From 5e7d5d8ed77030dbba64127638f2f9caa95890fd Mon Sep 17 00:00:00 2001 From: Carl George Date: Mar 30 2018 20:08:30 +0000 Subject: [PATCH 1/3] Build with python3 on Fedora --- 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 From 3050bb3d4629bea4bd5922b03a8cbadccf7a2199 Mon Sep 17 00:00:00 2001 From: Carl George Date: Mar 30 2018 20:29:41 +0000 Subject: [PATCH 2/3] Fix license handling --- diff --git a/evemu.spec b/evemu.spec index d154629..7311aeb 100644 --- a/evemu.spec +++ b/evemu.spec @@ -74,7 +74,7 @@ rm -f %{buildroot}%{_libdir}/*.la %postun -p /sbin/ldconfig %files -%doc COPYING +%license COPYING %{_bindir}/evemu-describe %{_bindir}/evemu-device %{_bindir}/evemu-play @@ -84,7 +84,6 @@ rm -f %{buildroot}%{_libdir}/*.la %{_mandir}/man1/evemu-* %files devel -%doc COPYING %{_includedir}/evemu.h %{_libdir}/libevemu.so %{_libdir}/pkgconfig/evemu.pc @@ -97,6 +96,7 @@ rm -f %{buildroot}%{_libdir}/*.la %changelog * Fri Mar 30 2018 Carl George - 2.7.0-5 - Build with python3 on Fedora +- Fix license handling * Thu Mar 08 2018 Peter Hutterer 2.7.0-4 - Add BuildRequires for gcc-c++, needed for a test build From de4204b31a98e5e1583d79c1dad5ecbb36a52e33 Mon Sep 17 00:00:00 2001 From: Carl George Date: Mar 30 2018 20:29:56 +0000 Subject: [PATCH 3/3] Use %%ldconfig_scriptlets macro --- diff --git a/evemu.spec b/evemu.spec index 7311aeb..c2add96 100644 --- a/evemu.spec +++ b/evemu.spec @@ -70,8 +70,7 @@ make install DESTDIR=%{buildroot} # We intentionally don't ship *.la files rm -f %{buildroot}%{_libdir}/*.la -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%ldconfig_scriptlets %files %license COPYING @@ -97,6 +96,7 @@ rm -f %{buildroot}%{_libdir}/*.la * Fri Mar 30 2018 Carl George - 2.7.0-5 - Build with python3 on Fedora - Fix license handling +- Use %%ldconfig_scriptlets macro * Thu Mar 08 2018 Peter Hutterer 2.7.0-4 - Add BuildRequires for gcc-c++, needed for a test build