post_install() {
  mkdir -p /usr/lib/ccache/bin
  for compiler in c++ cc cpp gcc g++ {i686,x86_64}-{pc-cygwin,w64-mingw32}-{g++,c++,gcc}; do
    MSYS='winsymlinks:lnk' ln -sf /usr/bin/ccache /usr/lib/ccache/bin/${compiler}
  done
}

pre_remove()   { rm -rf /usr/lib/ccache; }
pre_upgrade()  { pre_remove; }
post_upgrade() { post_install; }
