#! /bin/sh -e

# remove the doc dir, if it's still a directory and replace with a symlink
pkg=`basename $0 .postinst`
if [ ! -L  /usr/share/doc/$pkg ]; then
    rm -rf /usr/share/doc/$pkg
    ln -s cpp /usr/share/doc/$pkg
fi

update-alternatives --install /usr/bin/f77 f77 /usr/bin/g77 20 \
  @GFDL@--slave /usr/share/man/man1/f77.1.gz f77.1.gz /usr/share/man/man1/g77.1.gz

#DEBHELPER#

exit 0
