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