Browse Source

uim 1.6.0-1: add files for emacs lisp

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@1719 ec354946-7b23-47d6-9f5a-488ba84defc7
iwaim 13 years ago
parent
commit
81c6e300a6
2 changed files with 66 additions and 0 deletions
  1. 37 0
      u/uim/uim-el-install.sh
  2. 29 0
      u/uim/uim-el-remove.sh

+ 37 - 0
u/uim/uim-el-install.sh

@@ -0,0 +1,37 @@
+#! /bin/sh -e
+# /usr/lib/emacsen-common/packages/install/uim-el
+
+FLAVOR=$1
+PACKAGE=uim-el
+
+FLAGS="${SITEFLAG} -q -batch -f batch-byte-compile"
+
+ELDIR="/usr/share/emacs/site-lisp/${PACKAGE}"
+ELCDIR="/usr/share/${FLAVOR}/site-lisp/${PACKAGE}"
+
+
+ELISP_FILES="*.el"
+BYTECOMPILE_FILES="uim.el"
+SOURCES=${ELISP_FILES}
+
+case "${FLAVOR}" in
+    emacs)
+    ;;
+
+    *)
+    install -m 755 -d ${ELCDIR}
+    cd ${ELDIR}
+    cp ${ELISP_FILES} ${ELCDIR}
+    cd ${ELCDIR}
+    ${FLAVOR} ${FLAGS} ${BYTECOMPILE_FILES} > ${ELCDIR}/CompilationLog 2>&1
+    rm -f ${BYTECOMPILE_FILES}
+    gzip -9 ${ELCDIR}/CompilationLog
+    echo " done."
+    ;;
+
+    *)
+    ;;
+
+esac
+
+exit 0 ;

+ 29 - 0
u/uim/uim-el-remove.sh

@@ -0,0 +1,29 @@
+#!/bin/sh -e
+# /usr/lib/emacsen-common/packages/remove/uim-el
+
+FLAVOR=$1
+PACKAGE=uim-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}
+    echo " done."
+    ;;
+esac
+
+exit 0