Browse Source

ibus-el 0.1.0-1 (new)

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@1163 ec354946-7b23-47d6-9f5a-488ba84defc7
iwaim 14 years ago
parent
commit
289b53549e

+ 16 - 0
i/ibus-el/ibus-el-init.el

@@ -0,0 +1,16 @@
+;;
+;; ibus-el-init.el
+;;
+;;      for Vine Linux with emacsen-common
+;;      IWAI, Masaharu <iwai@alib.jp>
+
+(defcustom vine-default-ibus-el t
+  "A boolean for vine-default-ibus-el"
+  :type 'boolean)
+
+(add-hook 'vine-default-setup-hook
+          (lambda()
+            (if vine-default-ibus-el
+                (require 'vine-default-ibus-el))))
+
+;;; end of file

+ 35 - 0
i/ibus-el/ibus-el-install.sh

@@ -0,0 +1,35 @@
+#! /bin/sh -e
+# /usr/lib/emacsen-common/packages/install/ibus-el
+
+FLAVOR=$1
+PACKAGE=ibus-el
+
+FLAGS="${SITEFLAG} -q -batch -f batch-byte-compile"
+
+ELDIR="/usr/share/emacs/site-lisp/${PACKAGE}"
+ELCDIR="/usr/share/${FLAVOR}/site-lisp/${PACKAGE}"
+STARTDIR=/etc/${FLAVOR}/site-start.d
+STARTFILE="${PACKAGE}-init.el"
+
+SOURCES="ibus.el"
+
+case "${FLAVOR}" in
+    emacs)
+    ;;
+    *) 
+    echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
+    install -m 755 -d ${ELCDIR}
+    cd ${ELDIR}
+    cp *.el ${ELCDIR}
+    FILES="${SOURCES}"
+    cd ${ELCDIR}
+    ${FLAVOR} ${FLAGS} ${FILES} > ${ELCDIR}/CompilationLog 2>&1
+    rm -f ${SOURCES}
+    gzip -9 ${ELCDIR}/CompilationLog
+
+    ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/95${STARTFILE};
+    echo " done."
+    ;;
+esac
+
+exit 0 ;

+ 32 - 0
i/ibus-el/ibus-el-remove.sh

@@ -0,0 +1,32 @@
+#!/bin/sh -e
+# /usr/lib/emacsen-common/packages/remove/ibus-el
+
+FLAVOR=$1
+PACKAGE=ibus-el
+STARTDIR=/etc/${FLAVOR}/site-start.d
+STARTFILE="${PACKAGE}-init.el"
+
+if [ "X${FLAVOR}" = "X" ]; then
+    echo Need argument to determin FLAVOR of emacs;
+    exit 1
+fi
+
+if [ "X${PACKAGE}" = "X" ]; then
+    echo Internal error: need package name;
+    exit 1;
+fi
+
+ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+case "${FLAVOR}" in
+    emacs)
+    ;;
+    *)
+    echo -n "remove/${PACKAGE}: Handling removal of emacsen flavor ${FLAVOR} ..."
+    rm -rf ${ELCDIR}
+    rm -f ${STARTDIR}/95${STARTFILE}*
+    echo " done."
+    ;;
+esac
+
+exit 0

+ 115 - 0
i/ibus-el/ibus-el-vl.spec

@@ -0,0 +1,115 @@
+%define _noVersionedDependencies	1
+%define prereq_ge()  %(LC_ALL="C" rpm -q --queryformat 'PreReq:%%{NAME} >= %%{VERSION}' %1| grep -v "is not")
+%define	origname ibus-el
+%define origver  0.1.0
+
+Summary:      a IBus client for GNU Emacs
+Summary(ja):  GNU Emacs 用 IBus クライアント
+Name:         %{origname}
+Version:      %{origver}
+Release:      1%{?_dist_release}
+
+# http://launchpad.net/ibus.el
+Source0:      ibus-el-%{version}.tar.gz
+Source1:      %{origname}-install.sh
+Source2:      %{origname}-remove.sh
+Source3:      vine-default-%{origname}.el
+Source4:      %{origname}-init.el
+
+License:      GPLv3
+Group:        Applications/Editors/Emacs
+URL:          http://www11.atwiki.jp/s-irie/pages/21.html
+BuildRoot:    %{_tmppath}/%{name}-%{version}-root
+BuildArch:    noarch
+
+Requires:     emacsen
+PreReq:       emacsen
+%prereq_ge    emacsen-common
+Requires:     python >= 2.5
+Requires:     ibus >= 1.2
+Requires:     python-xlib
+
+Distribution: Vine Linux
+Vendor:       Project Vine
+Packager:     iwaim
+
+%description
+ibus.el is a IBus client for GNU Emacs. This program allows users
+on-the-spot style input with IBus. The input statuses are individually
+kept for each buffer, and prefix-keys such as C-x and C-c can be used
+even if IBus is active. So you can input various languages fast and
+comfortably by using it.
+
+%prep
+
+%setup -q -n %{origname}-%{origver}
+
+%build
+
+%install
+[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
+[ "%{buildroot}" != "/" ] && mkdir -p %{buildroot}
+
+mkdir -p %{buildroot}%{_datadir}/%{name}
+install -m 0755 ibus-el-agent %{buildroot}%{_datadir}/%{name}
+
+mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/packages
+mkdir -p %{buildroot}%{emacsen_pkgdir}/install
+mkdir -p %{buildroot}%{emacsen_pkgdir}/remove
+
+#
+# install el files
+#
+
+cp -p *.el %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}
+
+
+#
+# install script (bytecompile el and install elc , remove)
+#
+
+%_installemacsenscript %{origname} %{SOURCE1}
+
+%_removeemacsenscript  %{origname} %{SOURCE2}
+
+
+%clean
+[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
+
+%post
+#
+# bytecompile and install
+#
+if [ "$1" = 2 ]; then
+
+%_emacsenPackageRemove %{origname}
+
+fi
+
+%_addemacsenlist %{origname}
+
+%_emacsenPackageInstall %{origname}
+
+
+%preun
+if [ "$1" = 0 ]; then
+
+%_emacsenPackageRemove %{origname}
+
+%_removeemacsenlist %{origname}
+
+fi
+
+
+%files
+%defattr(-,root,root)
+%doc README doc/COPYING doc/ChangeLog
+%{_datadir}/emacs/site-lisp/%{origname}
+%{emacsen_pkgdir}/install/%{origname}
+%{emacsen_pkgdir}/remove/%{origname}
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/ibus-el-agent
+
+%changelog
+* Mon Jun  7 2010 IWAI, Masaharu <iwai@alib.jp> 0.1.0-1
+- first release for Vine Linux

+ 64 - 0
i/ibus-el/vine-default-ibus-el.el

@@ -0,0 +1,64 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;  -*- coding: utf-8-unix -*-
+;;  FSF Emacs 23 用 Vine Linux ibus-el 設定
+;;    IWAI, Masaharu <iwai@alib.jp>
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; ibus-el の設定
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(if (or (equal emacs-ime "ibus-el")
+        (equal emacs-ime "IBus-el"))
+     (progn
+       (require 'ibus)
+
+       ;; Turn on ibus-mode automatically loading after-vine-default-setup-hook
+       (add-hook 'after-vine-default-setup-hook 'ibus-mode-on)
+
+       ;; define ibus-el-agent path
+       (setq ibus-agent-file-name "/usr/share/ibus-el/ibus-el-agent")
+
+       ;; Use C-SPC for Set Mark command
+       (ibus-define-common-key ?\C-\s nil)
+       
+       ;; Toggle input status by Ctrl + \
+       (global-set-key "\C-\\" 'ibus-toggle)
+
+       ;; Use henkan key to enable IBus
+       (global-set-key [henkan] 'ibus-enable)
+       ;; Use muhenkan key to disable IBus
+       (global-set-key [muhenkan] 'ibus-disable)
+       ;; Enable muhenkan key only for preediting
+       (ibus-define-common-key 'muhenkan nil)
+       (ibus-define-preedit-key 'muhenkan t)
+
+       ;; Use C-/ for Undo command
+       (ibus-define-common-key ?\C-/ nil)
+
+       ;; Change cursor color depending on IBus status
+       (setq ibus-cursor-color '("red" "blue" "limegreen"))
+
+       ;; Using ibus-anthy
+       ;; To toggle half-width eisu mode by C-j, add the following to .emacs:
+       (ibus-define-common-key ?\C-j t)
+
+       ;; To use kana input method with jp106 keyboard, you can enable kana
+       ;; onbiki key as follows:
+       (setq ibus-use-kana-onbiki-key t)
+
+       ;; If you use thumb shift input method, you have to specify the
+       ;; simultaneous pressing time as:
+       (setq ibus-ibus-simultaneous-pressing-time 0.1)
+
+       ;; Using ibus-chewing
+       ;; Please set input style to "in application window" in ibus-chewing's
+       ;; configuration dialog.
+       )
+  )
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(provide 'vine-default-ibus-el)
+
+;; Local Variables:
+;; mode: emacs-lisp
+;; End: