public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ibus] autotool: add xinputrc alternative when installing or uninstalling
@ 2026-05-31  2:03 Jens Petersen
  0 siblings, 0 replies; only message in thread
From: Jens Petersen @ 2026-05-31  2:03 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/ibus
Branch : autotool
Commit : 3d689150c101c9b3fa8654c19bdee73e4a10724f
Author : Jens Petersen <petersen@fedoraproject.org>
Date   : 2008-10-07T01:55:23+00:00
Stats  : +16/-3 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/ibus/c/3d689150c101c9b3fa8654c19bdee73e4a10724f?branch=autotool

Log:
add xinputrc alternative when installing or uninstalling

---
diff --git a/ibus.spec b/ibus.spec
index 137621c..9c0dc72 100644
--- a/ibus.spec
+++ b/ibus.spec
@@ -3,7 +3,7 @@
 %define mod_path ibus-0.1
 Name:       ibus
 Version:    0.1.1.20081006
-Release:    1%{?dist}
+Release:    2%{?dist}
 Summary:    Intelligent Input Bus for Linux OS
 License:    LGPLv2+
 Group:      System Environment/Libraries
@@ -25,6 +25,8 @@ Requires:   dbus-python >= 0.83.0
 Requires:   gnome-python2-gconf
 Requires:   pyxdg
 Requires:   iso-codes
+Requires(post): %{_sbindir}/alternatives
+Requires(postun): %{_sbindir}/alternatives
 
 %description
 IBus means Intelligent Input Bus. It is a new input framework for Linux OS. It provides
@@ -74,7 +76,9 @@ install -pm 644 %{SOURCE1} ${RPM_BUILD_ROOT}/%{_xinputconf}
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post -p /sbin/ldconfig
+%post
+/sbin/ldconfig
+%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 83 || :
 
 %post gtk
 %{_bindir}/update-gtk-immodules %{_host} || :
@@ -82,7 +86,13 @@ rm -rf $RPM_BUILD_ROOT
 %postun gtk
 %{_bindir}/update-gtk-immodules %{_host} || :
 
-%postun -p /sbin/ldconfig
+%postun
+/sbin/ldconfig
+if [ "$1" = "0" ]; then
+   %{_sbindir}/alternatives --remove xinputrc %{_xinputconf} || :
+   # if alternative was set to manual, reset to auto
+   [ -L %{_sysconfdir}/alternatives/xinputrc -a "`readlink %{_sysconfdir}/alternatives/xinputrc`" = "%{_xinputconf}" ] && %{_sbindir}/alternatives --auto xinputrc || :
+fi
 
 %files -f %{name}.lang
 %defattr(-,root,root,-)
@@ -123,6 +133,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/qt4/plugins/inputmethods/libibus.so
 
 %changelog
+* Tue Oct  7 2008 Jens Petersen <petersen@redhat.com> - 0.1.1.20081006-2
+- add xinputrc alternative when installing or uninstalling
+
 * Mon Oct 06 2008 Huang Peng <shawn.p.huang@gmail.com> - 0.1.1.20081006-1
 - Update to 0.1.1.20081006.
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-31  2:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-31  2:03 [rpms/ibus] autotool: add xinputrc alternative when installing or uninstalling Jens Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox