diff options
author | steffeno | 2022-05-16 19:27:03 +0200 |
---|---|---|
committer | steffeno | 2022-05-16 19:27:03 +0200 |
commit | bf6280c288689de6d6250ad59b5e083c7d7caa77 (patch) | |
tree | 5a9b7fc903de0109e01e9317fa2b8466b2e3715e | |
download | aur-bf6280c288689de6d6250ad59b5e083c7d7caa77.tar.gz |
first commit
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 32 |
2 files changed, 49 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..874cfb727834 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = ghidra-extension-ghidra2dwarf + pkgdesc = Ghidra plugin to export information from ghidra to dwarf sections inside ELF binaries + pkgver = 1.0 + pkgrel = 1 + url = https://github.com/cesena/ghidra2dwarf + arch = any + license = MIT + depends = python + depends = ghidra + replaces = ghidra2dwarf + backup = opt/ghidra/Ghidra/Extensions/ghidra2dwarf/libdwarf.jar + backup = opt/ghidra/Ghidra/Extensions/ghidra2dwarf/elf.py + backup = opt/ghidra/Ghidra/Extensions/ghidra2dwarf/ghidra2dwarf.py + source = ghidra2dwarf.zip::https://github.com/cesena/ghidra2dwarf/releases/download/latest/ghidra2dwarf.zip + sha512sums = 23e43ce0bbc0ba6667f6647a896b75c951f9031fd050a0512f6b0c498f4ade7295d41377a7559b63d5a9d47a30d4e123b794717b093f42bfb5e6982c3a41895f + +pkgname = ghidra-extension-ghidra2dwarf diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4c6bd65d9b01 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: steffeno <steffeno dash etc at protonmail dot com> + +EXTENSION_NAME='ghidra2dwarf' +pkgname="ghidra-extension-$EXTENSION_NAME" +pkgver='1.0' +pkgrel='1' +pkgdesc='Ghidra plugin to export information from ghidra to dwarf sections inside ELF binaries' +arch=('any') +url="https://github.com/cesena/$EXTENSION_NAME" +license=('MIT') +depends=('python' 'ghidra') +replaces=("$EXTENSION_NAME") +source=("$EXTENSION_NAME.zip::$url/releases/download/latest/ghidra2dwarf.zip") +sha512sums=('23e43ce0bbc0ba6667f6647a896b75c951f9031fd050a0512f6b0c498f4ade7295d41377a7559b63d5a9d47a30d4e123b794717b093f42bfb5e6982c3a41895f') + +[ -z $GHIDRA_HOME ] && GHIDRA_HOME='/opt/ghidra' +_subdir="Ghidra/Extensions/$EXTENSION_NAME" +INSTALL_DIR="$GHIDRA_HOME/$_subdir" +_extension_files=('libdwarf.jar' 'elf.py' 'ghidra2dwarf.py') + +backup=() +for file in "${_extension_files[@]}"; do + backup+=("${INSTALL_DIR/\//}/$file") +done + +package() { + for file in "${_extension_files[@]}"; do + install -D -m644 "$srcdir/$EXTENSION_NAME/$file" "$pkgdir/$INSTALL_DIR/$file" + done + + msg "Remember to add the script's directory ($INSTALL_DIR) by choosing 'Display Script Manager' -> 'Manage Script Directories' -> 'Display file chooser to add bundles to list'" +} |