yatex-install.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #!/bin/sh -e
  2. # /usr/lib/emacsen-common/packages/install/yatex
  3. # [ This particular script hasn't been tested, so be careful. ]
  4. set -e
  5. FLAVOR=$1
  6. PACKAGE="yatex"
  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
  20. case "${FLAVOR}" in
  21. *)
  22. echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
  23. rm -rf ${ELCDIR}
  24. install -m 755 -d ${ELCDIR}
  25. # Byte compile
  26. (
  27. cd ${ELDIR}
  28. make EMACS=${FLAVOR} EMACSDIR=/usr/share/${FLAVOR} \
  29. bytecompile-nw > ${ELCDIR}/CompilationLog 2>&1
  30. install -v -m 644 *.el *.elc ${ELCDIR} \
  31. >> ${ELCDIR}/CompilationLog 2>&1
  32. make clean >> ${ELCDIR}/CompilationLog 2>&1
  33. cd ${ELCDIR}
  34. rm -f ${PACKAGE}-init.{el,elc}
  35. rm -f vine-default-${PACKAGE}.elc vine-default-yahtml.elc
  36. )
  37. gzip -9 ${ELCDIR}/CompilationLog
  38. if [ ! -d ${STARTDIR} ]; then
  39. install -m 755 -d ${STARTDIR}
  40. fi
  41. ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/50${STARTFILE};
  42. echo " done."
  43. ;;
  44. esac
  45. exit 0;