avoid ambiguous usage of $PKGDIR, use $PKGINSTALLDIR instead of