Accepting request 583903 from home:scarabeus_iv:branches:M17N
Just rebase again - Do not condition sources they all need to be present in src rpm - Add conditionals for python2 and python3 - Use full url for github downloads instead of handmade tarball - Use make_install macro - Apply py3 enablement patches everywhere, no effect on py2 code - Drop python3 split spec file as it is not needed and use only python3 * As there are no dependent packages on python-ibus directly people should repoint their scripts to the python3 variant * Makefiles do not allow building both at once so stick only with py3 as we are disabling python2 slowly anyway - Drop 12.2 KDE icons as the codestreams are long out of support - Drop the kde4 icons too as we are plasma5 based now and enable appindicator integration for plasma5 conditionaly under KDE condition OBS-URL: https://build.opensuse.org/request/show/583903 OBS-URL: https://build.opensuse.org/package/show/M17N/ibus?expand=0&rev=182
This commit is contained in:
committed by
Git OBS Bridge
parent
00baca0663
commit
a60f241450
212
ibus.spec
212
ibus.spec
@@ -16,9 +16,6 @@
|
||||
#
|
||||
|
||||
|
||||
%define gtk_binary_version %(pkg-config --variable=gtk_binary_version gtk+-2.0)
|
||||
# temporary disable, 'coz ibus is not python3 ready
|
||||
%define with_python3 0
|
||||
%if 0%{?is_opensuse}
|
||||
%define with_wayland 1
|
||||
%define with_kde 1
|
||||
@@ -28,23 +25,17 @@
|
||||
%define with_kde 0
|
||||
%define with_emoji 0
|
||||
%endif
|
||||
|
||||
Name: ibus
|
||||
Version: 1.5.18
|
||||
Release: 0
|
||||
Summary: Intelligent Input Bus for Linux OS
|
||||
License: LGPL-2.1+
|
||||
License: LGPL-2.1-or-later
|
||||
Group: System/I18n/Chinese
|
||||
Url: https://github.com/ibus/
|
||||
Source: https://github.com/ibus/ibus/releases/download/%{version}/%{name}-%{version}.tar.gz
|
||||
#Source: %{name}-%{version}.tar.gz
|
||||
Source2: README.SUSE
|
||||
Source3: xim.ibus.suse.template
|
||||
Source4: xim.d-ibus-121
|
||||
%if %{with_kde}
|
||||
Source5: kde.tar.gz
|
||||
Source6: kde-12.2.tar.gz
|
||||
%endif
|
||||
Source7: macros.ibus
|
||||
Source10: ibus-autostart
|
||||
Source11: ibus-autostart.desktop
|
||||
@@ -76,7 +67,6 @@ Patch11: setup-switch-im.patch
|
||||
# Disable ibus engines preload in GNOME for These works are handled by gnome-shell.
|
||||
Patch12: ibus-disable-engines-preload-in-GNOME.patch
|
||||
BuildRequires: dbus-1-glib-devel
|
||||
BuildRequires: dbus-1-python-devel >= 0.83.0
|
||||
BuildRequires: dconf-devel >= 0.7.5
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gconf2-devel
|
||||
@@ -89,36 +79,36 @@ BuildRequires: intltool
|
||||
BuildRequires: iso-codes-devel
|
||||
BuildRequires: libnotify-devel >= 0.7
|
||||
BuildRequires: libtool
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: python3-dbus-python-devel
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-gobject2-devel
|
||||
BuildRequires: unicode-ucd
|
||||
BuildRequires: update-desktop-files
|
||||
# copy_deep method is supported since 0.31.1
|
||||
BuildRequires: vala >= 0.31.1
|
||||
BuildRequires: x11-tools
|
||||
BuildRequires: pkgconfig(json-glib-1.0)
|
||||
BuildRequires: pkgconfig(libnotify)
|
||||
# directory ownership {
|
||||
%if %{with_kde}
|
||||
BuildRequires: oxygen-icon-theme
|
||||
BuildRequires: oxygen-icon-theme-scalable
|
||||
%endif
|
||||
BuildRequires: x11-tools
|
||||
# }
|
||||
BuildRequires: pkg-config
|
||||
%if %{with_python3}
|
||||
BuildRequires: python3
|
||||
BuildRequires: python3-gobject2-devel
|
||||
Requires: python3-gobject2
|
||||
%if 0%{suse_version} > 1320
|
||||
Requires: python3-gobject-Gdk
|
||||
%endif
|
||||
%else
|
||||
BuildRequires: python
|
||||
BuildRequires: python-gobject-devel
|
||||
Requires: python-gobject
|
||||
%if 0%{suse_version} > 1320
|
||||
Requires: python2-gobject-Gdk
|
||||
%endif
|
||||
%endif
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: pkgconfig(vapigen)
|
||||
BuildRequires: pkgconfig(xkbcommon)
|
||||
Requires: dconf
|
||||
Requires: iso-codes
|
||||
Requires: libibus-1_0-5 = %{version}
|
||||
Requires: python3-dbus-python
|
||||
Requires: python3-gobject-Gdk
|
||||
Requires: python3-gobject2
|
||||
# ibus-setup will require typelib(Gdk) typelib(GdkX11), typelib(Gtk)
|
||||
# which are provided by two packages in openSUSE, so we limit their
|
||||
# versions to 3.0 only.
|
||||
Requires: typelib-1_0-Gtk-3_0
|
||||
Recommends: %{name}-lang
|
||||
Supplements: packageand(libreoffice:libreoffice-gnome)
|
||||
Provides: locale(ja;ko;zh)
|
||||
Obsoletes: ibus-gnome-shell
|
||||
%if %{with_kde}
|
||||
BuildRequires: libqt5-qtbase-devel
|
||||
%endif
|
||||
%if %{with_wayland}
|
||||
BuildRequires: pkgconfig(wayland-client) >= 1.2.0
|
||||
%endif
|
||||
@@ -127,34 +117,12 @@ BuildRequires: nodejs-emojione
|
||||
BuildRequires: unicode-emoji
|
||||
BuildRequires: pkgconfig(cldr-emoji-annotation)
|
||||
%endif
|
||||
BuildRequires: pkgconfig(xkbcommon)
|
||||
# copy_deep method is supported since 0.31.1
|
||||
BuildRequires: vala >= 0.31.1
|
||||
Requires: dbus-1-python
|
||||
Requires: dconf
|
||||
Requires: iso-codes
|
||||
Requires: libibus-1_0-5 = %{version}
|
||||
# ibus-setup will require typelib(Gdk) typelib(GdkX11), typelib(Gtk)
|
||||
# which are provided by two packages in openSUSE, so we limit their
|
||||
# versions to 3.0 only.
|
||||
Requires: typelib-1_0-Gtk-3_0
|
||||
Recommends: %{name}-lang
|
||||
|
||||
# PATCH-FEATURE-SLE FATE#319095 qzhao@suse.com
|
||||
# Add conflict with fcitx to keep old IMF for people who update from SLE-12 SP0 to SP1.
|
||||
%if !0%{?is_opensuse}
|
||||
Conflicts: fcitx
|
||||
%endif
|
||||
|
||||
#Fix cursor following problem in KDE4 for libreoffice.
|
||||
%if 0%{?suse_version} != 1315
|
||||
Supplements: packageand(libreoffice:libreoffice-gnome)
|
||||
%endif
|
||||
|
||||
Provides: locale(ja;ko;zh)
|
||||
Obsoletes: ibus-gnome-shell
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
IBus means Intelligent Input Bus. It is a new input framework for Linux OS. It provides
|
||||
full featured and user friendly input method user interface. It also may help
|
||||
@@ -196,46 +164,14 @@ Supplements: packageand(ibus:gtk3)
|
||||
%description gtk3
|
||||
This package contains ibus im module for gtk3
|
||||
|
||||
%if %{with_python3}
|
||||
%package -n python3-ibus
|
||||
Summary: Python3 module for ibus
|
||||
Group: System/I18n/Chinese
|
||||
Requires: %{name} = %{version}
|
||||
Requires: python3
|
||||
Obsoletes: python-ibus
|
||||
|
||||
%description -n python3-ibus
|
||||
This package contains python3 module for ibus
|
||||
|
||||
%else
|
||||
%package -n python-ibus
|
||||
Summary: Python module for ibus
|
||||
Group: System/I18n/Chinese
|
||||
Requires: %{name} = %{version}
|
||||
%py_requires
|
||||
|
||||
%description -n python-ibus
|
||||
This package contains python module for ibus
|
||||
|
||||
%endif
|
||||
|
||||
%if %{with_kde}
|
||||
%package branding-openSUSE-KDE
|
||||
Summary: openSUSE branding for KDE
|
||||
Group: System/GUI/KDE
|
||||
Requires: ibus = %{version}
|
||||
Supplements: packageand(ibus:branding-openSUSE-KDE)
|
||||
Supplements: packageand(ibus:kdelibs4)
|
||||
Provides: ibus-branding = %{version}
|
||||
Conflicts: otherproviders(ibus-branding)
|
||||
%if 0%{?suse_version} >= 1140
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
%description branding-openSUSE-KDE
|
||||
openSUSE branding for KDE monochrome icons in systray.
|
||||
%endif
|
||||
|
||||
%package devel
|
||||
Summary: Development tools for ibus
|
||||
Group: Development/Libraries/Other
|
||||
@@ -255,37 +191,22 @@ docs for ibus.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
# hack to fix incompatibility of gtk-query-immodules-2.0 (bnc#845860)
|
||||
%if 0%{?suse_version} < 1310
|
||||
sed -i \
|
||||
-e's@\(gtk-query-immodules-2.0-64\) --update-cache@\1 > <prefix>%{_sysconfdir}/gtk-2.0/gtk64.immodules@g' \
|
||||
-e's@\(gtk-query-immodules-2.0\) --update-cache@\1 > <prefix>%{_sysconfdir}/gtk-2.0/gtk.immodules@g' \
|
||||
%{SOURCE99}
|
||||
%endif
|
||||
|
||||
%patch4 -p1
|
||||
|
||||
%if %{with_python3}
|
||||
%patch5 -p1
|
||||
%patch7 -p1
|
||||
%endif
|
||||
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
|
||||
%if 0%{?suse_version} == 1315 && !0%{?is_opensuse}
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%endif
|
||||
|
||||
cp -r %{SOURCE2} .
|
||||
cp -r %{SOURCE3} .
|
||||
cp -r %{SOURCE4} .
|
||||
sed -i 1i"SYS_LIB=%{_lib}" xim.d-ibus-121
|
||||
cp -r %{SOURCE10} .
|
||||
cp -r %{SOURCE11} .
|
||||
|
||||
%if !0%{?is_opensuse}
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%endif
|
||||
|
||||
@@ -300,9 +221,12 @@ intltoolize -f
|
||||
%else
|
||||
--disable-emoji-dict \
|
||||
%endif
|
||||
%if %{with_python3}
|
||||
--with-python=python3 \
|
||||
%if %{with_kde}
|
||||
--enable-appindicator \
|
||||
%else
|
||||
--disable-appindicator \
|
||||
%endif
|
||||
--with-python=python3 \
|
||||
--enable-python-library \
|
||||
--enable-introspection \
|
||||
--disable-gconf \
|
||||
@@ -310,9 +234,6 @@ intltoolize -f
|
||||
--enable-gtk-doc \
|
||||
%if %{with_wayland}
|
||||
--enable-wayland \
|
||||
%endif
|
||||
%if 0%{?suse_version} < 1315
|
||||
--disable-appindicator \
|
||||
%endif
|
||||
--enable-surrounding-text \
|
||||
--enable-appindicator_engine_icon \
|
||||
@@ -321,7 +242,7 @@ intltoolize -f
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make DESTDIR=%{buildroot} install -j1
|
||||
%make_install
|
||||
|
||||
# autostart
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/X11/xim.d/
|
||||
@@ -345,7 +266,7 @@ pushd %{buildroot}%{_sysconfdir}/X11/xim.d/
|
||||
popd
|
||||
|
||||
# remove static libs
|
||||
find %{buildroot}/%{_libdir} -name "*.la" -type f -delete -print
|
||||
find %{buildroot} -type f -name "*.la" -delete -print
|
||||
|
||||
mkdir -p %{buildroot}%{_datadir}/pixmaps
|
||||
ln -sf %{_datadir}/icons/hicolor/48x48/apps/ibus-keyboard.png \
|
||||
@@ -354,25 +275,6 @@ ln -sf %{_datadir}/icons/hicolor/48x48/apps/ibus-keyboard.png \
|
||||
# touch for %%ghost
|
||||
touch %{buildroot}/%{_sysconfdir}/dconf/db/ibus
|
||||
|
||||
%if %{with_kde}
|
||||
# fix kde monochrome icons
|
||||
%if 0%{?suse_version} >= 1230
|
||||
cp -r %{SOURCE5} ./
|
||||
%else
|
||||
cp -r %{SOURCE6} ./
|
||||
mv kde-12.2.tar.gz kde.tar.gz
|
||||
%endif
|
||||
tar -xzf kde.tar.gz
|
||||
pushd kde
|
||||
for i in 16 22 24 32 48 ; do
|
||||
mkdir -p %{buildroot}%{_datadir}/icons/oxygen/${i}x${i}/apps/
|
||||
cp -r ibus-keyboard.${i}x${i}.png %{buildroot}%{_datadir}/icons/oxygen/${i}x${i}/apps/ibus-keyboard.png
|
||||
done
|
||||
mkdir -p %{buildroot}%{_datadir}/icons/oxygen/scalable/apps/
|
||||
cp -r ibus-keyboard.svgz %{buildroot}%{_datadir}/icons/oxygen/scalable/apps/
|
||||
popd
|
||||
%endif
|
||||
|
||||
# install macros
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/rpm
|
||||
install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/rpm
|
||||
@@ -384,13 +286,13 @@ install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/rpm
|
||||
%find_lang ibus10 %{?no_lang_C}
|
||||
|
||||
%post
|
||||
%{glib2_gsettings_schema_post}
|
||||
%glib2_gsettings_schema_post
|
||||
|
||||
%posttrans
|
||||
dconf update
|
||||
|
||||
%postun
|
||||
%{glib2_gsettings_schema_postun}
|
||||
%glib2_gsettings_schema_postun
|
||||
dconf update
|
||||
|
||||
%post gtk
|
||||
@@ -400,9 +302,7 @@ dconf update
|
||||
%{gtk2_immodule_postun}
|
||||
|
||||
%post -n libibus-1_0-5 -p /sbin/ldconfig
|
||||
|
||||
%postun -n libibus-1_0-5 -p /sbin/ldconfig
|
||||
|
||||
%post gtk3
|
||||
%{gtk3_immodule_post}
|
||||
|
||||
@@ -410,7 +310,6 @@ dconf update
|
||||
%{gtk3_immodule_postun}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS COPYING README README.SUSE xim.ibus.suse.template
|
||||
%config %{_sysconfdir}/rpm/macros.ibus
|
||||
%config %{_sysconfdir}/X11/xim.d/*
|
||||
@@ -436,48 +335,31 @@ dconf update
|
||||
%config %{_sysconfdir}/dconf/db/ibus.d/00-upstream-settings
|
||||
%config %{_sysconfdir}/dconf/profile/ibus
|
||||
%{_sysconfdir}/xdg/autostart/ibus-autostart.desktop
|
||||
%{_mandir}/man1/ibus.1.gz
|
||||
%{_mandir}/man1/ibus-daemon.1.gz
|
||||
%{_mandir}/man1/ibus-setup.1.gz
|
||||
%{_mandir}/man1/ibus.1%{ext_man}
|
||||
%{_mandir}/man1/ibus-daemon.1%{ext_man}
|
||||
%{_mandir}/man1/ibus-setup.1%{ext_man}
|
||||
%if %{with_emoji}
|
||||
%{_mandir}/man7/ibus-emoji.7.gz
|
||||
%{_mandir}/man7/ibus-emoji.7%{ext_man}
|
||||
%endif
|
||||
|
||||
%files lang -f ibus10.lang
|
||||
%defattr(-,root,root)
|
||||
|
||||
%files -n libibus-1_0-5
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libibus-1.0.so.*
|
||||
|
||||
%files -n typelib-1_0-IBus-1_0
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/girepository-1.0/IBus-1.0.typelib
|
||||
|
||||
%files gtk
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/gtk-2.0/%{gtk_binary_version}/immodules/im-ibus.so
|
||||
%{_libdir}/gtk-2.0/*/immodules/im-ibus.so
|
||||
|
||||
%files gtk3
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/gtk-3.0/3.0.0/immodules/im-ibus.so
|
||||
|
||||
%if %{with_python3}
|
||||
%files -n python3-ibus
|
||||
%defattr(-,root,root)
|
||||
%{python3_sitearch}/ibus
|
||||
|
||||
%else
|
||||
|
||||
%files -n python-ibus
|
||||
%defattr(-,root,root)
|
||||
%{python_sitearch}/ibus
|
||||
%{python_sitearch}/gi/overrides/*
|
||||
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libibus-1.0.so
|
||||
%{_includedir}/ibus-1.0
|
||||
%{_datadir}/gtk-doc/html/ibus
|
||||
@@ -486,12 +368,4 @@ dconf update
|
||||
%{_datadir}/vala/vapi/ibus-1.0.deps
|
||||
%{_datadir}/vala/vapi/ibus-1.0.vapi
|
||||
|
||||
%if %{with_kde}
|
||||
%files branding-openSUSE-KDE
|
||||
%defattr(-,root,root)
|
||||
%dir %{_datadir}/icons/oxygen/*
|
||||
%dir %{_datadir}/icons/oxygen/*/apps
|
||||
%{_datadir}/icons/oxygen/*/apps/ibus-keyboard.*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user