#! /bin/sh -e # /usr/lib/emacsen-common/packages/install/mdk # Written by Jim Van Zandt , borrowing heavily # from the install scripts for gettext by Santiago Vila # and octave by Dirk Eddelbuettel . # Reworked a bit by Peter Pentchev , borrowing heavily # from the emacsen-common example scripts by Rob Browning # and the dictionaries-common install scripts. set -e flavor=$1 package=mdk case "$flavor" in emacs) # Dummy emacs flavor. Do nothing and exit exit 0 ;; xemacs*) flags="-no-site-file" ;; emacs*) flags="--no-site-file" ;; *) echo install/$package: Ignoring emacsen flavor [$flavor] exit 0 ;; esac echo "install/$package: Handling install for emacsen flavor $flavor" flags="$flags -q -batch -l path.el -f batch-byte-compile" eldir="/usr/share/emacs/site-lisp/$package" elcdir="/usr/share/$flavor/site-lisp/$package" install -m 755 -d "${elcdir}" cd "$elcdir" ln -sf "$eldir"/*.el . cat << EOF > path.el (setq load-path (cons "." load-path) byte-compile-warnings nil) EOF "$flavor" $flags *.el rm -f path.el path.elc