[1692] | 1 | #! /bin/sh -e |
---|
[1694] | 2 | # /usr/lib/emacsen-common/packages/install/tc-el |
---|
[1692] | 3 | |
---|
| 4 | # Written by Jim Van Zandt <jrv@vanzandt.mv.com>, borrowing heavily |
---|
| 5 | # from the install scripts for gettext by Santiago Vila |
---|
| 6 | # <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>. |
---|
| 7 | |
---|
| 8 | FLAVOR=$1 |
---|
| 9 | PACKAGE=tc-el |
---|
| 10 | DATADIR=/usr/share/tc |
---|
| 11 | |
---|
| 12 | if [ ${FLAVOR} = emacs ]; then exit 0; fi |
---|
| 13 | |
---|
| 14 | echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} |
---|
| 15 | |
---|
| 16 | FLAVORTEST=`echo $FLAVOR | cut -c-6` |
---|
| 17 | if [ ${FLAVORTEST} = xemacs ] ; then |
---|
| 18 | SITEFLAG="-no-site-file" |
---|
| 19 | else |
---|
| 20 | SITEFLAG="--no-site-file" |
---|
| 21 | fi |
---|
| 22 | FLAGS="${SITEFLAG} -q -batch -l make-elc.el -f batch-byte-compile" |
---|
| 23 | |
---|
| 24 | ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} |
---|
| 25 | ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} |
---|
[1694] | 26 | STARTDIR=/etc/${FLAVOR}/site-start.d |
---|
| 27 | STARTFILE="${PACKAGE}-init.el" |
---|
[1692] | 28 | |
---|
[1694] | 29 | COMMON_EL_FILES="tc-setup.el tc.el tc-help.el tc-complete.el tc-jiscode.el tc-bushu.el tc-mazegaki.el tc-util.el tc-tbl.el tutc-tbl.el eelll.el tc-inst.el tc-stat.el tc-ja-alnum.el" |
---|
| 30 | EL_FILES=tc-is18.el |
---|
| 31 | |
---|
[1692] | 32 | # Install-info-altdir does not actually exist. |
---|
| 33 | # Maybe somebody will write it. |
---|
| 34 | #if test -x /usr/sbin/install-info-altdir; then |
---|
| 35 | # echo install/${PACKAGE}: install Info links for ${FLAVOR} |
---|
| 36 | # install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz |
---|
| 37 | #fi |
---|
| 38 | |
---|
[1694] | 39 | echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..." |
---|
[1692] | 40 | install -m 755 -d ${ELCDIR} |
---|
| 41 | install -m 444 ${DATADIR}/tc-bitmap-8x16 ${ELCDIR} |
---|
| 42 | cd ${ELDIR} |
---|
| 43 | FILES=`echo *.el` |
---|
| 44 | cp ${FILES} ${ELCDIR} |
---|
[1694] | 45 | ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/95${STARTFILE}; |
---|
| 46 | |
---|
[1692] | 47 | cd ${ELCDIR} |
---|
| 48 | |
---|
| 49 | cat << EOF > make-elc.el |
---|
| 50 | (setq load-path (cons "." load-path) byte-compile-warnings nil) |
---|
| 51 | (load "tc-sysdep.el") |
---|
| 52 | (and (fboundp 'set-language-environment) |
---|
| 53 | (set-language-environment "Japanese")) |
---|
| 54 | EOF |
---|
[1694] | 55 | ${FLAVOR} ${FLAGS} ${COMMON_EL_FILES} ${EL_FILES} > ${ELCDIR}/CompilationLog 2>&1 |
---|
| 56 | gzip -9 ${ELCDIR}/CompilationLog |
---|
[1692] | 57 | |
---|
[1694] | 58 | rm -f ${COMMON_EL_FILES} ${EL_FILES} make-elc.el |
---|
| 59 | echo " done." |
---|
| 60 | |
---|
[1692] | 61 | exit 0 |
---|
[1694] | 62 | |
---|