How to sign a Mac OS X application in Linux?
===

For OS X, I distribute my Java application inside a DMG. Since Mountain Lion's release, opening the app gives the following error message:

> [app name] is damaged and couldn't be opened. You should eject the
> disk image.

[Apparently the fix is to sign the .app file][1] so I read the [Code Signing Guide][2]. Everything seems to be straightforward apart from the important question of **how to integrate this into my one-click build process**.

Building my product on all platforms happens on my Linux development machine. I run an Ant script and the Windows installer, starter EXE, Linux installer, OS X application and DMG are all built. So I'd like to integrate code signing into this process.

Is there an equivalent of 'codesign' for Linux?

  [1]: https://blogs.oracle.com/talkingjavadeployment/entry/java_applications_and_gatekeeper
  [2]: https://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#//apple_ref/doc/uid/TP40005929-CH4-SW2