public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jens Petersen <petersen@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/ibus] autotool: add xinputrc alternative when installing or uninstalling
Date: Sun, 31 May 2026 02:03:59 GMT	[thread overview]
Message-ID: <178019303922.1.15848571446738459366.rpms-ibus-3d689150c101@fedoraproject.org> (raw)

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.
 

                 reply	other threads:[~2026-05-31  2:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178019303922.1.15848571446738459366.rpms-ibus-3d689150c101@fedoraproject.org \
    --to=petersen@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox