source: projects/specs/trunk/t/tc-el/tc-el-install.sh @ 1694

Revision 1694, 1.9 KB checked in by iwaim, 14 years ago (diff)

tc-el 2.3.1-2

Line 
1#! /bin/sh -e
2# /usr/lib/emacsen-common/packages/install/tc-el
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
8FLAVOR=$1
9PACKAGE=tc-el
10DATADIR=/usr/share/tc
11
12if [ ${FLAVOR} = emacs ]; then exit 0; fi
13
14echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
15
16FLAVORTEST=`echo $FLAVOR | cut -c-6`
17if [ ${FLAVORTEST} = xemacs ] ; then
18    SITEFLAG="-no-site-file"
19else
20    SITEFLAG="--no-site-file"
21fi
22FLAGS="${SITEFLAG} -q -batch -l make-elc.el -f batch-byte-compile"
23
24ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
25ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
26STARTDIR=/etc/${FLAVOR}/site-start.d
27STARTFILE="${PACKAGE}-init.el"
28
29COMMON_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"
30EL_FILES=tc-is18.el
31
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
39echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
40install -m 755 -d ${ELCDIR}
41install -m 444 ${DATADIR}/tc-bitmap-8x16 ${ELCDIR}
42cd ${ELDIR}
43FILES=`echo *.el`
44cp ${FILES} ${ELCDIR}
45ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/95${STARTFILE};
46
47cd ${ELCDIR}
48
49cat << 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"))
54EOF
55${FLAVOR} ${FLAGS} ${COMMON_EL_FILES} ${EL_FILES} > ${ELCDIR}/CompilationLog 2>&1
56gzip -9 ${ELCDIR}/CompilationLog
57
58rm -f ${COMMON_EL_FILES} ${EL_FILES} make-elc.el
59echo " done."
60
61exit 0
62
Note: See TracBrowser for help on using the repository browser.