preinst is in nethack-el 1:0.9.5-3.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #!/bin/sh -e
# Handle transition from lenny to sid smoothly as the previous package
# versions were not relying on dh_installemacsen (see #454707).
if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
    if [ -f "/etc/emacs/site-start.d/50nethack.el" ]; then
        if [ ! -f "/etc/emacs/site-start.d/50nethack-el.el" ]; then
            mv /etc/emacs/site-start.d/50nethack.el \
                /etc/emacs/site-start.d/50nethack-el.el
        else
            mv /etc/emacs/site-start.d/50nethack.el \
                /etc/emacs/site-start.d/50nethack-el.el.old
        fi
    fi
fi
exit 0
 |