Can't change install location for package (.pkg) file in Installer
Some installers allow custom install locations in the install wizard.
However, if not, you can use the excellent third-party installer app, Pacifist.
Pacifist lets you browse the contents of installer packages, select components to install and choose install destinations.
However, if an installer package contains files that rely on the app being in /Applications, or if it contains scripts that pre- or post-process files, there isn't an easy way of configuring things to work with a different location. Pacifist does let you have a look at such scripts inside the package, though.
It's more likely that the app itself requires other components to be in fixed locations, and that after installing normally, you can move the app to another location, particularly ~/Applications, which is an OS designated location for apps.