title: Porting PackageMaker command line build installer to pkgbuild
body: <p>I've been attempting to port a Mac <a href="http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/PackageMakerUserGuide/Introduction/Introduction.html" rel="nofollow noreferrer">PackageMaker</a> command line build to pkgbuild and productbuild but I'm stuck.  Unfortunately I haven't found much of anything documenting how these new programs work except for this <a href="https://stackoverflow.com/a/11487658/330110">StackOverflow post</a> and the <a href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/man1/pkgbuild.1.html" rel="nofollow noreferrer">pkgbuild</a> and <a href="https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/productbuild.1.html" rel="nofollow noreferrer">productbuild</a> man pages.  </p>
  
  <p>Here's my problem.  I've created a root install directory that has the following files in it:</p>
  
  <pre><code>/some_path/Applications
                         /MyProgram.app
            /Library
                    /Frameworks
                               /MyFramework.framework
                                                     /[library files...]
  </code></pre>
  
  <p>The command line call below worked great for PackageMaker.  It created an installer that installed all of the files above.</p>
  
  <pre><code>$ /Developer/usr/bin/packagemaker \
      --title "My Program" \
      --root /some_path \
      --version 1.0.0 \
      --filter "\.DS_Store" \
      --resources ./resources/ \
      --scripts ./scripts/ \
      --root-volume-only \
      --domain system \
      --verbose \
      --no-relocate \
      --target 10.5 \
      --id com.my_company.pkg \
      --out MyProgram.pkg
  </code></pre>
  
  <p>Now I'm trying to write this with pkgbuild and having a major problem.  I use the following call:</p>
  
  <pre><code>$ pkgbuild \
      --root /some_path \
      --version 1.0.0 \
      --install-location "/" \
      --scripts "./scripts/" \
      --identifier "com.my_company.pkg" \
      MyProgram.pkg
  </code></pre>
  
  <p>This command builds an installer that copies the MyProgram.framework directory into /Library/Frameworks.  However it does not install the MyProgram.app file into the /Applications directory.  When I look at the installer logs I see this message:</p>
  
  <blockquote>
    <p>Applications/MyProgram.app relocated to
    /some_path/Applications/MyProgram.app</p>
  </blockquote>
  
  <p>Can anyone shed some light on why this isn't adding the MyProgram.app file into the /Applications directory like PackageMaker was doing?  </p>