#2 Build with python3 on Fedora
Merged 2 years ago by whot. Opened 2 years ago by carlwgeorge.
rpms/ carlwgeorge/evemu master  into  master

file modified
+26 -8
@@ -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 @@ 

  %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 @@ 

  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 @@ 

  

  %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}

  
@@ -58,11 +70,10 @@ 

  # We intentionally don't ship *.la files

  rm -f %{buildroot}%{_libdir}/*.la

  

- %post -p /sbin/ldconfig

- %postun -p /sbin/ldconfig

+ %ldconfig_scriptlets

  

  %files

- %doc COPYING

+ %license COPYING

  %{_bindir}/evemu-describe

  %{_bindir}/evemu-device

  %{_bindir}/evemu-play
@@ -72,14 +83,21 @@ 

  %{_mandir}/man1/evemu-*

  

  %files devel

- %doc COPYING

  %{_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 <carl@george.computer> - 2.7.0-5

+ - Build with python3 on Fedora

+ - Fix license handling

+ - Use %%ldconfig_scriptlets macro

+ 

  * Thu Mar 08 2018 Peter Hutterer <peter.hutterer@redhat.com> 2.7.0-4

  - Add BuildRequires for gcc-c++, needed for a test build

  

  • Build with python3 on Fedora
  • Fix license handling
  • Use %%ldconfig_scriptlets macro

Pull-Request has been merged by whot

2 years ago