summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8bef67c1df5992a15287d654635b120ca286cb23 (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
38
39
40
41
42
# Maintainer: noraj <printf %s 'YWxleGFuZHJlLnphbm5pQGV1cm9wZS5jb20='|base64 -d>

pkgname=hexxy-git
_pkgname=hexxy
pkgver=17.bc0cb46
pkgrel=1
pkgdesc='A modern and beautiful alternative to xxd and hexdump.'
arch=('x86_64' 'aarch64')
url='https://github.com/sweetbbak/hexxy'
license=('custom:unknown')
depends=()
makedepends=('git' 'go')
conflicts=('hexxy')
source=("git+https://github.com/sweetbbak/$_pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $_pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $_pkgname

  GOPATH="$srcdir" go mod download
  GOPATH="$srcdir" go build \
    -trimpath \
    -buildmode=pie \
    -mod=readonly \
    -modcacherw \
    -ldflags "-s -w" \
    -o $_pkgname .
}

package() {
  cd $_pkgname

  install -Dm 755 $_pkgname "$pkgdir/usr/bin/$_pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$_pkgname/" README.md
}