preinst is in imagemagick-doc 8:6.8.9.9-7ubuntu5.
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  | #!/bin/sh
set -e 
# remove after jeesie + 2
# see #720145
dpkg-maintscript-helper symlink_to_dir \
               /usr/share/doc/imagemagick-doc/images /usr/share/doc/imagemagick/images \
               8:6.8.8.0-1~ -- "$@"
dpkg-maintscript-helper symlink_to_dir \
               /usr/share/doc/imagemagick-doc/www /usr/share/doc/imagemagick/www \
               8:6.8.8.0-1~ -- "$@"
 |