| 1 |
#! /bin/sh -e |
| 2 |
# /usr/lib/emacsen-common/packages/install/a2ps |
| 3 |
|
| 4 |
# Written by Jim Van Zandt <[email protected]>, borrowing heavily |
| 5 |
# from the install scripts for gettext by Santiago Vila |
| 6 |
# <[email protected]> and octave by Dirk Eddelbuettel <[email protected]>. |
| 7 |
|
| 8 |
FLAVOR=$1 |
| 9 |
PACKAGE=a2ps |
| 10 |
|
| 11 |
if [ ${FLAVOR} = emacs ]; then exit 0; fi |
| 12 |
|
| 13 |
echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} |
| 14 |
|
| 15 |
#FLAVORTEST=`echo $FLAVOR | cut -c-6` |
| 16 |
#if [ ${FLAVORTEST} = xemacs ] ; then |
| 17 |
# SITEFLAG="-no-site-file" |
| 18 |
#else |
| 19 |
# SITEFLAG="--no-site-file" |
| 20 |
#fi |
| 21 |
SITEFLAG="-no-site-file" # Do not load site files when byte-compiling |
| 22 |
FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" |
| 23 |
|
| 24 |
ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} |
| 25 |
ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} |
| 26 |
|
| 27 |
# Install-info-altdir does not actually exist. |
| 28 |
# Maybe somebody will write it. |
| 29 |
if test -x /usr/sbin/install-info-altdir; then |
| 30 |
echo install/${PACKAGE}: install Info links for ${FLAVOR} |
| 31 |
install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz |
| 32 |
fi |
| 33 |
|
| 34 |
install -m 0755 -d ${ELCDIR} |
| 35 |
cd ${ELDIR} |
| 36 |
FILES=`echo *.el` |
| 37 |
#cp ${FILES} ${ELCDIR} |
| 38 |
cd ${ELCDIR} |
| 39 |
for i in $FILES; do |
| 40 |
ln -sf ${ELDIR}/$i . |
| 41 |
done |
| 42 |
|
| 43 |
cat << EOF > path.el |
| 44 |
(setq load-path (cons "." load-path) byte-compile-warnings nil) |
| 45 |
EOF |
| 46 |
${FLAVOR} ${FLAGS} ${FILES} |
| 47 |
rm -f path.el |
| 48 |
|
| 49 |
exit 0 |