imsettings/imsettings.spec
2021-03-15 10:22:17 +08:00

151 lines
4.7 KiB
RPMSpec

Name: imsettings
Version: 1.7.3
Release: 8
License: LGPLv2.1
Summary: Delivery framework for general Input Method configuration
URL: https://bitbucket.org/tagoh/imsettings/src/master/
Source0: https://bitbucket.org/tagoh/imsettings/downloads/imsettings-%{version}.tar.bz2
Patch0000: imsettings-constraint-of-language.patch
Patch0001: imsettings-disable-xim.patch
Patch0002: imsettings-xinput-xcompose.patch
Patch0003: imsettings-force-enable-for-cinnamon.patch
Patch0004: imsettings-fix-unbound-var.patch
Patch0005: Fix-can-not-input-chinese-in-en-environment.patch
BuildRequires: desktop-file-utils intltool gettext libtool automake autoconf glib2 >= 2.32.0 gobject-introspection-devel
BuildRequires: libnotify-devel libX11-devel libgxim-devel >= 0.5.0 gtk3-devel >= 3.3.3
Requires: xorg-x11-xinit >= 1.0.2-22
Requires: imsettings-desktop-module = %{version}-%{release}
Requires(post): systemd %{_sbindir}/alternatives
Requires(postun): systemd %{_sbindir}/alternatives
Provides: imsettings-libs = %{version}-%{release}
Obsoletes: imsettings-libs < %{version}-%{release}
%global _description \
IMSettings is a framework that delivers Input Method settings and\
applies the changes so they take effect immediately without any\
need to restart applications or the desktop.\
%description %_description
Shared library for imsettings and the core DBus services and some utilities.
%package devel
Summary: Development files for imsettings
Requires: imsettings = %{version}-%{release} pkgconfig glib2-devel >= 2.32.0
%description devel %_description
Development files to make any applications with imsettings.
%package help
Summary: Help documentation for the imsettings
%description help
Help documentation for the imsettings.
%package xim
Summary: XIM support on imsettings
Requires: imsettings = %{version}-%{release} im-chooser
%description xim %_description
A module to get this working with XIM.
%package gsettings
Summary: GSettings support on imsettings
Requires: imsettings = %{version}-%{release} dconf
Provides: imsettings-desktop-module = %{version}-%{release} imsettings-gnome = %{version}-%{release}
Obsoletes: imsettings-gnome < 1.5.1-3
%description gsettings %_description
A module to get this working on GNOME and Cinnamon which requires
GSettings in their own XSETTINGS daemons.
%package qt
Summary: Qt support on imsettings
Requires: imsettings = %{version}-%{release} im-chooser
Provides: imsettings-desktop-module%{?_isa} = %{version}-%{release}
%description qt %_description
A module to get this working on Qt applications.
%prep
%autosetup -p1
%build
autoreconf -f
%configure --with-xinputsh=50-xinput.sh --disable-static --disable-schemas-install
%make_build
%install
%make_install
for i in %{_libexecdir}/imsettings-target-checker %{_libexecdir}/xinputinfo \
%{_sysconfdir}/X11/xinit/xinitrc.d/50-xinput;
do
chmod 0755 $RPM_BUILD_ROOT$i.sh
done
%delete_la
rm -f $RPM_BUILD_ROOT%{_libdir}/imsettings/libimsettings-{gconf,mateconf}.so
desktop-file-validate $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/imsettings-start.desktop
rm -f $RPM_BUILD_ROOT%{_libdir}/imsettings/libimsettings-{lxde,xfce,mate-gsettings,cinnamon-gsettings}.so
%find_lang imsettings
%post
num=10
for i in none xcompose xim;
do
alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_sysconfdir}/X11/xinit/xinput.d/$i.conf $num
let num+=10
done
systemctl reload dbus.service 2>&1 || :
/sbin/ldconfig
%postun
if [ "$1" = 0 ]; then
for i in none xcompose xim;
do
alternatives --remove xinputrc %{_sysconfdir}/X11/xinit/xinput.d/$i.conf
done
systemctl reload dbus.service 2>&1 || :
fi
/sbin/ldconfig
%files -f imsettings.lang
%license COPYING
%dir %{_libdir}/imsettings
%{_bindir}/imsettings-[^x]*
%{_libexecdir}/*
%{_datadir}/dbus-1/services/*.service
%{_datadir}/pixmaps/*.png
%{_sysconfdir}/*
%{_libdir}/libimsettings.so.*
%files devel
%{_includedir}/imsettings
%{_libdir}/libimsettings.so
%{_libdir}/pkgconfig/imsettings.pc
%{_libdir}/girepository-*/IMSettings-*.typelib
%{_datadir}/g*
%files help
%doc AUTHORS ChangeLog NEWS README
%{_mandir}/man1/imsettings-*.1*
%files xim
%{_bindir}/imsettings-xim
%{_libdir}/imsettings/libimsettings-xim.so
%files gsettings
%{_libdir}/imsettings/libimsettings-gsettings.so
%files qt
%{_libdir}/imsettings/libimsettings-qt.so
%changelog
* Fri Mar 12 2021 weidong <weidong@uniontech.com> - 1.7.3-8
- fix can't input chinese in en environment
* Sat Dec 21 2019 likexin <likexin4@huawei.com> - 1.7.3-6
- package init