emacsen-install.ex 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #! /bin/sh -e
  2. # /usr/lib/emacsen-common/packages/install/@hybridapp@
  3. # Written by Jim Van Zandt <jrv@debian.org>, borrowing heavily
  4. # from the install scripts for gettext by Santiago Vila
  5. # <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
  6. FLAVOR=$1
  7. PACKAGE=@hybridapp@
  8. if [ ${FLAVOR} = emacs ]; then exit 0; fi
  9. echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
  10. #FLAVORTEST=`echo $FLAVOR | cut -c-6`
  11. #if [ ${FLAVORTEST} = xemacs ] ; then
  12. # SITEFLAG="-no-site-file"
  13. #else
  14. # SITEFLAG="--no-site-file"
  15. #fi
  16. FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
  17. ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
  18. ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
  19. # Install-info-altdir does not actually exist.
  20. # Maybe somebody will write it.
  21. if test -x /usr/sbin/install-info-altdir; then
  22. echo install/${PACKAGE}: install Info links for ${FLAVOR}
  23. install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz
  24. fi
  25. install -m 755 -d ${ELCDIR}
  26. cd ${ELDIR}
  27. FILES=`echo *.el`
  28. cp ${FILES} ${ELCDIR}
  29. cd ${ELCDIR}
  30. cat << EOF > path.el
  31. (setq load-path (cons "." load-path) byte-compile-warnings nil)
  32. EOF
  33. ${FLAVOR} ${FLAGS} ${FILES}
  34. rm -f *.el path.el
  35. exit 0