diff options
author | Jun SAITO <jsaito@xopowo.info> | 2013-05-31 14:54:03 -0300 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2013-06-04 00:11:09 -0500 |
commit | 236b8480bc93c9e32827b698e19e396336eb9bba (patch) | |
tree | 36b373e16dcc50e4b0554451db6dbd24468ac866 | |
parent | 7b251fe9df3708c1590b031af0daff2378c95dd3 (diff) | |
download | slackbuilds-236b8480bc93c9e32827b698e19e396336eb9bba.tar.gz |
misc/ibus-skk: Added (SKK engine for IBus)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
-rw-r--r-- | misc/ibus-skk/README | 6 | ||||
-rw-r--r-- | misc/ibus-skk/doinst.sh | 58 | ||||
-rw-r--r-- | misc/ibus-skk/fix_initial_input_mode_liststore.patch | 26 | ||||
-rw-r--r-- | misc/ibus-skk/ibus-skk.SlackBuild | 111 | ||||
-rw-r--r-- | misc/ibus-skk/ibus-skk.info | 10 | ||||
-rw-r--r-- | misc/ibus-skk/profile.d/ibus-skk.csh | 4 | ||||
-rw-r--r-- | misc/ibus-skk/profile.d/ibus-skk.sh | 4 | ||||
-rw-r--r-- | misc/ibus-skk/slack-desc | 19 |
8 files changed, 238 insertions, 0 deletions
diff --git a/misc/ibus-skk/README b/misc/ibus-skk/README new file mode 100644 index 0000000000..44ea54acb6 --- /dev/null +++ b/misc/ibus-skk/README @@ -0,0 +1,6 @@ +ibus-skk is an implementation of the SKK (Simple Kana-Kanji) input +method on the IBus input method framework. + +To learn about SKK, see: + http://openlab.jp/skk/ + https://secure.wikimedia.org/wikipedia/ja/wiki/SKK diff --git a/misc/ibus-skk/doinst.sh b/misc/ibus-skk/doinst.sh new file mode 100644 index 0000000000..8da5350e14 --- /dev/null +++ b/misc/ibus-skk/doinst.sh @@ -0,0 +1,58 @@ +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... +} + +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} + +schema_install() { + SCHEMA="$1" + GCONF_CONFIG_SOURCE="xml::etc/gconf/gconf.xml.defaults" \ + chroot . gconftool-2 --makefile-install-rule \ + /etc/gconf/schemas/$SCHEMA \ + 1>/dev/null +} + +preserve_perms etc/profile.d/ibus-skk.sh.new +preserve_perms etc/profile.d/ibus-skk.csh.new + +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -x /usr/bin/update-mime-database ]; then + /usr/bin/update-mime-database usr/share/mime >/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 + +if [ -e usr/share/glib-2.0/schemas ]; then + if [ -x /usr/bin/glib-compile-schemas ]; then + /usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas >/dev/null 2>&1 + fi +fi + +# If needed -- be sure to sed @LIBDIR@ inside the build script +chroot . /usr/bin/gio-querymodules @LIBDIR@/gio/modules/ 1> /dev/null 2> /dev/null + diff --git a/misc/ibus-skk/fix_initial_input_mode_liststore.patch b/misc/ibus-skk/fix_initial_input_mode_liststore.patch new file mode 100644 index 0000000000..9221263274 --- /dev/null +++ b/misc/ibus-skk/fix_initial_input_mode_liststore.patch @@ -0,0 +1,26 @@ +From 6cecc98887639eba877fa7ae9f18022521f26189 Mon Sep 17 00:00:00 2001 +From: Daiki Ueno <ueno@unixuser.org> +Date: Tue, 20 Sep 2011 10:24:30 +0900 +Subject: [PATCH] Fix initial_input_mode_liststore to have correct index values + (Issue#37). + +--- + setup/ibus-skk-preferences.ui.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup/ibus-skk-preferences.ui.in b/setup/ibus-skk-preferences.ui.in +index 25ab057..ecf4c01 100644 +--- a/setup/ibus-skk-preferences.ui.in ++++ b/setup/ibus-skk-preferences.ui.in +@@ -766,7 +766,7 @@ + <data> + <row> + <col id="0" translatable="yes">Hiragana</col> +- <col id="1">1</col> ++ <col id="1">0</col> + </row> + <row> + <col id="0" translatable="yes">Latin</col> +-- +1.8.1.6 + diff --git a/misc/ibus-skk/ibus-skk.SlackBuild b/misc/ibus-skk/ibus-skk.SlackBuild new file mode 100644 index 0000000000..4a5986be9f --- /dev/null +++ b/misc/ibus-skk/ibus-skk.SlackBuild @@ -0,0 +1,111 @@ +#!/bin/sh + +# Slackware build script for ibus-skk + +# Copyright (C) 2013, Jun SAITO <jsaito@xopowo.info> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS 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 AUTHOR 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. + +PRGNAM=ibus-skk +VERSION=${VERSION:-1.3.9} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +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" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$PRGNAM-$VERSION +TARBALL=$PRGNAM-$VERSION.tar.gz +if [ -f $CWD/$TARBALL ]; then + tar xvf $CWD/$TARBALL +else + tar xvf $CWD/$PRGNAM-$TARBALL +fi +cd $PRGNAM-$PRGNAM-$VERSION +chown -R root:root . + +./autogen.sh + +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 \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux + +# 1.3.9 fails display configure screen. +# Apply patch for this issue. +patch -p1 < $CWD/fix_initial_input_mode_liststore.patch + +make +make install DESTDIR=$PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +mkdir -p $PKG/etc/profile.d +cat $CWD/profile.d/ibus-skk.sh > $PKG/etc/profile.d/ibus-skk.sh.new +cat $CWD/profile.d/ibus-skk.csh > $PKG/etc/profile.d/ibus-skk.csh.new +chmod 0755 $PKG/etc/profile.d/* + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/misc/ibus-skk/ibus-skk.info b/misc/ibus-skk/ibus-skk.info new file mode 100644 index 0000000000..85f92c73dd --- /dev/null +++ b/misc/ibus-skk/ibus-skk.info @@ -0,0 +1,10 @@ +PRGNAM="ibus-skk" +VERSION="1.3.9" +HOMEPAGE="https://github.com/ueno/ibus-skk" +DOWNLOAD="https://github.com/ueno/ibus-skk/archive/ibus-skk-1.3.9.tar.gz" +MD5SUM="7f9d74c65546c7f34f050fd44a5a21ba" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="ibus libskk" +MAINTAINER="Jun SAITO" +EMAIL="jsaito@xopowo.info" diff --git a/misc/ibus-skk/profile.d/ibus-skk.csh b/misc/ibus-skk/profile.d/ibus-skk.csh new file mode 100644 index 0000000000..99568a1184 --- /dev/null +++ b/misc/ibus-skk/profile.d/ibus-skk.csh @@ -0,0 +1,4 @@ +[ -d /usr/share/ibus-skk ] +if ($status == 0) then + setenv IBUS_SKK_PKGDATADIR /usr/share/ibus-skk +endif diff --git a/misc/ibus-skk/profile.d/ibus-skk.sh b/misc/ibus-skk/profile.d/ibus-skk.sh new file mode 100644 index 0000000000..b7f0bf36ee --- /dev/null +++ b/misc/ibus-skk/profile.d/ibus-skk.sh @@ -0,0 +1,4 @@ +if [ -d /usr/share/ibus-skk ]; then + export IBUS_SKK_PKGDATADIR=/usr/share/ibus-skk +fi + diff --git a/misc/ibus-skk/slack-desc b/misc/ibus-skk/slack-desc new file mode 100644 index 0000000000..3bdf6a7ebd --- /dev/null +++ b/misc/ibus-skk/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 ':' except on otherwise blank lines. + + |----handy-ruler-------------------------------------------------------| +ibus-skk: ibus-skk (SKK engine for IBus) +ibus-skk: +ibus-skk: ibus-skk is an implementation of the SKK (Simple Kana-Kanji) +ibus-skk: input method on the IBus input method framework. To learn about +ibus-skk: SKK, see: +ibus-skk: http://openlab.jp/skk/ +ibus-skk: https://secure.wikimedia.org/wikipedia/ja/wiki/SKK +ibus-skk: +ibus-skk: +ibus-skk: +ibus-skk: |