macospkgbuild

Create .pkg installer with bare executable


I can use pkgbuild and productbuild to create decent installers for an app. However, I need to create one that installs a bare executable and launch daemon, and I've hit a wall.

The crux of the problem seems to be the RootRelativeBundlePath item in the component list for pkgbuild. Since there's no bundle being installed, no path will work there, but I can't omit RootRelativeBundlePath either. So I can't generate the component package.

What do I do?


Solution

  • Found an answer to my own question, using the following command to build the component package, skipping the component list plist entirely:

    pkgbuild --root software_root --install-location "/" --scripts scripts/ --identifier 'com.blah.pkg.blah' --version '1.0.0' installer.pkg