Installing to a home folder using a pkg
pkgbuild and productbuild

Try building the package using the newer pkgbuild tool. You can pass --install-location &lt;install-path&gt; as part of the command.

You may also find productbuild useful to know about.

Both tools have detailed manual pages and can handle installation in script determined locations.