#!/bin/sh -e
# /usr/lib/emacsen-common/packages/install/gnuserv

FLAVOR=$1
echo install/gnuserv: Handling install of emacsen flavor ${FLAVOR}

case $FLAVOR in
    emacs|xemacs*)
    # Don't compile for xemacs because gnuserv is already present
    # in an icompatible form in the xemacs package.
    ;;
    *)
	echo install/gnuserv: byte-compiling for ${FLAVOR}
	cd /usr/share/emacs/site-lisp/gnuserv
	${FLAVOR} -batch -q -no-site-file -f batch-byte-compile gnuserv.el
	install -m 644 gnuserv.elc /usr/share/${FLAVOR}/site-lisp/
	;;
esac

#
