tc-el-install.sh 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #! /bin/sh -e
  2. # /usr/lib/emacsen-common/packages/install/tc-el
  3. # Written by Jim Van Zandt <jrv@vanzandt.mv.com>, borrowing heavily
  4. # from the install scripts for gettext by Santiago Vila
  5. # <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
  6. FLAVOR=$1
  7. PACKAGE=tc-el
  8. DATADIR=/usr/share/tc
  9. if [ ${FLAVOR} = emacs ]; then exit 0; fi
  10. echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
  11. FLAVORTEST=`echo $FLAVOR | cut -c-6`
  12. if [ ${FLAVORTEST} = xemacs ] ; then
  13. SITEFLAG="-no-site-file"
  14. else
  15. SITEFLAG="--no-site-file"
  16. fi
  17. FLAGS="${SITEFLAG} -q -batch -l make-elc.el -f batch-byte-compile"
  18. ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
  19. ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
  20. STARTDIR=/etc/${FLAVOR}/site-start.d
  21. STARTFILE="${PACKAGE}-init.el"
  22. 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"
  23. EL_FILES=tc-is18.el
  24. # Install-info-altdir does not actually exist.
  25. # Maybe somebody will write it.
  26. #if test -x /usr/sbin/install-info-altdir; then
  27. # echo install/${PACKAGE}: install Info links for ${FLAVOR}
  28. # install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz
  29. #fi
  30. echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
  31. install -m 755 -d ${ELCDIR}
  32. install -m 444 ${DATADIR}/tc-bitmap-8x16 ${ELCDIR}
  33. cd ${ELDIR}
  34. FILES=`echo *.el`
  35. cp ${FILES} ${ELCDIR}
  36. ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/95${STARTFILE};
  37. cd ${ELCDIR}
  38. cat << EOF > make-elc.el
  39. (setq load-path (cons "." load-path) byte-compile-warnings nil)
  40. (load "tc-sysdep.el")
  41. (and (fboundp 'set-language-environment)
  42. (set-language-environment "Japanese"))
  43. EOF
  44. ${FLAVOR} ${FLAGS} ${COMMON_EL_FILES} ${EL_FILES} > ${ELCDIR}/CompilationLog 2>&1
  45. gzip -9 ${ELCDIR}/CompilationLog
  46. rm -f ${COMMON_EL_FILES} ${EL_FILES} make-elc.el
  47. echo " done."
  48. exit 0