diff --git a/caribou.spec b/caribou.spec index 3e58ae5..dc0b898 100644 --- a/caribou.spec +++ b/caribou.spec @@ -23,8 +23,12 @@ BuildRequires: libgee-devel BuildRequires: gobject-introspection-devel BuildRequires: at-spi2-core-devel +%if 0%{?rhel} +Requires: python2-%{name} = %{version}-%{release} +%else # Changed in F23 to pull python3-caribou default Requires: python3-%{name} = %{version}-%{release} +%endif Requires: gobject-introspection Requires: caribou-gtk2-module Requires: caribou-gtk3-module @@ -62,6 +66,7 @@ BuildArch: noarch %description -n python2-caribou This package contains caribou python GUI +%if !0%{?rhel} %package -n python3-caribou Summary: Keyboard UI for %{name} BuildRequires: python3-devel @@ -74,6 +79,7 @@ BuildArch: noarch %description -n python3-caribou This package contains caribou python3 GUI +%endif %package gtk2-module Summary: Gtk2 module for %{name} @@ -93,7 +99,11 @@ This package contains caribou module for gtk3 applications. %package antler Summary: Keyboard implementation for %{name} +%if 0%{?rhel} +Requires: python2-%{name} = %{version}-%{release} +%else Requires: python3-%{name} = %{version}-%{release} +%endif Obsoletes: caribou < 0.4.1-3 %description antler @@ -112,10 +122,12 @@ make V=1 %{?_smp_mflags} %install make install DESTDIR=%{buildroot} INSTALL="install -p" +%if !0%{?rhel} # For Python3 make clean %configure --disable-static PYTHON=python3 make install DESTDIR=%{buildroot} INSTALL="install -p" +%endif find %{buildroot} -name '*.la' -exec rm -f {} ';' @@ -159,8 +171,10 @@ fi %files -n python2-caribou %{python2_sitelib}/caribou +%if !0%{?rhel} %files -n python3-caribou %{python3_sitelib}/caribou +%endif %files devel %{_includedir}/*