12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- #! /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
- ;;
-
- *)
- ;;
- esac
- exit 0;
|