Can (macOS) Packages install to system and user folders in the same installation?

I’m trying to create an installer with Whitebox Packages. I want to install plug-ins to the system folders (which seems to be the default location?), like:


And the programs to:

~/Music/MyPlugin/[program files]

Is this possible? If not, where else can I put my programs?

I couldn’t find an out of the box solution to this in Packages, the only way I found around it was to install the files first of all to /tmp in Packages and then use a “Post-installation” BASH script to move them into the correct place.

I would heartily recommend learning how to use the built in pkgbuild and productbuild tools instead of using Packages though, once understood it makes for a much cleaner experience in build scripts that removes that unnecessary dependency.

Thanks for the advice richie. I’ll look into using pkgbuild and productbuild.