emacsen-install.ex 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #! /bin/sh -e
  2. # /usr/lib/emacsen-common/packages/install/automoc
  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=automoc
  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. ELRELDIR=../../../emacs/site-lisp/${PACKAGE}
  20. # Install-info-altdir does not actually exist.
  21. # Maybe somebody will write it.
  22. if test -x /usr/sbin/install-info-altdir; then
  23. echo install/${PACKAGE}: install Info links for ${FLAVOR}
  24. install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/share/info/${PACKAGE}.info.gz
  25. fi
  26. install -m 755 -d ${ELCDIR}
  27. cd ${ELDIR}
  28. FILES=`echo *.el`
  29. cd ${ELCDIR}
  30. ln -sf ${ELRELDIR}/*.el .
  31. cat << EOF > path.el
  32. (debian-pkg-add-load-path-item ".")
  33. (setq byte-compile-warnings nil)
  34. EOF
  35. ${FLAVOR} ${FLAGS} ${FILES}
  36. rm -f path.el
  37. exit 0