Creating an r2pm package of the plugin

As you remember radare2 has its own packaging manager and we can easily add newly written plugin for everyone to access.

All packages are located in radare2-pm repository, and have very simple text format.

  1. R2PM_BEGIN
  2. R2PM_GIT "https://github.com/user/mycpu"
  3. R2PM_DESC "[r2-arch] MYCPU disassembler and analyzer plugins"
  4. R2PM_INSTALL() {
  5. ${MAKE} clean
  6. ${MAKE} all || exit 1
  7. ${MAKE} install R2PM_PLUGDIR="${R2PM_PLUGDIR}"
  8. }
  9. R2PM_UNINSTALL() {
  10. rm -f "${R2PM_PLUGDIR}/asm_mycpu."*
  11. rm -f "${R2PM_PLUGDIR}/anal_mycpu."*
  12. }
  13. R2PM_END

Then add it in the /db directory of radare2-pm repository and send a pull request to the mainline.