auctex-install.sh 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #! /bin/sh -e
  2. # /usr/lib/emacsen-common/packages/install/auctex
  3. # [ This particular script hasn't been tested, so be careful. ]
  4. set -e
  5. FLAVOR=$1
  6. PACKAGE="auctex"
  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. ## <merged from auctex-11.85/Makefile>
  21. ELCC="${FLAVOR} -batch -q -no-site-file -no-init-file -l lpath.el"
  22. MULESRC="tex-jp.el"
  23. AUCSRC="tex.el tex-buf.el tex-style.el latex.el tex-info.el \
  24. texmathp.el multi-prompt.el tex-mik.el font-latex.el tex-font.el \
  25. context.el context-en.el context-nl.el tex-fold.el \
  26. toolbar-x.el tex-bar.el bib-cite.el tex-fptex.el"
  27. STYLESRC="style/prosper.el \
  28. style/slides.el style/foils.el style/amstex.el \
  29. style/article.el style/book.el style/letter.el \
  30. style/report.el style/amsart.el style/amsbook.el \
  31. style/epsf.el style/psfig.el style/latexinfo.el \
  32. style/dutch.el style/german.el style/dk.el \
  33. style/j-article.el style/j-book.el style/j-report.el \
  34. style/jarticle.el style/jbook.el style/jreport.el \
  35. style/dinbrief.el style/virtex.el style/plfonts.el \
  36. style/plhb.el style/harvard.el style/swedish.el \
  37. style/danish.el style/slovak.el style/czech.el \
  38. style/amsmath.el style/amstext.el style/amsbsy.el \
  39. style/amsopn.el style/amsthm.el style/natbib.el \
  40. style/index.el style/makeidx.el style/multind.el \
  41. style/varioref.el style/fancyref.el style/mdwlist.el \
  42. style/ngerman.el style/graphicx.el style/graphics.el \
  43. style/verbatim.el style/scrbase.el style/scrartcl.el \
  44. style/scrbook.el style/scrreprt.el style/scrlttr2.el \
  45. style/scrpage2.el style/captcont.el style/subfigure.el \
  46. style/paralist.el style/booktabs.el style/emp.el \
  47. style/jura.el style/alphanum.el style/beamer.el \
  48. style/alltt.el style/italian.el style/doc.el \
  49. style/ltxdoc.el style/ltx-base.el style/units.el \
  50. style/nicefrac.el style/url.el style/listings.el \
  51. style/jurabib.el style/csquotes.el style/jsarticle.el \
  52. style/jsbook.el style/babel.el style/dk-bib.el \
  53. style/inputenc.el style/frenchb.el style/francais.el \
  54. style/MinionPro.el style/pdfsync.el style/polish.el \
  55. style/polski.el style/icelandic.el style/comment.el \
  56. style/flashcards.el style/pstricks.el style/nomencl.el"
  57. ## </merged from auctex-11.85/Makefile>
  58. case "${FLAVOR}" in
  59. *)
  60. echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
  61. rm -rf ${ELCDIR}
  62. install -m 755 -d ${ELCDIR}
  63. # Byte compile
  64. (
  65. cd ${ELDIR}
  66. install -p -m 0644 *.el ${ELCDIR}
  67. cp -ra style images ${ELCDIR}/
  68. cd ${ELCDIR}
  69. ${ELCC} -f batch-byte-compile \
  70. ${MULESRC} ${AUCSRC} ${STYLESRC} > CompilationLog 2>&1
  71. rm -f lpath.el auto-loads.el tex-wizard.el ${PACKAGE}-init.el
  72. )
  73. gzip -9 ${ELCDIR}/CompilationLog
  74. if [ ! -d ${STARTDIR} ]; then
  75. install -m 755 -d ${STARTDIR}
  76. fi
  77. ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/50${STARTFILE};
  78. echo " done."
  79. ;;
  80. esac
  81. exit 0;