summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8900049bbafc153cc61a4a024e281948a170002d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Maintainer: Luke Street <luke@street.dev>

_pkgname=Ghidra-GameCube-Loader
pkgname=ghidra-extension-gamecube-loader-git
pkgver=1.1.2_1.r2.g52573c9
pkgrel=1
pkgdesc="A Nintendo GameCube binary loader for Ghidra"
arch=('any')
url=https://github.com/Cuyler36/${_pkgname}
license=('Apache 2.0')
provides=()
conflicts=()
depends=('ghidra')
makedepends=('git' 'unzip')
optdepends=()
source=("$_pkgname::git+${url}")
sha512sums=('SKIP')

pkgver() {
  cd $srcdir/${_pkgname}
  git describe --tags --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd $srcdir/${_pkgname}
  rm -rf dist
  chmod +x gradlew
  ./gradlew -PGHIDRA_INSTALL_DIR=/opt/ghidra
}

package() {
  cd $srcdir/${_pkgname}
  install -d $pkgdir/opt/ghidra/Ghidra/Extensions
  # Extract built archive into destination folder
  unzip -u dist/*.zip -d $pkgdir/opt/ghidra/Ghidra/Extensions/
  install -Dm 644 LICENSE -t $pkgdir/usr/share/licenses/$pkgname
}