Question: I maintain a set of command line bioinformatics tools which we distribute as source and binaries for Linux, Windows, and OS X. Currently the binary distribution for OS X is just a zip file containing directories for the binaries and the documentation. Our install guide directs the user to unzip the archive, copy the binaries to the desired location, and update their PATH to point to the binaries. That's fine for the command line savvy users, but some users have never heard of /usr/local/bin let alone PATH. We'd love to have an installer that's in more of the OS X idiom.

Creating an application bundle doesn't seem to do the trick because our tools are strictly command line and they'll need a terminal session to use them. It seems like we could have used PackageMaker to create an installer, but that's now deprecated.

Is there a current standard installer for command line tools on OS X, preferably one with CPACK support?

Answer: 
The standard package format is the "pkg" format. It's not often used for applications, but it's fine for a terminal-only utility.

* My go-to tool for creating packages is called [Packages](http://s.sudre.free.fr/Software/Packages/about.html).
* I haven't used it myself, but it looks like CMake [supports PackageMaker](https://cmake.org/Wiki/CMake:CPackPackageGenerators#PackageMaker_.28OSX_only.29), which is a third party tool for creating OS X packages.
* There's also the built-in [pkgbuild](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/pkgbuild.1.html#//apple_ref/doc/man/1/pkgbuild) utility.

Just make sure you don't touch anything outside the [standard paths](https://support.apple.com/en-au/HT204899) (`/Library`, `/Applications`, or `/usr/local/`) and you'll be fine.
You may want to have a look at **[EPM](http://www.msweet.org/projects.php?Z2)**, the Easy Package Manager.

It can package Mac OS X `pkg` as well as RedHat `RPM`, Debian `deb` and then some more package formats -- all from the same source files, immediately after the build step.

It was originally written by Michael Sweet, the author of CUPS (who now works for Apple), and is still maintained by him.

The documentation is here:

* <http://www.msweet.org/documentation/project2/EPM.html>

EPM is available via MacPorts (albeit in an older version, v4.1, whereas the current one is v4.3).

To use it in your Makefile, it is as easy as adding an additional target like this:

```
osx:
    epm -f osx -v -s doc/epmlogo.tif $(MY_PROJECT) 

```

---

Of course, you can also use it standalone (not from the Makefile) to package your software. 

It requires you to create a list of files with their paths, permissions and some other meta info which should be packaged.