123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- #! /bin/sh -e
- # /usr/lib/emacsen-common/packages/install/navi2ch
- # [ This particular script hasn't been tested, so be careful. ]
- set -e
- FLAVOR=$1
- PACKAGE="navi2ch"
- VERSION="2.0.0"
- if [ "X${FLAVOR}" = "X" ]; then
- echo Need argument to determin FLAVOR of emacs;
- exit 1
- fi
- if [ "X${PACKAGE}" = "X" ]; then
- echo Internal error: need package name;
- exit 1;
- fi
- ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
- ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
- STARTDIR=/etc/${FLAVOR}/site-start.d
- STARTFILE="${PACKAGE}-init.el";
- SITELISP=/usr/share/${FLAVOR}/site-lisp
- STAMP=${ELCDIR}/compile-stamp
- compile() {
- echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
-
- if [ -e ${STAMP} ]; then
- if [ "${VERSION}" = "`cat ${STAMP}`" ]; then
- echo " exited. (already compiled)"
- exit
- fi
- fi
-
- rm -rf ${ELCDIR}
- install -m 755 -d ${ELCDIR}
-
- cd ${ELDIR}
- #rm -f config.*
- ./configure --with-lispdir=${ELCDIR} > ${ELCDIR}/CompilationLog 2>&1
- ## Unrecognized options: --with-xemacs, --with-emacs in ./configure
- make clean >> ${ELCDIR}/CompilationLog 2>&1
- make EMACS=${FLAVOR} >> ${ELCDIR}/CompilationLog 2>&1
- #make EMACS=${FLAVOR} -C contrib >> ${ELCDIR}/CompilationLog 2>&1
- make INSTALLPATH=${ELCDIR} install >> ${ELCDIR}/CompilationLog 2>&1
- #make INSTALLPATH=${ELCDIR} install -C contrib >> ${ELCDIR}/CompilationLog 2>&1
- make clean >> ${ELCDIR}/CompilationLog 2>&1
- #rm -f config.*
- rm ${ELCDIR}/*.el
-
- #if [ -e /usr/share/info/navi2ch.info.gz ]; then
- # rm -f /usr/share/info/navi2ch.info*.gz
- #fi
- gzip -9 ${ELCDIR}/CompilationLog
- #gzip -9 /usr/share/info/navi2ch.info
- echo ${VERSION} > ${STAMP}
-
- install -p -m644 ${ELDIR}/vine-default-${PACKAGE}.el ${ELCDIR}
- ln -f -s ${ELDIR}/${STARTFILE} ${STARTDIR}/90${STARTFILE};
- echo " done."
- }
- case "${FLAVOR}" in
- emacs-20*)
- echo "Not Support"
- ;;
- emacs-21*)
- compile
- ;;
- emacs-22*)
- compile
- ;;
- xemacs-*)
- compile
- ;;
- emacs-23*)
- compile
- ;;
-
- emacs-24*)
- compile
- ;;
-
- *)
- ;;
- esac
- exit 0;
|