migemo-install.sh 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #! /bin/sh -e
  2. # /usr/lib/emacsen-common/packages/install/foo
  3. # [ This particular script hasn't been tested, so be careful. ]
  4. set -e
  5. FLAVOR=$1
  6. PACKAGE="migemo"
  7. if [ "X${FLAVOR}" = "X" ]; then
  8. echo Need argument to determin FLAVOR of emacs;
  9. exit 1
  10. fi
  11. if [ "X${PACKAGE}" = "X" ]; then
  12. echo Internal error: need package name;
  13. exit 1;
  14. fi
  15. ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
  16. ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
  17. STARTDIR=/etc/${FLAVOR}/site-start.d
  18. STARTFILE="${PACKAGE}-init.el";
  19. SITELISP=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
  20. EFLAGS="-batch -q"
  21. COMPILE="-batch -q -f batch-byte-compile"
  22. case "${FLAVOR}" in
  23. emacs|emacs19)
  24. ;;
  25. *)
  26. echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
  27. # if [ "${FLAVOR}" = "mule2" ]; then
  28. # if [ ! -d /usr/share/emacs/site-lisp/clime ]; then
  29. # echo " exited."
  30. # echo "W: Please install \`clime' package for mule2." ;
  31. # exit 0;
  32. # fi
  33. # else
  34. # if [ ! -d /usr/share/emacs/site-lisp/flim ]; then
  35. # echo " exited."
  36. # echo "W: Please install \`flim' package for ${FLAVOR}." ;
  37. # exit 0;
  38. # fi
  39. # fi
  40. rm -rf ${ELCDIR}
  41. install -m 755 -d ${ELCDIR}
  42. # Byte compile
  43. (cd ${ELDIR}
  44. # make EMACS=${FLAVOR} .el.elc > ${ELCDIR}/CompilationLog 2>&1
  45. ### stop running aclocal: 0.40-0vl6
  46. touch aclocal.m4 Makefile.in configure
  47. ./configure --srcdir=. --with-emacs=${FLAVOR} \
  48. --with-lispdir=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} \
  49. >> ${ELCDIR}/CompilationLog 2>&1
  50. make install-lispLISP >> ${ELCDIR}/CompilationLog 2>&1
  51. make clean-lisp >> ${ELCDIR}/CompilationLog 2>&1
  52. rm -f aclocal.m4 config.cache config.log
  53. rm -f ${ELCDIR}/*.el
  54. )
  55. gzip -9 ${ELCDIR}/CompilationLog
  56. install -p -m644 ${ELDIR}/vine-default-${PACKAGE}.el ${ELCDIR}
  57. install -p -m644 ${ELDIR}/${STARTFILE} ${STARTDIR}/90${STARTFILE}
  58. echo " done."
  59. ;;
  60. esac
  61. exit 0;