howm-install.sh 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/sh
  2. FLAVOR=$1
  3. PACKAGE="howm"
  4. if [ "X${FLAVOR}" = "X" ]; then
  5. echo Need argument to determin FLAVOR of emacs;
  6. exit 1
  7. fi
  8. if [ "X${PACKAGE}" = "X" ]; then
  9. echo Internal error: need package name;
  10. exit 1;
  11. fi
  12. ELDIR=${EPREFIX}/usr/share/emacs/site-lisp/${PACKAGE}
  13. ELCDIR=${EPREFIX}/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
  14. STARTDIR=/etc/${FLAVOR}/site-start.d
  15. STARTFILE="${PACKAGE}-init.el"
  16. SITELISP=/usr/share/${FLAVOR}/site-lisp
  17. COMPILE="-batch -q -f batch-byte-compile"
  18. case "${FLAVOR}" in
  19. emacs)
  20. ;;
  21. *)
  22. echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ... "
  23. rm -rf ${ELCDIR}
  24. install -m 755 -d ${ELCDIR}
  25. cp ${ELDIR}/*.el ${ELCDIR}
  26. (
  27. cd ${ELCDIR}
  28. ${FLAVOR} ${COMPILE} *.el > ${ELCDIR}/CompilationLog 2>&1
  29. rm *.el ${PACKAGE}-init.elc vine-default-${PACKAGE}.elc
  30. install -p -m644 ${ELDIR}/vine-default-${PACKAGE}.el ${ELCDIR}
  31. )
  32. gzip -9 ${ELCDIR}/CompilationLog
  33. if [ ! -d ${STARTDIR} ]; then
  34. install -m 755 -d ${STARTDIR}
  35. fi
  36. ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/50${STARTFILE};
  37. echo " done."
  38. ;;
  39. esac
  40. exit 0;