title: Package different file types with pkgbuild
body: <p>So I'm packaging a printer tool for our company consisting two .pkg files (drivers) and an .app file.</p>
  
  <p>Right now I'm using the following command to build the package:</p>
  
  <pre><code>pkgbuild --root ./content --script ./scripts --identifier com.MyGreatCompany --version 0.1 --install-location /tmp/ ./PrinterTool.pkg
  </code></pre>
  
  <p>So when installing the package all content is placed in the /tmp/ directory. A postinstall script then completes the installation like this:</p>
  
  <pre><code>installer -verbose -pkg /private/tmp/PackageOne.pkg -target /
  installer -verbose -pkg /private/tmp/PackageTwo.pkg -target /
  /bin/rm -rf /Applications/Utilities/PrinterTool.app
  /bin/mv -f /private/tmp/PrinterTool.app /Applications/Utilities/PrinterTool.app
  </code></pre>
  
  <p>This kind of works. The first install attempt goes well, but when I'm trying to re-install the same package things go wrong. The .app file is not copied to the /tmp folder and thus not moved to the Utilities folder.</p>
  
  <p>So i'd like to know two things:</p>
  
  <ol>
  <li>Is there an explanation why the .app file is only copied once?</li>
  <li>Is this the best way to package multiple file types? I have the feeling that placing it in the /tmp folder is unnecessary. By default the package files are being placed in some kind of installer /tmp folder, right? Can't this be the working directory from which the postinstall script will run?</li>
  </ol>