summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3e6baf67978a2cd10cf643a2b3bd3803f75fa6a2 (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
# Maintainer: EndlessEden <eden@deep-rose.org>
# Previous Maintainer: Johannes Löthberg <johannes@kyriasis.com>
# Contributor: Jakub "Kubuxu" Sztandera  <kubuxu@protonmail.ch>

pkgname=gx
pkgver=0.14.3
pkgrel=1
pkgdesc="Packaging tool built around the distributed, content addressed filesystem IPFS"
url="https://github.com/whyrusleeping/gx"
arch=('x86_64')
license=('MIT')
makedepends=('git' 'go-pie')
optdepends=('gx-go: gx packaing module for go')
source=("git+https://github.com/whyrusleeping/gx.git#tag=v$pkgver")
md5sums=('SKIP')

prepare() {
  mkdir -p "$srcdir"/src/github.com/whyrusleeping/
  ln -fs "$srcdir/gx" "$srcdir"/src/github.com/whyrusleeping/gx
}

build() {
  # Required for go get
  export GOPATH="$srcdir"
  export GOBIN="$GOPATH/bin"
  cd "$srcdir"/src/github.com/whyrusleeping/gx

  go get -v
  go install \
    -gcflags "all=-trimpath=$GOPATH" \
    -asmflags "all=-trimpath=$GOPATH" \
    -ldflags "-extldflags $LDFLAGS" \
    -v
}

package() {
  install -Dm 755 bin/gx "$pkgdir/usr/bin/gx"
  install -Dm 644 gx/LICENSE "$pkgdir/usr/share/licenses/gx/LICENSE"
}