pkg macos: Fix tarball setup and compile process.
Also added --install_tarball to install tarball after build.