Completely move r2pm packages to radare2-pm

This commit is contained in:
pancake 2016-06-07 23:42:08 +02:00
parent 8b78da200e
commit cf544b794f
53 changed files with 36 additions and 1011 deletions

View File

@ -1,20 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[r2-asm] Tiny ARM Thumb disassembler"
R2PM_INSTALL() {
./configure --prefix="${R2PM_PREFIX}" || exit 1
cd libr/asm/p
${MAKE} clean
ls
${MAKE} asm_armthumb.${LIBEXT} || exit 1
cp -f asm_armthumb.${LIBEXT} "${R2PM_PLUGDIR}" || exit 1
echo "cp -f asm_armthumb.${LIBEXT} ${R2PM_PLUGDIR}"
}
R2PM_UNINSTALL() {
rm -f "${R2PM_PLUGDIR}/asm_armthumb".*
}
R2PM_END

View File

@ -1,20 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[r2-asm-anal] Baleful VM disassembler and analyzer"
R2PM_INSTALL() {
# export PKG_CONFIG_PATH="${R2PM_PREFIX}/lib/pkgconfig"
./configure --prefix="${R2PM_PREFIX}" || exit 1
cd baleful || exit 1
${MAKE} clean
${MAKE} || exit 1
${MAKE} install R2PM_PLUGDIR="${R2PM_PLUGDIR}" || exit 1
}
R2PM_UNINSTALL() {
cd baleful
${MAKE} uninstall R2PM_PLUGDIR="${R2PM_PLUGDIR}"
}
R2PM_END

View File

@ -1,18 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[r2-asm-anal-bin] BaseCall DNA sequence disassembler, analyzer"
R2PM_INSTALL() {
#export PKG_CONFIG_PATH="${R2PM_PREFIX}/lib/pkgconfig"
./configure --prefix="${R2PM_PREFIX}" || exit 1
${MAKE} -C bcl || exit 1
${MAKE} -C bcl install R2PM_PLUGDIR="${R2PM_PLUGDIR}" || exit 1
}
R2PM_UNINSTALL() {
rm ${R2PM_PLUGDIR}/*bcl* || exit 1
#${MAKE} -C bcl uninstall
}
R2PM_END

View File

@ -1,18 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[r2-asm] BlackFin disassembler plugin"
R2PM_INSTALL() {
./configure --prefix="${R2PM_PREFIX}" || exit 1
cd libr/asm/p || exit 1
${MAKE} clean
${MAKE} || exit 1
cp -f asm_blackfin.${LIBEXT} "${R2PM_PLUGDIR}" || exit 1
}
R2PM_UNINSTALL() {
rm -f "${R2PM_PLUGDIR}/asm_blackfin."*
}
R2PM_END

View File

@ -1,23 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[tui-node] Bless-based radare2 TUI"
BINDIR="${R2PM_PLUGDIR}/../bin"
R2PM_INSTALL() {
cd blessr2
node --version || exit 1
npm install || exit 1
mkdir -p "${BINDIR}"
echo '#!/bin/sh' > "${BINDIR}/blessr2"
echo "exec node '`pwd`'"'/index.js $*' >> "${BINDIR}/blessr2"
chmod +x "${BINDIR}"/blessr2
echo "Include ${BINDIR} in your PATH"
}
R2PM_UNINSTALL() {
rm -f "${BINDIR}"/blessr2
}
R2PM_END

View File

@ -1,15 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2"
R2PM_DESC "[syspkg] Bokken GUI"
R2PM_INSTALL() {
sys/bokken.sh
}
R2PM_UNINSTALL() {
echo "Sorry. This package cannot be uninstalled"
exit 0
}
R2PM_END

View File

@ -1,17 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/mrmacete/r2scripts"
R2PM_DESC "[r2-asm] BPF disassembler, analyzer, emulator"
R2PM_INSTALL() {
cd bpf || exit 1
${MAKE} clean
${MAKE} || exit 1
cp *.${LIBEXT} "${R2PM_PLUGDIR}" || exit 1
}
R2PM_UNINSTALL() {
rm -f ${R2PM_PLUGDIR}/*bpf*
}
R2PM_END

View File

@ -1,18 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[r2-bin] dlang symbol demangler plugin"
R2PM_INSTALL() {
ldc2 --version || R2PM_FAIL "You need to install ldc2"
./configure --prefix="${R2PM_PREFIX}" || exit 1
cd libr/bin/p || exit 1
${MAKE} || R2PM_FAIL "You probably need to install phobos2 D library"
cp -f bin_dlang.${LIBEXT} "${R2PM_PLUGDIR}"
}
R2PM_UNINSTALL() {
rm -f "${R2PM_PLUGDIR}/bin_dlang.*
}
R2PM_END

View File

@ -1,18 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-bindings"
R2PM_DESC "[r2-lang] Duktape Javascript plugin #!duktape"
R2PM_INSTALL() {
./configure --prefix="${R2PM_PREFIX}" || exit 1
cd libr/lang/p || R2PM_FAIL "Chdir"
${MAKE} clean
${MAKE} duktape || R2PM_FAIL "Damn"
cp -f lang_duktape.${LIBEXT} "${R2PM_PLUGDIR}" || R2PM_FAIL "Wtf"
}
R2PM_UNINSTALL() {
rm -f "${R2PM_PLUGDIR}/lang_duktape"*
}
R2PM_END

View File

@ -1,16 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/mrmacete/r2scripts"
R2PM_DESC "[r2-r2pipe-python] Burn asm.emu results in real comments (MIPS oriented)"
R2PM_INSTALL() {
mkdir -p "${R2PM_ETCD}" || exit 1
cd esilburner || exit 1
echo '$esilburner=#!pipe python '"'$(pwd)'"'/esilburner.py' > "${R2PM_ETCD}/esilburner" || exit 1
}
R2PM_UNINSTALL() {
rm -f "${R2PM_ETCD}"/esilburner
}
R2PM_END

View File

@ -1,19 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[r2-io] EWF Forensic Image Loader"
R2PM_INSTALL() {
./configure --prefix="${R2PM_PREFIX}" || exit 1
cd libr/io/p || exit 1
${MAKE} clean
${MAKE} ewf || R2PM_FAIL Build
${MAKE} ewf-install || R2PM_FAIL Install
}
R2PM_UNINSTALL() {
cd libr/io/p
${MAKE} ewf-uninstall || R2PM_FAIL
}
R2PM_END

View File

@ -1,21 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[r2-asm] Keystone assembler plugins"
R2PM_INSTALL() {
# export PKG_CONFIG_PATH="${R2PM_PREFIX}/lib/pkgconfig"
cd keystone || exit 1
export LDFLAGS=-L/usr/local/lib
./configure --prefix="${R2PM_PREFIX}" || exit 1
${MAKE} clean
${MAKE} || exit 1
${MAKE} install R2PM_PLUGDIR="${R2PM_PLUGDIR}" || exit 1
}
R2PM_UNINSTALL() {
cd keystone || exit 1
${MAKE} uninstall R2PM_PLUGDIR="${R2PM_PLUGDIR}"
}
R2PM_END

View File

@ -1,20 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/keystone-engine/keystone"
R2PM_DESC "[syspkg] keystone assembler library"
R2PM_INSTALL() {
mkdir build
cd build || exit 1
../make-lib.sh debug
${SUDO} ${MAKE} install
../make-share.sh debug
${SUDO} ${MAKE} install
}
R2PM_UNINSTALL() {
cd build || exit 1
${SUDO} ${MAKE} uninstall
}
R2PM_END

View File

@ -1,16 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-bindings"
R2PM_DESC "[r2-lang] C# r2pipe/RLang bin/csharp-cs"
R2PM_INSTALL() {
./configure --prefix="${R2PM_PREFIX}" || exit 1
${MAKE} -C libr/lang csharp || exit 1
${MAKE} -C libr/lang csharp-install || exit 1
}
R2PM_UNINSTALL() {
${MAKE} -C libr/lang uninstall
}
R2PM_END

View File

@ -1,16 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-bindings"
R2PM_DESC "[lang-python] Python r2pipe/RLang plugin"
R2PM_INSTALL() {
./configure --prefix="${R2PM_PREFIX}" || exit 1
${MAKE} -C libr/lang/p python || exit 1
${MAKE} -C libr/lang/p python-install || exit 1
}
R2PM_UNINSTALL() {
${MAKE} -C libr/lang/p python-uninstall
}
R2PM_END

View File

@ -1,20 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[r2-bin] minidump support (wip)"
R2PM_INSTALL() {
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
./configure --prefix="${R2PM_PREFIX}" || exit 1
cd libr/bin || exit 1
${MAKE} clean
${MAKE} mdmp || exit 1
cp -f p/*mdmp*.${LIBEXT} "${R2PM_PLUGDIR}" || exit 1
#${MAKE} mdmp-install HOMEDEST="${R2PM_PLUGDIR}" || exit 1
}
R2PM_UNINSTALL() {
rm -f "${R2PM_PLUGDIR}/"*mdmp*
}
R2PM_END

View File

@ -1,19 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[r2-arch] Support for the microblaze microprocessor assembly"
R2PM_INSTALL() {
./configure --prefix="${R2PM_PREFIX}" || exit 1
cd microblaze || exit 1
${MAKE} clean
${MAKE} || exit 1
${MAKE} install R2_PLUGIN_PATH="${R2PM_PLUGDIR}" || exit 1
}
R2PM_UNINSTALL() {
cd microblaze || exit 1
${MAKE} uninstall "${R2PM_PLUGDIR}" || exit 1
}
R2PM_END

View File

@ -1,20 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[r2-asm] MSIL disassembler (wip)"
R2PM_INSTALL() {
#export PKG_CONFIG_PATH=/usr/lib/pkgconfig
./configure --prefix="${R2PM_PREFIX}" || exit 1
cd libr/asm || exit 1
${MAKE} clean
${MAKE} msil || exit 1
cp -f p/asm_msil.${LIBEXT} "${R2PM_PLUGDIR}" || exit 1
echo "cp -f p/asm_msil.${LIBEXT} ${R2PM_PLUGDIR}"
}
R2PM_UNINSTALL() {
rm -f "${R2PM_PLUGDIR}"/*msil*
}
R2PM_END

View File

@ -1,18 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[r2-asm] tiny PowerPC disassembler"
R2PM_INSTALL() {
./configure --prefix="${R2PM_PREFIX}"
cd libr/asm/p || exit 1
${MAKE} clean
${MAKE} asm_ppc_disasm.${LIBEXT} || exit 1
cp -f asm_ppc_disasm.${LIBEXT} ${R2PM_PLUGDIR}
}
R2PM_UNINSTALL() {
rm -f "${R2PM_PLUGDIR}/asm_ppc_disasm."*
}
R2PM_END

View File

@ -1,18 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[r2-asm] PSOSVM disassembler"
R2PM_INSTALL() {
./configure --prefix="${R2PM_PREFIX}" || exit 1
cd libr/asm/p || exit 1
${MAKE} asm_psosvm.${LIBEXT} || exit 1
cp -f asm_psosvm.${LIBEXT} ${R2PM_PLUGDIR} || exit 1
echo "cp asm_psosvm.${LIBEXT} ${R2PM_PLUGDIR}"
}
R2PM_UNINSTALL() {
rm -f "${R2PM_PLUGDIR}/asm_psosvm."*
}
R2PM_END

View File

@ -1,19 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[r2-bin] PYC | Python byte-compiled file support"
R2PM_INSTALL() {
./configure --prefix="${R2PM_PREFIX}" || exit 1
cd libr/bin/p || exit 1
${MAKE} clean
${MAKE} bin_pyc.${LIBEXT} || exit 1
cp -f bin_pyc.${LIBEXT} "${R2PM_PLUGDIR}" || exit 1
echo "cp -f bin_pyc.${LIBEXT} ${R2PM_PLUGDIR}"
}
R2PM_UNINSTALL() {
rm -f "${R2PM_PLUGDIR}"/*pyc*
}
R2PM_END

View File

@ -1,15 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2"
R2PM_DESC "[syspkg-python] Native Python API bindings"
R2PM_INSTALL() {
sys/python.sh
}
R2PM_UNINSTALL() {
echo "Sorry. This package cannot be uninstalled"
exit 0
}
R2PM_END

View File

@ -1,27 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-bindings"
R2PM_DESC "[r2pipe] API for C# and .Net"
R2PM_INSTALL() {
cd r2pipe/dotnet
if [ "${GLOBAL}" = 1 ]; then
echo "Cannot install global dll yet"
exit 1
else
${MAKE} -j2 || exit 1
cp r2pipe.dll "${WRKDIR}" || exit 1
echo "${WRKDIR}/r2pipe.dll"
fi
}
R2PM_UNINSTALL() {
if [ "${GLOBAL}" = 1 ]; then
echo "Cannot uninstall global dll yet"
exit 1
else
rm r2pipe.dll
fi
}
R2PM_END

View File

@ -1,13 +0,0 @@
R2PM_BEGIN
R2PM_DESC "[syspkg-r2pipe] r2pipe API for Go"
R2PM_INSTALL() {
go get github.com/radare/r2pipe-go || exit 1
echo "r2pipe-go installed"
}
R2PM_UNINSTALL() {
go clean -i github.com/radare/r2pipe-go || exit 1
rm -rf "$GOPATH/src/github.com/radare/r2pipe-go"
}

View File

@ -1,21 +0,0 @@
R2PM_BEGIN
R2PM_DESC "[r2pipe] r2pipe API for NodeJS"
R2PM_INSTALL() {
if [ "${GLOBAL}" = 1 ]; then
${SUDO} npm install -g r2pipe
else
npm install r2pipe
fi
}
R2PM_UNINSTALL() {
if [ "${GLOBAL}" = 1 ]; then
${SUDO} npm uninstall -g r2pipe
else
npm uninstall r2pipe
fi
}
R2PM_END

View File

@ -1,13 +0,0 @@
R2PM_BEGIN
R2PM_DESC "[syspkg-r2pipe] r2pipe API for Python"
R2PM_INSTALL() {
pip install -U r2pipe
}
R2PM_UNINSTALL() {
pip uninstall r2pipe
}
R2PM_END

View File

@ -1,13 +0,0 @@
R2PM_BEGIN
R2PM_DESC "[syspkg-r2pipe] r2pipe API for Ruby"
R2PM_INSTALL() {
${SUDO} gem install r2pipe
}
R2PM_UNINSTALL() {
${SUDO} gem uninstall r2pipe
}
R2PM_END

View File

@ -1,28 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-bindings"
R2PM_DESC "[r2pipe] API for Vala and C-Glib"
R2PM_INSTALL() {
./configure --prefix="${R2PM_PREFIX}"
cd r2pipe/vala
if [ "${GLOBAL}" = 1 ]; then
${MAKE} clean
${MAKE} || exit 1
${MAKE} install || exit 1
else
echo "Cannot install in home yet"
exit 1
fi
}
R2PM_UNINSTALL() {
if [ "${GLOBAL}" = 1 ]; then
${MAKE} uninstall
else
echo "Cannot uninstall from home yet"
exit 1
fi
}
R2PM_END

View File

@ -1,14 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2"
R2PM_DESC "[syspkg] radare2 symstall"
R2PM_INSTALL() {
sys/install.sh
}
R2PM_UNINSTALL() {
sys/uninstall.sh
}
R2PM_END

View File

@ -1,17 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radeco"
R2PM_DESC "[syspkg] Radare Decompiler in Rust"
R2PM_INSTALL() {
cargo update --verbose || exit 1
cargo build --verbose || exit 1
ln -fs `pwd`/target/debug/radeco \
"${BINDIR}"/radeco || exit 1
}
R2PM_UNINSTALL() {
rm -f "${BINDIR}"/radeco
}
R2PM_END

View File

@ -1,22 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/jpenalbae/r2-scripts"
R2PM_DESC "[r2-r2pipe-node] RetDec Decompiler script"
BINDIR="${R2PM_BINDIR}"
R2PM_INSTALL() {
cd decompiler
node --version || exit 1
npm install || exit 1
mkdir -p "${R2PM_BINDIR}"
echo '#!/bin/sh' > "${R2PM_BINDIR}/retdec"
echo "exec node '`pwd`'"'/decompile.js $*' >> "${R2PM_BINDIR}/retdec"
chmod +x "${R2PM_BINDIR}"/retdec || exit 1
}
R2PM_UNINSTALL() {
rm -f "${BINDIR}"/retdec
}
R2PM_END

View File

@ -1,23 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[r2-bin] SWF / Flash disassembler"
R2PM_INSTALL() {
./configure --prefix="${R2PM_PREFIX}" || exit 1
cd libr/asm/p
${MAKE} clean
${MAKE} asm_swf.${LIBEXT} || exit 1
mkdir -p "${R2PM_PLUGDIR}" || exit 1
cp -f asm_swf.${LIBEXT} "${R2PM_PLUGDIR}" || exit 1
cd ../../bin/p || exit 1
${MAKE} bin_swf.${LIBEXT} || exit 1
echo cp -f bin_swf.${LIBEXT} "${R2PM_PLUGDIR}" || exit 1
cp -f bin_swf.${LIBEXT} "${R2PM_PLUGDIR}" || exit 1
}
R2PM_UNINSTALL() {
rm -f "${R2PM_PLUGDIR}"/*swf*
}
R2PM_END

View File

@ -1,20 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2"
R2PM_DESC "[syspkg] SWIG compiler"
R2PM_INSTALL() {
if [ "${GLOBAL}" = 1 ]; then
sys/swig.sh
else
echo "Sorry. This package cannot be installed in your home. Use r2pm -gi"
exit 1
fi
}
R2PM_UNINSTALL() {
echo "Sorry. This package cannot be uninstalled"
exit 1
}
R2PM_END

View File

@ -1,15 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/danigargu/ida-syms2elf"
R2PM_DESC "[r2-r2pipe-python] Export recognized symbols to the ELF symbol table"
R2PM_INSTALL() {
mkdir -p "${R2PM_ETCD}"
echo '$syms2elf=#!pipe python '"'`pwd`'"'/syms2elf.py' > "${R2PM_ETCD}/syms2elf"
}
R2PM_UNINSTALL() {
rm -f "${R2PM_ETCD}"/syms2elf
}
R2PM_END

View File

@ -1,22 +0,0 @@
R2PM_BEGIN
R2PM_GIT "http://repo.or.cz/tinycc"
R2PM_DESC "[syspkg] TinyCC compiler aka TCC"
# if installation fails, just strace it, probably this will fix:
# cp -f /usr/lib/crt* /usr/lib64//
p="${R2PM_PREFIX}"
R2PM_INSTALL() {
${MAKE} clean
./configure --prefix=$p --sysroot=$p/lib --libdir=$p/lib \
--tccdir=$p/lib/tcc --docdir=$p/share/doc/tcc || exit 1
${MAKE} PREFIX="${R2PM_PREFIX}" CONFIG_SYSROOT="$p/lib" || exit 1
${SUDO} ${MAKE} install PREFIX="$p" || exit 1
}
R2PM_UNINSTALL() {
${SUDO} ${MAKE} uninstall PREFIX="$p"
}
R2PM_END

View File

@ -1,16 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[r2-debug] Unicorn emulator plugin for radare2"
R2PM_INSTALL() {
./configure --prefix="${R2PM_PREFIX}"
${MAKE} -C unicorn
${MAKE} unicorn-install
}
R2PM_UNINSTALL() {
${MAKE} unicorn-uninstall
}
R2PM_END

View File

@ -1,23 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/unicorn-engine/unicorn"
R2PM_DESC "[syspkg] unicorn emulation library"
R2PM_INSTALL() {
${MAKE} -j 4
if [ "${GLOBAL}" = 1 ]; then
${SUDO} ${MAKE} install PREFIX="${R2PM_PREFIX}"
else
${MAKE} install PREFIX="${R2PM_PREFIX}"
fi
}
R2PM_UNINSTALL() {
if [ "${GLOBAL}" = 1 ]; then
${SUDO} ${MAKE} uninstall PREFIX="${R2PM_PREFIX}"
else
${MAKE} uninstall PREFIX="${R2PM_PREFIX}"
fi
}
R2PM_END

View File

@ -1,20 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2"
R2PM_DESC "[syspkg] Vala compiler from git"
R2PM_INSTALL() {
if [ $GLOBAL = 1 ]; then
sys/vala.sh "${R2PM_PREFIX}"
else
echo "Sorry. This package cannot be installed at home"
exit 1
fi
}
R2PM_UNINSTALL() {
echo "Sorry. This package cannot be uninstalled"
exit 0
}
R2PM_END

View File

@ -1,20 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2"
R2PM_DESC "[syspkg] Valabind tool to generate bindings from vapi files"
R2PM_INSTALL() {
if [ $GLOBAL = 1 ]; then
sys/valabind.sh "${R2PM_PREFIX}"
else
echo "Sorry. This package cannot be installed at home"
exit 1
fi
}
R2PM_UNINSTALL() {
echo "Sorry. This package cannot be uninstalled"
exit 0
}
R2PM_END

View File

@ -1,15 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-bindings"
R2PM_DESC "[syspkg] radare2 Vapi files for Vala"
R2PM_INSTALL() {
./configure --prefix="${R2PM_PREFIX}" || exit 1
${SUDO} ${MAKE} install-vapi || exit 1
}
R2PM_UNINSTALL() {
${SUDO} ${MAKE} uninstall-vapi
}
R2PM_END

View File

@ -1,19 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[r2-asm] VC4 / RPI VideoCore4 disassembler"
R2PM_INSTALL() {
./configure --prefix="${R2PM_PREFIX}" || exit 1
cd libr/asm/p || exit 1
${MAKE} clean
${MAKE} asm_vc4.${LIBEXT} || exit 1
mkdir -p "${R2PM_PLUGDIR}" || exit 1
cp -f asm_vc4.${LIBEXT} "${R2PM_PLUGDIR}" || exit 1
}
R2PM_UNINSTALL() {
rm -f "${R2PM_PLUGDIR}"/*vc4*
}
R2PM_END

View File

@ -1,18 +0,0 @@
R2PM_BEGIN
R2PM_DESC "[r2] Get info about windows functions"
BINDIR="${R2PM_PLUGDIR}/../bin"
R2PM_INSTALL() {
mkdir -p "${BINDIR}"
echo '#!/bin/sh' > "${BINDIR}/winapi"
echo 'curl https://source.winehq.org/WineAPI/${1}.html 2>/dev/null | grep DESCRIPTION -A 1 | tail -n "+2" | sed -e "s/<[^>]*>//g"' > "${BINDIR}/winapi"
chmod +x "${BINDIR}"/winapi
}
R2PM_UNINSTALL() {
rm -f "${BINDIR}"/winapi
}
R2PM_END

View File

@ -1,35 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-webui"
R2PM_DESC "[r2-www] The enyo WebUI of /m"
MAKE_TARGET="enyo"
UI="enyo"
R2PM_INSTALL() {
${MAKE} "${MAKE_TARGET}" || exit 1
cd "dist/${UI}" || exit 1
WWWROOT="${R2PM_WWWROOT}"
echo "WWWROOT IS ${WWWROOT}"
mkdir -p ${WWWROOT} || exit 1
if [ -n "${WWWROOT}" ]; then
rm -rf "${WWWROOT}/${UI}"
echo "Installing /${UI}..."
ln -s "${PWD}" "${WWWROOT}/${UI}" || exit 1
else
echo "Cannot find WWWROOT"
exit 1
fi
}
R2PM_UNINSTALL() {
WWWROOT="${R2PM_WWWROOT}"
if [ -n "${WWWROOT}" ]; then
rm -rf "${WWWROOT}/${UI}"
else
echo "Cannot find WWWROOT"
exit 1
fi
}
R2PM_END

View File

@ -1,35 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-webui"
R2PM_DESC "[r2-www] The Material WebUI of /m"
MAKE_TARGET="material"
UI="m"
R2PM_INSTALL() {
${MAKE} "${MAKE_TARGET}" || exit 1
cd "dist/${UI}" || exit 1
WWWROOT="${R2PM_WWWROOT}"
echo "WWWROOT IS ${WWWROOT}"
mkdir -p ${WWWROOT} || exit 1
if [ -n "${WWWROOT}" ]; then
rm -rf "${WWWROOT}/${UI}"
echo "Installing /${UI}..."
ln -s "${PWD}" "${WWWROOT}/${UI}"
else
echo "Cannot find WWWROOT"
exit 1
fi
}
R2PM_UNINSTALL() {
WWWROOT="${R2PM_WWWROOT}"
if [ -n "${WWWROOT}" ]; then
rm -rf "${WWWROOT}/${UI}"
else
echo "Cannot find WWWROOT"
exit 1
fi
}
R2PM_END

View File

@ -1,35 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-webui"
R2PM_DESC "[r2-www] The panel WebUI of /p"
MAKE_TARGET="panel"
UI="p"
R2PM_INSTALL() {
${MAKE} "${MAKE_TARGET}" || exit 1
cd "dist/${UI}"
WWWROOT="${R2PM_WWWROOT}"
echo "WWWROOT IS ${WWWROOT}"
mkdir -p ${WWWROOT} || exit 1
if [ -n "${WWWROOT}" ]; then
rm -rf "${WWWROOT}/${UI}"
echo "Installing /${UI}..."
ln -s "${PWD}" "${WWWROOT}/${UI}"
else
echo "Cannot find WWWROOT"
exit 1
fi
}
R2PM_UNINSTALL() {
WWWROOT="${R2PM_WWWROOT}"
if [ -n "${WWWROOT}" ]; then
rm -rf "${WWWROOT}/${UI}"
else
echo "Cannot find WWWROOT"
exit 1
fi
}
R2PM_END

View File

@ -1,35 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-webui"
R2PM_DESC "[r2-www] The tiled WebUI of /t"
MAKE_TARGET="tiles"
UI="t"
R2PM_INSTALL() {
${MAKE} "${MAKE_TARGET}" || exit 1
cd "dist/${UI}" || exit 1
WWWROOT="${R2PM_WWWROOT}"
echo "WWWROOT IS ${WWWROOT}"
mkdir -p ${WWWROOT} || exit 1
if [ -n "${WWWROOT}" ]; then
rm -rf "${WWWROOT}/${UI}"
echo "Installing /${UI}..."
ln -s "${PWD}" "${WWWROOT}/${UI}"
else
echo "Cannot find WWWROOT"
exit 1
fi
}
R2PM_UNINSTALL() {
WWWROOT="${R2PM_WWWROOT}"
if [ -n "${WWWROOT}" ]; then
rm -rf "${WWWROOT}/${UI}"
else
echo "Cannot find WWWROOT"
exit 1
fi
}
R2PM_END

View File

@ -1,19 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[r2-asm-anal] X86 BeaEngine Disassembler"
R2PM_INSTALL() {
./configure --prefix="${R2PM_PREFIX}" || exit 1
cd libr || exit 1
${MAKE} clean
${MAKE} bea || exit 1
${MAKE} bea-install R2PM_PLUGDIR="${R2PM_PLUGDIR}" || exit 1
}
R2PM_UNINSTALL() {
cd baleful
rm -f "${R2PM_PLUGDIR}"/*bea*
}
R2PM_END

View File

@ -1,18 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[r2-core] yara2 plugin for radare2"
R2PM_INSTALL() {
cd yara/yara2
export EXT_SO=$(r2 -hh|grep LIBEXT|awk '{print $2}')
./configure --prefix="${R2PM_PREFIX}" || R2PM_FAIL "Configure"
${MAKE} || R2PM_FAIL "Build"
${MAKE} install || R2PM_FAIL "Install"
}
R2PM_UNINSTALL() {
${MAKE} uninstall
}
R2PM_END

View File

@ -1,15 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[syspkg] yara3 library"
R2PM_INSTALL() {
yara/install-yara2.sh
}
R2PM_UNINSTALL() {
echo "Sorry. This package cannot be uninstalled"
exit 0
}
R2PM_END

View File

@ -1,18 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[r2-core] yara3 plugin for radare2"
R2PM_INSTALL() {
cd yara/yara3
export EXT_SO=$(r2 -hh|grep LIBEXT|awk '{print $2}')
./configure --prefix="${R2PM_PREFIX}" || R2PM_FAIL "Configure"
${MAKE} || R2PM_FAIL "Build"
${MAKE} install || R2PM_FAIL "Install"
}
R2PM_UNINSTALL() {
${MAKE} uninstall
}
R2PM_END

View File

@ -1,15 +0,0 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-extras"
R2PM_DESC "[syspkg] yara3 library"
R2PM_INSTALL() {
yara/install-yara3.sh
}
R2PM_UNINSTALL() {
echo "Sorry. This package cannot be uninstalled"
exit 0
}
R2PM_END

View File

@ -50,6 +50,11 @@ R2PM_ETCD="${R2HOMEDIR}/radare2/radare2rc.d"
# TODO. support system plugin installs R2PM_PLUGDIR="${R2PM_PREFIX}/lib/radare2/last"
if [ -z "${R2PM_DBDIR}" ]; then
if [ -d "${HOME}/.config/radare2/r2pm/db" ]; then
R2PM_DBDIR="${HOME}/.config/radare2/r2pm/db"
fi
fi
if [ -z "${R2PM_DBDIR}" ]; then
if [ -d "${PREFIX}/share/radare2/last/r2pm" ]; then
R2PM_DBDIR="${PREFIX}/share/radare2/last/r2pm/"
@ -58,9 +63,32 @@ fi
if [ -f "d/baleful" ]; then
R2PM_DBDIR="$(pwd)/d/"
fi
case "$1" in
init|update)
R2PM_DBDIR="${HOME}/.config/radare2/r2pm/db"
mkdir -p "${R2PM_USRDIR}"/git
cd "${R2PM_USRDIR}"/git
if [ -d radare2-pm ]; then
cd radare2-pm
git pull || exit 1
else
git clone https://github.com/radare/radare2-pm || exit 1
cd radare2-pm
fi
rm -f "${R2PM_DBDIR}"
rm -f "${R2PM_DBDIR}/*"
rmdir "${R2PM_DBDIR}"
rm -f "${R2PM_DBDIR}"
ln -fs "${R2PM_USRDIR}"/git/radare2-pm/d "${R2PM_DBDIR}" || exit 1
echo "r2pm database initialized. Use 'r2pm update' to update"
exit 0
;;
esac
if [ ! -d "${R2PM_DBDIR}" ]; then
R2PM_DBDIR=""
echo "\$R2PM_DBDIR: No such file or directory."
echo "Run 'r2pm init' to initialize the package repository"
exit 1
fi
mkdir -p "${R2PM_USRDIR}/pkg/"
@ -263,7 +291,7 @@ case "$1" in
fi
;;
*|help|-h)
echo "Usage: r2pm [cmd] [...]"
echo "Usage: r2pm [init|update|cmd] [...]"
echo "Commands:"
echo " -i,info pkgs info"
echo " -i,install <pkgname> baleful"

View File

@ -1,11 +1,11 @@
.Dd May 15, 2016
.Dd Jun 7, 2016
.Dt R2PM 1
.Sh NAME
.Nm R2PM
.Nd radare2 package manager
.Sh SYNOPSIS
.Nm r2pm
.Op cmd
.Op init|update|cmd
.Op ...
.Sh DESCRIPTION
Allows to install, update, uninstall and discover plugins and tools that can be used with radare2.
@ -35,6 +35,11 @@ Clean the source cache
.El
.Sh EXAMPLES
.Pp
Initialize and update the package database
.Pp
$ r2pm init
$ r2pm update
.Pp
Install a package
.Pp
$ r2pm install yara3