SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "scim"

PACKAGE="scim"
VERSION="1.4.9"
CATEGORY="utilities"
SHORT_DESC="Smart Common Input Method (SCIM)."
MAINTAINER="rocky@slitaz.org"
DEPENDS="gtk+ gcc-lib-base"
BUILD_DEPENDS="gtk+-dev"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="http://www.scim-im.org/"
WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
CONFIG_FILES="/etc/scim/config /etc/scim/global"

# Rules to configure and make the package.
compile_rules()
{
    cd $src
    while read file; do
        [ -f done.$file ] && continue
        echo "Apply $file..."
        patch -p1 < $stuff/$file || return 1
        touch done.$file
    done <<EOT
scim-glibc-2.10.patch
EOT
    ./configure --prefix=/usr \
        --sysconfdir=/etc \
        --with-x \
        --with-gtk-im-module-dir=$(ls -d /usr/lib/gtk-2*/2*/immodules/) \
        --mandir=/usr/share/man \
        --infodir=/usr/share/info \
        $CONFIGURE_ARGS &&
    make $MAKEFLAGS &&
    make DESTDIR=$PWD/_pkg install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr/share/pixmaps
    cp -a $_pkg/etc $fs/
    cp -a $_pkg/usr/bin $fs/usr
    cp -a $_pkg/usr/lib $fs/usr
    cp -a $_pkg/usr/share/scim $fs/usr/share
    cp $_pkg/usr/share/pixmaps/scim-setup.png $fs/usr/share/pixmaps
    find $fs/usr/lib -name '*.la' -exec rm {} \;
    find $fs/usr/lib -name '*.a' -exec rm {} \;
    rm -rf $fs/usr/lib/pkgconfig
    chmod +x $fs/usr/bin/scim-setup
}

post_install()
{
    echo "Processing post-install commands..."
    echo -n "Updating gtk.immodules... "
    chroot "$1/" /usr/bin/gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules
    echo "done."
cat <<EOT
In order to start scim and use chinese after boot time,
add the following code to your autostart.sh(openbox):
------------
export XMODIFIERS=@im=SCIM
export XIM="scim"
export XINPUT="xim"
export XIM_PROGRAM="scim -d"
export GTK_IM_MODULE=scim
export QT_IM_MODULE=scim
scim -d &
------------
EOT
}

post_remove()
{
    /usr/bin/gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules
}
3382 packages and 430813 files in stable database (Mon Mar 4 17:53:49 2019)