From 46dfb4a035f1a84ea0291a7acc8a45c69c9af9e0 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Thu, 18 Oct 2018 16:49:02 +0900 Subject: [PATCH] Enhance package dependencies - Use __python3 instead of python3 - Use Recommends dependencies instead of Requires ones for Flatpak --- ibus.spec | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/ibus.spec b/ibus.spec index 26f5b04..0886907 100644 --- a/ibus.spec +++ b/ibus.spec @@ -1,7 +1,7 @@ -%if (0%{?fedora} || 0%{?rhel} <= 7) -%global with_python2 1 -%else +%if (0%{?fedora} > 29 || 0%{?rhel} > 7) %global with_python2 0 +%else +%global with_python2 1 %endif %global with_pkg_config %(pkg-config --version >/dev/null 2>&1 && echo -n "1" || echo -n "0") @@ -31,7 +31,7 @@ Name: ibus Version: 1.5.19 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Intelligent Input Bus for Linux OS License: LGPLv2+ Group: System Environment/Libraries @@ -94,7 +94,7 @@ Requires: dconf # Owner of %%python3_sitearch/gi/overrides Requires: python3-gobject # https://bugzilla.redhat.com/show_bug.cgi?id=1161871 -Requires: python3 +%{?__python3:Requires: %{__python3}} # Owner of %%{_sysconfdir}/X11/xinit Requires: xorg-x11-xinit # for setxkbmap @@ -131,7 +131,7 @@ This package contains the libraries for IBus %package gtk2 Summary: IBus IM module for GTK2 Group: System Environment/Libraries -Requires: %{name}%{?_isa} = %{version}-%{release} +Recommends: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: glib2 >= %{glib_ver} Requires(post): glib2 >= %{glib_ver} @@ -145,7 +145,7 @@ This package contains IBus IM module for GTK2 %package gtk3 Summary: IBus IM module for GTK3 Group: System Environment/Libraries -Requires: %{name}%{?_isa} = %{version}-%{release} +Recommends: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: glib2 >= %{glib_ver} Requires(post): glib2 >= %{glib_ver} @@ -156,8 +156,8 @@ This package contains IBus IM module for GTK3 %package setup Summary: IBus setup utility Group: System Environment/Libraries -Requires: %{name} = %{version}-%{release} -Requires: python3 +Recommends: %{name} = %{version}-%{release} +%{?__python3:Requires: %{__python3}} Requires: python3-gobject BuildRequires: gobject-introspection-devel BuildRequires: pygobject3-devel @@ -170,7 +170,7 @@ This is a setup utility for IBus. %package pygtk2 Summary: IBus PyGTK2 library Group: System Environment/Libraries -Requires: %{name} = %{version}-%{release} +Recommends: %{name} = %{version}-%{release} %if (0%{?fedora} && 0%{?fedora} <= 27) || (0%{?rhel} && 0%{?rhel} <= 7) Requires: dbus-python >= %{dbus_python_version} %else @@ -204,7 +204,7 @@ some functions in GObject-Introspection. %package wayland Summary: IBus IM module for Wayland Group: System Environment/Libraries -Requires: %{name}%{?_isa} = %{version}-%{release} +Recommends: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description wayland @@ -213,7 +213,7 @@ This package contains IBus IM module for Wayland %package devel Summary: Development tools for ibus Group: Development/Libraries -Requires: %{name}%{?_isa} = %{version}-%{release} +Recommends: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: dbus-devel Requires: glib2-devel @@ -230,10 +230,10 @@ docs for ibus. Summary: Developer documents for IBus Group: Development/Libraries %if (0%{?fedora} >= 19 || 0%{?rhel} >= 7) -Requires: %{name} = %{version}-%{release} +Recommends: %{name} = %{version}-%{release} BuildArch: noarch %else -Requires: %{name}%{?_isa} = %{version}-%{release} +Recommends: %{name}%{?_isa} = %{version}-%{release} %endif %description devel-docs @@ -428,6 +428,10 @@ dconf update || : %{_datadir}/gtk-doc/html/* %changelog +* Thu Oct 18 2018 Takao Fujiwara - 1.5.19-5 +- Use __python3 instead of python3 +- Use Recommends dependencies instead of Requires ones for Flatpak + * Fri Sep 14 2018 Takao Fujiwara - 1.5.19-4 - Fix Bug SEGV Choose an emoji by mouse from the emoji category list