rpms/system-switch-im/devel im-switch, NONE, 1.1 system-switch-im.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Leon Ho (llch)
fedora-extras-commits at redhat.com
Mon Mar 21 01:30:25 UTC 2005
Author: llch
Update of /cvs/extras/rpms/system-switch-im/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27470/devel
Modified Files:
.cvsignore sources
Added Files:
im-switch system-switch-im.spec
Log Message:
auto-import system-switch-im-0.1.2-3 on branch devel from system-switch-im-0.1.2-3.src.rpm
--- NEW FILE im-switch ---
#!/bin/sh
XINPUT_PATH=/etc/X11/xinit/xinput.d
DOTXINPUT_PATH=${HOME}/.xinput.d
ALTER_XINPUT=/etc/alternatives/xinput-
LNG=`echo ${LC_CTYPE:-$LANG} | awk -F. '{ print $1 }'`
DEFAULT=`/usr/sbin/alternatives --display xinput-$LNG | awk '{ if ($0 ~/link/) print $5 }'`
auto() {
if [ ! -r "${ALTER_XINPUT}${LNG}" ]; then
echo "No alternatives defined for language $LNG"
exit 1
else
if [ "$UID" -eq 0 ]; then
/usr/sbin/alternatives --auto xinput-$LNG
else
[ -r "${XINPUT_PATH}/${LNG}" -a -r "${DOTXINPUT_PATH}/${LNG}" ] && mv ${DOTXINPUT_PATH}/${LNG} ${DOTXINPUT_PATH}/${LNG}.backup
fi
fi
}
list() {
if [ -r "${DOTXINPUT_PATH}/${LNG}" ]; then
echo "You have ${LNG} setup in \"${DOTXINPUT_PATH}\"."
echo "======================================================="
fi
if [ ! -r "${ALTER_XINPUT}${LNG}" ]; then
echo "No alternatives defined for language $LNG"
else
/usr/sbin/alternatives --display xinput-$LNG | sed -e "s%$XINPUT_PATH/%%"
fi
echo "======================================================="
echo "The following languages currently have input methods configured:"
for i in `ls $ALTER_XINPUT* | sed -e "s%$ALTER_XINPUT%%"`; do
echo -n "$i "
done
echo
}
setalt() {
if [ "$UID" -eq 0 ]; then
if [ ! -r "${ALTER_XINPUT}${LNG}" ]; then
echo "No alternatives defined for language $LNG"
else
/usr/sbin/alternatives --set xinput-$LNG $XINPUT_PATH/$1
fi
else
[ -r "$XINPUT_PATH/$1" ] || { echo "No xinput.d config for $1 available." ; exit 1 ; }
if [ -d ${DOTXINPUT_PATH} ]; then
[ -r "${DOTXINPUT_PATH}/${LNG}" ] && mv ${DOTXINPUT_PATH}/${LNG} ${DOTXINPUT_PATH}/${LNG}.backup
else
mkdir -p ${DOTXINPUT_PATH}
fi
ln -s $XINPUT_PATH/$1 ${DOTXINPUT_PATH}/$LNG
fi
}
help() {
echo "Input Method Switcher 0.3"
echo ""
echo "Usage: $0 [-z lang] -s inputmethodname"
echo " to set a specific input method for the language"
echo " $0 [-z lang] -a"
echo " to revent to the default input method for the language"
echo " $0 [-z lang] -l"
echo " to list current settings and available input methods for"
echo " the language, and also all the available languages"
echo " $0 -h"
echo " to show this help"
echo
echo "The \"LANG\" argument of -z takes the form \"ll_CC\" and is used to override"
echo "the current language with ll_CC instead: eg \"-z ja_JP\""
exit 65
}
setcommand() {
if [ -z "$COMMAND" ]; then
COMMAND=$1
else
echo "Use only of -s, -a or -l."
echo "Try \"$0 -h\" for usage."
exit 1
fi
}
if [ $# -eq 0 ]; then
help
exit 1
fi
bad_option=0
while getopts "hz:als:" OPTION; do
case $OPTION in
z) LNG=$OPTARG;;
a) setcommand auto;;
l) setcommand list;;
s) setcommand "setalt $OPTARG";;
h) setcommand "help $0";;
?) bad_option=1
esac
done
if [ "$bad_option" -eq 1 ]; then
echo "Try \"$0 -h\" for usage."
exit 1
else
$COMMAND
fi
--- NEW FILE system-switch-im.spec ---
Summary: The Input Method System Switcher
Name: system-switch-im
Version: 0.1.2
Release: 3
Source0: %{name}-%{version}.tar.bz2
Source1: im-switch
License: GPL
Group: Applications/System
BuildRoot: %{_tmppath}/%{name}-root
BuildArch: noarch
#Requires: newt
Requires: /usr/sbin/alternatives
Requires: python >= 2.3
# GUI
Requires: libglade2
Requires: pygtk2-libglade
Requires: pygtk2
Conflicts: xinitrc < 4.0.1-1
BuildPreReq: python >= 2.3
BuildPreReq: gettext
BuildPreReq: automake
BuildPreReq: intltool
%description
The system-switch-im is the Input Method Switcher.
It enables users to easily switch between various input methods that they have installed.
#%package gnome
#Summary: A GUI interface for Input Method System Switcher.
#Group: Applications/System
#Requires: %{name} = %{version}-%{release}
#Requires: python >= 2.3
#Requires: /usr/sbin/alternatives
#%description gnome
#The system-switch-im-gnome package contains a GNOME interface for the
#Input Method Switcher.
%prep
%setup -q
%build
make
%install
rm -rf %{buildroot}
%makeinstall
install %SOURCE1 $RPM_BUILD_ROOT%{_bindir}/
rm -rf $RPM_BUILD_ROOT/usr/bin/system-switch-im-nox
rm -rf $RPM_BUILD_ROOT/usr/sbin/system-switch-im-nox
rm -rf $RPM_BUILD_ROOT/etc/pam.d/system-switch-im-nox
rm -rf $RPM_BUILD_ROOT/etc/security/console.apps/system-switch-im-nox
rm -rf $RPM_BUILD_ROOT/usr/share/system-switch-im/imswitch_tui.py
rm -rf $RPM_BUILD_ROOT/usr/share/system-switch-im/imswitch_tui.pyc
%find_lang %{name}
%clean
rm -rf %{buildroot}
%files -f %{name}.lang
%defattr(-,root,root)
%{_bindir}/*
%{_sbindir}/*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/functions.py*
%{_datadir}/%{name}/locale-list
%config(noreplace) /etc/pam.d/*
#%{_datadir}/%{name}/imswitch_tui.py*
#%config(noreplace) /etc/security/console.apps/%{name}-nox
#%files gnome
#%defattr(-,root,root)
%config(noreplace) /etc/security/console.apps/%{name}
%{_datadir}/applications/*
%{_datadir}/pixmaps/*
%{_datadir}/%{name}/imswitch_gui.py*
%{_datadir}/%{name}/pixmaps
%{_datadir}/%{name}/imswitch.glade
%changelog
* Mon Oct 11 2004 Leon Ho <llch at redhat.com> 0.1.2-3
- rebuilt for translation
* Thu Sep 16 2004 Leon Ho <llch at redhat.com> 0.1.2-2
- fixed Makefile for locale-list
* Thu Sep 9 2004 Leon Ho <llch at redhat.com> 0.1.2-1
- used locale-list to display more user friendly language names
- fixed on the category for .desktop
- only display languages who has more than one IM
* Mon Aug 24 2004 Leon Ho <llch at redhat.com> 0.1.1-3
- added "Languages" into translatable string
* Mon Aug 23 2004 Leon Ho <llch at redhat.com> 0.1.1-2
- included im-switch cli tool
- fixed on unable to get kinput2 alternatives files bug
- added notification for restarting X
- dropped XIM ratio and retrim UI
- redid po files for translators and built existing translation
- checked if able to avoid confirm dialog if no change
* Wed Jul 21 2004 Leon Ho <llch at redhat.com> 0.1.1-1
- 0.1.1 release
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/system-switch-im/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 21 Mar 2005 01:29:15 -0000 1.1
+++ .cvsignore 21 Mar 2005 01:30:23 -0000 1.2
@@ -0,0 +1 @@
+system-switch-im-0.1.2.tar.bz2
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/system-switch-im/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 21 Mar 2005 01:29:15 -0000 1.1
+++ sources 21 Mar 2005 01:30:23 -0000 1.2
@@ -0,0 +1 @@
+d6702deff3ec8f4fbc61d8c219df94b0 system-switch-im-0.1.2.tar.bz2
More information about the scm-commits
mailing list