tc-el-install.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #! /bin/sh -e
  2. # /usr/lib/emacsen-common/packages/install/t-code
  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. # Install-info-altdir does not actually exist.
  21. # Maybe somebody will write it.
  22. #if test -x /usr/sbin/install-info-altdir; then
  23. # echo install/${PACKAGE}: install Info links for ${FLAVOR}
  24. # install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz
  25. #fi
  26. install -m 755 -d ${ELCDIR}
  27. install -m 444 ${DATADIR}/tc-bitmap-8x16 ${ELCDIR}
  28. cd ${ELDIR}
  29. FILES=`echo *.el`
  30. cp ${FILES} ${ELCDIR}
  31. cd ${ELCDIR}
  32. cat << EOF > make-elc.el
  33. (setq load-path (cons "." load-path) byte-compile-warnings nil)
  34. (load "tc-sysdep.el")
  35. (and (fboundp 'set-language-environment)
  36. (set-language-environment "Japanese"))
  37. EOF
  38. ${FLAVOR} ${FLAGS} ${FILES}
  39. rm -f *.el make-elc.el
  40. exit 0