diff options
Diffstat (limited to 'misc/ibus')
-rw-r--r-- | misc/ibus/README | 14 | ||||
-rw-r--r-- | misc/ibus/README.SLACKWARE | 27 | ||||
-rw-r--r-- | misc/ibus/doinst.sh | 43 | ||||
-rw-r--r-- | misc/ibus/ibus.SlackBuild | 105 | ||||
-rw-r--r-- | misc/ibus/ibus.info | 10 | ||||
-rw-r--r-- | misc/ibus/profile.d/ibus.csh | 17 | ||||
-rw-r--r-- | misc/ibus/profile.d/ibus.sh | 16 | ||||
-rw-r--r-- | misc/ibus/slack-desc | 19 |
8 files changed, 251 insertions, 0 deletions
diff --git a/misc/ibus/README b/misc/ibus/README new file mode 100644 index 0000000000..e1265f0d69 --- /dev/null +++ b/misc/ibus/README @@ -0,0 +1,14 @@ +IBus is an Intelligent Input Bus. It is a new input framework for Linux. +It provides a full featured and user friendly input method user interface. +It also may help developers to develop input method easily. + +After installing at least one engine (e.g. PinYin engine) and enabling it +in ibus-setup, ibus itself should be fully functional. If you want to use +ibus as your primary input method, you should remove the scim package. + +This requires gconf and pyxdg. +If you use qt applications, then you probably want ibus-qt as well. + +After installing, ibus will automatically be started in an xdg-compliant +desktop environment; if this behavior is undesirable, you can disable it +using your DE's session and/or startup management utility. diff --git a/misc/ibus/README.SLACKWARE b/misc/ibus/README.SLACKWARE new file mode 100644 index 0000000000..a7c2378f61 --- /dev/null +++ b/misc/ibus/README.SLACKWARE @@ -0,0 +1,27 @@ +================= +ibus auto-startup +================= +The ibus package has an ibus.desktop file in /etc/xdg/autostart/, so if your +desktop environment is xdg compatible and the $XDG_CONFIG_DIRS is not set, ibus +will be automatically launched during startup of the your DE after you have +logged in. If you don't want to remove ibus package and want use other input +method programs (like SCIM), you can place an ibus.desktop file in your personal +autostart directory (most likely ~/.config/autostart/) which contains the key +Hidden=true. You'll also want to make the ibus profile scripts non-executable: + + chmod -x /etc/profile.d/ibus.{csh,sh} + +If your DE is not xdg compatible (what a pity..), you can add the following +to your shell init files (~/.profile, ~/.bash_profile, ~/.zprofile, etcetera): + + if [ -x /usr/bin/ibus-daemon ]; then + /usr/bin/ibus-daemon --xim & + fi + +============================= +environment variable settings +============================= +chmod +x /etc/profile.d/ibus.{sh,csh} will enable environment variable settings +at login, but if you have ibus-qt installed, you may also prefer to run +qtconfig and set "Default Input Method" to ibus. + diff --git a/misc/ibus/doinst.sh b/misc/ibus/doinst.sh new file mode 100644 index 0000000000..b292e6286c --- /dev/null +++ b/misc/ibus/doinst.sh @@ -0,0 +1,43 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +GCONF_CONFIG_SOURCE="xml::etc/gconf/gconf.xml.defaults" \ +chroot . gconftool-2 --makefile-install-rule \ + /etc/gconf/schemas/ibus.schemas 1>/dev/null + +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi + +# Prepare the new configuration files +for file in etc/profile.d/ibus.sh.new etc/profile.d/ibus.csh.new ; do + if [ -e $(dirname $file)/$(basename $file .new) -a -x $(dirname $file)/$(basename $file .new) ]; then + chmod 0755 $file + else + chmod 0644 $file + fi + config $file +done + +# Run gtk-query-immodules so that "ibus" will appear under Input Method +# when you right- click your mouse in a text box. +if [ -x usr/bin/update-gtk-immodules ]; then + chroot . /usr/bin/update-gtk-immodules --verbose 1>/dev/null +fi + diff --git a/misc/ibus/ibus.SlackBuild b/misc/ibus/ibus.SlackBuild new file mode 100644 index 0000000000..ebb53ba1bf --- /dev/null +++ b/misc/ibus/ibus.SlackBuild @@ -0,0 +1,105 @@ +#!/bin/sh + +# Slackware build script for ibus + +# Copyright 2006,2007,2008 Eric Hameleers, Eindhoven, NL +# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN USA +# All rights reserved. +# +# Permission to use, copy, modify, and distribute this software for +# any purpose with or without fee is hereby granted, provided that +# the above copyright notice and this permission notice appear in all +# copies. +# +# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +# Modified by Grissiom <chaos.proton@gmail.com> to build ibus +# Feedback (especially improvements) is encouraged! :-) + +PRGNAM=ibus +VERSION=${VERSION:-1.2.99.20100202} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf ${PRGNAM}-${VERSION} +tar xvf $CWD/${PRGNAM}-${VERSION}.tar.gz +cd ${PRGNAM}-${VERSION} +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --with-html-dir=/usr/share/gtk-doc/html \ + --build=$ARCH-slackware-linux + +make +make DESTDIR=$PKG install + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +# Add profile scripts that set up the environment: +mkdir -p $PKG/etc/profile.d +cat $CWD/profile.d/ibus.csh > $PKG/etc/profile.d/ibus.csh.new +cat $CWD/profile.d/ibus.sh > $PKG/etc/profile.d/ibus.sh.new +chmod 755 $PKG/etc/profile.d/* + +# Remove etc/xdg/autostart/ibus.desktop, or ibus will always be started in X... +#rm $PKG/etc/xdg/autostart/ibus.desktop ; rm -rf $PKG/etc/xdg + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + ABOUT-NLS AUTHORS COPYING ChangeLog NEWS README \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE +( cd $PKG/usr/doc/$PRGNAM-$VERSION; ln -s ../../share/gtk-doc/html/ibus html ) + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -p -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/misc/ibus/ibus.info b/misc/ibus/ibus.info new file mode 100644 index 0000000000..c8242d5c59 --- /dev/null +++ b/misc/ibus/ibus.info @@ -0,0 +1,10 @@ +PRGNAM="ibus" +VERSION="1.2.99.20100202" +HOMEPAGE="http://code.google.com/p/ibus/" +DOWNLOAD="http://ibus.googlecode.com/files/ibus-1.2.99.20100202.tar.gz" +MD5SUM="f383ef5f1e0454a258bca305974a9c83" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Grissiom" +EMAIL="chaos.proton@gmail.com" +APPROVED="dsomero" diff --git a/misc/ibus/profile.d/ibus.csh b/misc/ibus/profile.d/ibus.csh new file mode 100644 index 0000000000..21eb33453e --- /dev/null +++ b/misc/ibus/profile.d/ibus.csh @@ -0,0 +1,17 @@ +#!/bin/csh + +# ibus - Intelligent Input Bus for Linux / Unix OS. This is used to support the +# entering of text in non-US-English languages. + +[ -x /usr/bin/ibus-daemon ] +if ($status == 0) then + # Enable legacy X applications to use ibus: + setenv XMODIFIERS="@im=ibus" + # Enable Qt/KDE applications to use ibus. + setenv QT_IM_MODULE="ibus" + # Enable GTK applications to use ibus: + setenv GTK_IM_MODULE="ibus" + # Make ibus start automatically if the "magic key" Ctrl-Space is pressed: + setenv XIM_PROGRAM="/usr/bin/ibus-daemon -xdrt" +endif + diff --git a/misc/ibus/profile.d/ibus.sh b/misc/ibus/profile.d/ibus.sh new file mode 100644 index 0000000000..86fd88d8d7 --- /dev/null +++ b/misc/ibus/profile.d/ibus.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +# ibus - Intelligent Input Bus for Linux / Unix OS. This is used to support the +# entering of text in non-US-English languages. + +if [ -x /usr/bin/ibus-daemon ]; then + # Enable legacy X applications to use ibus: + export XMODIFIERS="@im=ibus" + # Enable Qt/KDE applications to use ibus. + export QT_IM_MODULE="ibus" + # Enable GTK applications to use ibus: + export GTK_IM_MODULE="ibus" + # Make ibus start automatically if the "magic key" Ctrl-Space is pressed: + export XIM_PROGRAM="/usr/bin/ibus-daemon -xdrt" +fi + diff --git a/misc/ibus/slack-desc b/misc/ibus/slack-desc new file mode 100644 index 0000000000..36a1fe394f --- /dev/null +++ b/misc/ibus/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' on +# the right side marks the last column you can put a character in. You must make +# exactly 11 lines for the formatting to be correct. It's also customary to +# leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +ibus: IBus (Intelligent Input Bus for Linux) +ibus: +ibus: IBus is an Intelligent Input Bus. It is a new input framework for +ibus: Linux. It provides a full featured and user friendly input method +ibus: user interface. It also may help developers create an input method +ibus: easily. +ibus: +ibus: Homepage: http://code.google.com/p/ibus/ +ibus: +ibus: +ibus: |