Use python2 for epel7.

This commit is contained in:
Takao Fujiwara 2014-11-13 16:47:01 +09:00
parent ef9bcf3d5e
commit 36b027773e

View File

@ -9,8 +9,16 @@
%global with_python_pkg 0 %global with_python_pkg 0
%endif %endif
%if (0%{?fedora} > 19 || 0%{?rhel} > 7)
%global with_python3 1
%else
%global with_python3 0
%endif
%if %with_python3
# for bytecompile in %%{_datadir}/ibus-anthy # for bytecompile in %%{_datadir}/ibus-anthy
%global __python %{__python3} %global __python %{__python3}
%endif
Name: ibus-anthy Name: ibus-anthy
Version: 1.5.6 Version: 1.5.6
@ -36,8 +44,13 @@ BuildRequires: ibus
BuildRequires: intltool BuildRequires: intltool
BuildRequires: libtool BuildRequires: libtool
BuildRequires: pkgconfig BuildRequires: pkgconfig
%if %with_python3
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3-gobject BuildRequires: python3-gobject
%else
BuildRequires: python2-devel
BuildRequires: pygobject3-base
%endif
Requires: ibus >= %{require_ibus_version} Requires: ibus >= %{require_ibus_version}
Requires: kasumi Requires: kasumi
@ -46,8 +59,13 @@ Requires: anthy
Requires: %{name}-python = %{version}-%{release} Requires: %{name}-python = %{version}-%{release}
%else %else
Requires: gtk3 Requires: gtk3
%if %with_python3
Requires: python3-cairo Requires: python3-cairo
Requires: python3-gobject Requires: python3-gobject
%else
Requires: pycairo
Requires: pygobject3
%endif
%endif %endif
%description %description
@ -61,8 +79,13 @@ Group: System Environment/Libraries
BuildArch: noarch BuildArch: noarch
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Requires: gtk3 Requires: gtk3
%if %with_python3
Requires: python3-cairo Requires: python3-cairo
Requires: python3-gobject Requires: python3-gobject
%else
Requires: pycairo
Requires: pygobject3
%endif
%description python %description python
This package contains the Anthy Python files for IBus This package contains the Anthy Python files for IBus
@ -95,7 +118,9 @@ autoreconf
--with-hotkeys \ --with-hotkeys \
%endif %endif
--with-on-off-keys="'Zenkaku_Hankaku', 'Ctrl+space', 'Ctrl+J'" \ --with-on-off-keys="'Zenkaku_Hankaku', 'Ctrl+space', 'Ctrl+J'" \
%if %with_python3
--with-python=python3 \ --with-python=python3 \
%endif
--disable-static --disable-static
# make -C po update-gmo # make -C po update-gmo
make %{?_smp_mflags} make %{?_smp_mflags}
@ -159,8 +184,9 @@ touch --no-create %{_datadir}/icons/hicolor || :
%{_libdir}/libanthygobject-%{sub_version}.so %{_libdir}/libanthygobject-%{sub_version}.so
%changelog %changelog
* Tue Oct 28 2014 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.6-2 * Thu Nov 13 2014 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.6-2
- Updated ibus-anthy-HEAD.patch to fix Enter key on setup dialog. - Updated ibus-anthy-HEAD.patch to fix Enter key on setup dialog.
- Use python2 for epel7.
* Tue Sep 16 2014 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.6-1 * Tue Sep 16 2014 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.6-1
- Bumped to 1.5.6 - Bumped to 1.5.6