💾 Archived View for radare.org › book › plugins › r2pm.gmi captured on 2024-08-18 at 17:18:03. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-11-04)

🚧 View Differences

-=-=-=-=-=-=-

Packaging your plugins

As explained in more detail in the package manager[1] chapter, it is recommended to use our tooling to make your plugin available for everyone.

1: package manager

All the current packages are located in the radare2-pm[1] repository, check some of the already existing ones for inspiration as you will see how easy it's format is:

1: radare2-pm

R2PM_BEGIN

R2PM_GIT "https://github.com/user/mycpu"
R2PM_DESC "[r2-arch] MYCPU disassembler and analyzer plugins"

R2PM_INSTALL() {
	${MAKE} clean
	${MAKE} all || exit 1
	${MAKE} install R2PM_PLUGDIR="${R2PM_PLUGDIR}"
}

R2PM_UNINSTALL() {
	rm -f "${R2PM_PLUGDIR}/asm_mycpu."*
	rm -f "${R2PM_PLUGDIR}/anal_mycpu."*
}

R2PM_END

Add your package in the `/db` directory of radare2-pm repository and send a pull request when it's ready to be shared.

$ r2pm -H R2PM_DBDIR
/Users/pancake/.local/share/radare2/r2pm/git/radare2-pm/db
$