Browse Source

tc-el 2.3.1-2

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@1694 ec354946-7b23-47d6-9f5a-488ba84defc7
iwaim 12 years ago
parent
commit
95b2621f67
5 changed files with 85 additions and 20 deletions
  1. 16 0
      t/tc-el/tc-el-init.el
  2. 15 3
      t/tc-el/tc-el-install.sh
  3. 8 4
      t/tc-el/tc-el-remove.sh
  4. 24 13
      t/tc-el/tc-el-vl.spec
  5. 22 0
      t/tc-el/vine-default-tc-el.el

+ 16 - 0
t/tc-el/tc-el-init.el

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

+ 15 - 3
t/tc-el/tc-el-install.sh

@@ -1,5 +1,5 @@
 #! /bin/sh -e
-# /usr/lib/emacsen-common/packages/install/t-code
+# /usr/lib/emacsen-common/packages/install/tc-el
 
 # Written by Jim Van Zandt <jrv@vanzandt.mv.com>, borrowing heavily
 # from the install scripts for gettext by Santiago Vila
@@ -23,6 +23,11 @@ FLAGS="${SITEFLAG} -q -batch -l make-elc.el -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"
+
+COMMON_EL_FILES="tc-setup.el tc.el tc-help.el tc-complete.el tc-jiscode.el tc-bushu.el tc-mazegaki.el tc-util.el tc-tbl.el tutc-tbl.el eelll.el tc-inst.el tc-stat.el tc-ja-alnum.el"
+EL_FILES=tc-is18.el
 
 # Install-info-altdir does not actually exist. 
 # Maybe somebody will write it.
@@ -31,11 +36,14 @@ ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
 #    install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz
 #fi
 
+echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
 install -m 755 -d ${ELCDIR}
 install -m 444 ${DATADIR}/tc-bitmap-8x16 ${ELCDIR}
 cd ${ELDIR}
 FILES=`echo *.el`
 cp ${FILES} ${ELCDIR}
+ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/95${STARTFILE};
+
 cd ${ELCDIR}
 
 cat << EOF > make-elc.el
@@ -44,7 +52,11 @@ cat << EOF > make-elc.el
 (and (fboundp 'set-language-environment)
      (set-language-environment "Japanese"))
 EOF
-${FLAVOR} ${FLAGS} ${FILES}
-rm -f *.el make-elc.el
+${FLAVOR} ${FLAGS} ${COMMON_EL_FILES} ${EL_FILES} > ${ELCDIR}/CompilationLog 2>&1
+gzip -9 ${ELCDIR}/CompilationLog
+
+rm -f ${COMMON_EL_FILES} ${EL_FILES} make-elc.el
+echo " done."
 
 exit 0
+

+ 8 - 4
t/tc-el/tc-el-remove.sh

@@ -1,15 +1,19 @@
 #!/bin/sh -e
-# /usr/lib/emacsen-common/packages/remove/t-code
+# /usr/lib/emacsen-common/packages/remove/tc-el
 
 FLAVOR=$1
 PACKAGE=tc-el
+ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+STARTDIR=/etc/${FLAVOR}/site-start.d
+STARTFILE="${PACKAGE}-init.el"
 
 if [ ${FLAVOR} != emacs ]; then
 #    if test -x /usr/sbin/install-info-altdir; then
 #        echo remove/${PACKAGE}: removing Info links for ${FLAVOR}
 #        install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/t-code.info.gz
 #    fi
-
-    echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
-    rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+    echo -n "remove/${PACKAGE}: Handling removal of emacsen flavor ${FLAVOR} ..."
+    rm -rf ${ELCDIR}
+    rm -f ${STARTDIR}/95${STARTFILE}*
+    echo " done."
 fi

+ 24 - 13
t/tc-el/tc-el-vl.spec

@@ -1,12 +1,14 @@
-Summary: Yet another Japanese input method for Emacsen
+Summary: a Japanese input method with T-Code on Emacsen
 Name: tc-el
 Version: 2.3.1
-Release: 1%{?_dist_release}
-License: GPL
+Release: 2%{?_dist_release}
+License: GPLv2+
 Group: Applications/Editors/Emacs
 Source0: http://openlab.jp/tcode/resources/soft/tc-%{version}.tar.gz
 Source1: %{name}-install.sh
 Source2: %{name}-remove.sh
+Source3: vine-default-%{name}.el
+Source4: %{name}-init.el
 Patch0: tc-2.3.1-shebang.patch
 Patch1: tc-2.3.1-datadir.patch
 URL: http://openlab.jp/tcode/tc2/index.html
@@ -32,7 +34,7 @@ cd ..
 %build
 cd tc-%{version}
 
-%configure --with-lispdir=%{_datadir}/emacs/site-lisp/tc-el
+%configure --with-lispdir=%{_datadir}/emacs/site-lisp/%{name}
 make -C bushu-util
 make -C doc
 make -C etc
@@ -48,9 +50,9 @@ cd tc-%{version}
 [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
 [ "${RPM_BUILD_ROOT}" != "/" ] && mkdir -p ${RPM_BUILD_ROOT}
 
-mkdir -p ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name}
-mkdir -p ${RPM_BUILD_ROOT}/%{_prefix}/lib/emacsen-common/packages/install
-mkdir -p ${RPM_BUILD_ROOT}/%{_prefix}/lib/emacsen-common/packages/remove
+mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp/%{name}
+mkdir -p ${RPM_BUILD_ROOT}%{emacsen_pkgdir}/install
+mkdir -p ${RPM_BUILD_ROOT}%{emacsen_pkgdir}/remove
 
 make -C bushu-util DESTDIR=${RPM_BUILD_ROOT} install
 make -C doc        DESTDIR=${RPM_BUILD_ROOT} install
@@ -60,7 +62,9 @@ make -C mazegaki   DESTDIR=${RPM_BUILD_ROOT} install
 make -C skkinput3  DESTDIR=${RPM_BUILD_ROOT} install
 
 (cd lisp && \
- install -m 644 *.el ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name})
+ install -m 644 *.el ${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp/%{name})
+
+cp -p %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/emacs/site-lisp/%{name}
 
 rm -f $RPM_BUILD_ROOT%{_bindir}/tcinput
 
@@ -100,11 +104,9 @@ fi
 %files
 %defattr(-, root, root)
 %{_datadir}/tc
-%{_infodir}/*.info.gz
-#%{_libdir}/emacsen-common/packages/install/%{name}
-#%{_libdir}/emacsen-common/packages/remove/%{name}
-%{_prefix}/lib/emacsen-common/packages/install/%{name}
-%{_prefix}/lib/emacsen-common/packages/remove/%{name}
+%{_infodir}/*.info*
+%{emacsen_pkgdir}/install/%{name}
+%{emacsen_pkgdir}/remove/%{name}
 %{_datadir}/emacs/site-lisp/%{name}/
 %doc tc-%{version}/AUTHORS
 %doc tc-%{version}/COPYING
@@ -114,6 +116,15 @@ fi
 %doc tc-%{version}/skkinput3/tcinput
 
 %changelog
+* Sat Aug 28 2010 IWAI, Masaharu <iwai@alib.jp> 2.3.1-2
+- apply vine-default
+ - add vine-default-tc-el.el (Source3)
+ - add tc-el-init.el (Source4)
+ - update tc-el-{install,remove}.sh
+- sync upstream: byte compiling target el files
+- update Summary and License
+- using emacsen_pkgdir rpm macro
+
 * Mon Aug 18 2008 Shu KONNO <owa@bg.wakwak.com> 2.3.1-1vl5
 - applied new versioning policy
 - fixed path of emacsen-common

+ 22 - 0
t/tc-el/vine-default-tc-el.el

@@ -0,0 +1,22 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;  -*- coding: utf-8-unix -*-
+;;  FSF Emacs 23 用 Vine Linux tc-el 設定
+;;    IWAI, Masaharu <iwai@alib.jp>
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; tc-el の設定
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(if (or (equal emacs-ime "tc2")
+        (equal emacs-ime "tc-el"))
+     (progn
+       (setq tcode-use-as-default-input-method t)
+       (require 'tc-setup)
+       ))
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(provide 'vine-default-tc-el)
+
+;; Local Variables:
+;; mode: emacs-lisp
+;; End: