rapid7/meterpreter_bins — pull request #2 by OJ (2014-03-12 07:37:44+00:00)
Title: Added rake tasks for copy/build on Win and Posix

This PR adds the ability to build the meterpreter binaries from `rake` commands so that it's easier to prepare the gem.

Unfortunately we can't have a single command that does the whole thing because we need cross-platform compilation. A few things to note:

1. Fedora 19 is the known platform on which to build POSIX. Ubuntu can build the binaries too, but the resulting binaries do not work, hence it's not recommended building the binaries on Ubuntu until this problem is solved.
1. This PR relies on this Meterpreter PR to be landed first: https://github.com/rapid7/meterpreter/pull/78
1. To build and copy the files on Windows, run `rake win_prep` (this runs `win_compile` and `win_copy`).
1. To build and copy the files on POSIX, run `rake posix_prep` (this runs `posix_compile` and `posix_copy`).
1. I had to comment out the `metadata` stuff in the gemspec to make it work on Windows. I'm not sure why this is the case, hopefully other people can figure this out for me.