[arch-commits] Commit in r2ghidra/repos (2 files)

Levente Polyak anthraxx at archlinux.org
Mon Apr 26 23:07:41 UTC 2021


    Date: Monday, April 26, 2021 @ 23:07:41
  Author: anthraxx
Revision: 924637

archrelease: copy trunk to community-staging-x86_64

Added:
  r2ghidra/repos/community-staging-x86_64/
  r2ghidra/repos/community-staging-x86_64/PKGBUILD
    (from rev 924636, r2ghidra/trunk/PKGBUILD)

----------+
 PKGBUILD |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

Copied: r2ghidra/repos/community-staging-x86_64/PKGBUILD (from rev 924636, r2ghidra/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-04-26 23:07:41 UTC (rev 924637)
@@ -0,0 +1,55 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+
+pkgname=r2ghidra
+_gitcommit=cd769a4e9bfb2d1ab6ca5858dead13b931fcbf7f
+pkgver=5.2.1
+pkgrel=1
+pkgdesc='Deep ghidra decompiler integration for radare2 and iaito'
+url='https://github.com/radareorg/r2ghidra'
+arch=('x86_64')
+license=('LGPL3')
+depends=('radare2' 'glibc')
+makedepends=('git' 'cmake')
+provides=('radare2-r2ghidra')
+replaces=('r2ghidra-dec')
+source=("git+https://github.com/radareorg/r2ghidra#commit=${_gitcommit}"
+        radare-ghidra::git+https://github.com/radareorg/ghidra.git
+        git+https://github.com/zeux/pugixml.git)
+sha512sums=('SKIP'
+            'SKIP'
+            'SKIP')
+
+pkgver() {
+  cd ${pkgname}
+  git describe --tags --match 'v*' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+  cd ${pkgname}
+  git submodule init
+  git config submodule."third-party/pugixml".url "${srcdir}/pugixml"
+  git config submodule."ghidra/ghidra".url "${srcdir}/radare-ghidra"
+  git submodule update --recursive
+}
+
+build() {
+  cd ${pkgname}
+  cmake \
+    -B build \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_BUILD_TYPE=None \
+    -DBUILD_SLASPECS=ON
+  make -C build VERBOSE=1
+}
+
+package() {
+  cd ${pkgname}
+  make -C build -j1 DESTDIR="${pkgdir}" install
+  # move shared library into R2_LIBR_PLUGINS
+  r2version=$(r2 -version|grep radare2|sed -E 's/radare2 ([0-9\.]+) .*/\1/')
+  install -d "${pkgdir}/usr/lib/radare2"
+  mv "${pkgdir}/usr/lib/radare2/last" "${pkgdir}/usr/lib/radare2/${r2version}"
+  ln -s /usr/lib/radare2/${r2version} "${pkgdir}/usr/lib/radare2/last"
+}
+
+# vim: ts=2 sw=2 et:



More information about the arch-commits mailing list