Say I have a .app and a .dylib file that I need to install in different locations, one in /Applications and another one in /usr/local/lib. Is it possible to do this through the command line with pkgbuild? I was able to build a .pkg with this same behavior but only with the GUI application.
I found an alternative, while not the most ideal, it does the job for me. It's using packagesbuild commandline that comes with Packages (http://s.sudre.free.fr/Software/Packages/about.html). It lets you create a .pkg file through the command line, but you need to create a .pkgproj file, which you create with the Packages application. You can install various files in different locations this way.