# Recompile of gcc is necessary as it "fixes" its own copy of the
# bn.h include files.  This will allow gcc to correctly recompile
# an openssl app.

rm -rf /usr/lib/gcc-lib/*/$(installed_version gcc)/include/openssl &> /dev/null

lin -c openssh wget

for MOD in $(lvu depends openssl | grep -v -e openssh -e theedge -e lunar -e wget) pine ; do
  if module_installed $MOD ; then
    lin -c $MOD
  fi
done

#fixup certs for imaps and pop3s
CERTHOME="/etc/ssl/certs"
if [ -d $CERTHOME ]; then
  cd $CERTHOME
  if [ ! -e imapd.pem ]; then
    make imapd.pem
  fi
  if [ ! -e ipop3d.pem ]; then
    make ipop3d.pem
  fi
fi

#leave a note about how to make an apache cert from the new makefile
if [ ! -e $CERTHOME/make.apache.cert.note ]; then
  echo "To create a test certificate for use with Apache, run: make testcert" > $CERTHOME/make.apache.cert.note
fi

