# Break the /usr/share/pkgconfig symlinks, if it exists.
# Then move the .pc files to the standard location.
if [ -L usr/share/pkgconfig ]; then
  rm usr/share/pkgconfig
  mkdir -p usr/share/pkgconfig
  grep usr/share/pkgconfig var/log/packages/* | grep '\.pc$' | cut -f 2 -d : | cut -f 4 -d / | while read movefile ; do
    mv usr/lib/pkgconfig/$movefile usr/share/pkgconfig 1> /dev/null 2> /dev/null
  done
fi
( cd usr/bin ; rm -rf pkg-config )
( cd usr/bin ; ln -sf pkgconf pkg-config )
( cd usr/lib ; rm -rf libpkgconf.so )
( cd usr/lib ; ln -sf libpkgconf.so.7.0.0 libpkgconf.so )
( cd usr/lib ; rm -rf libpkgconf.so.7 )
( cd usr/lib ; ln -sf libpkgconf.so.7.0.0 libpkgconf.so.7 )
( cd usr/man/man1 ; rm -rf pkg-config.1.gz )
( cd usr/man/man1 ; ln -sf pkgconf.1.gz pkg-config.1.gz )
