diff options
author | Jonathan Chappelow | 2022-05-01 10:25:47 -0500 |
---|---|---|
committer | Jonathan Chappelow | 2022-05-01 10:25:47 -0500 |
commit | cbc7211151bcd05c4852c38db9485392a6caa377 (patch) | |
tree | 694688e2424e8f12d4f5eb67b1c835dbbbe49b4a /PKGBUILD | |
parent | 38e352842b25655c765a457abb3c23de8151210b (diff) | |
download | aur-cbc7211151bcd05c4852c38db9485392a6caa377.tar.gz |
modernize
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 35 |
1 files changed, 17 insertions, 18 deletions
@@ -1,11 +1,11 @@ # Maintainer: Andy Weidenbaum <archbaum@gmail.com> pkgname=dcrdata-git -pkgver=20180228 +pkgver=20220501 pkgrel=1 pkgdesc="Decred block explorer" arch=('aarch64' 'armv6h' 'armv7h' 'i686' 'x86_64') -makedepends=('dep' 'git' 'go') +makedepends=('nodejs' 'npm' 'git' 'go') groups=('decred') url="https://github.com/decred/dcrdata" license=('ISC') @@ -20,35 +20,34 @@ pkgver() { } prepare() { - export GOPATH="$srcdir" - git clone "$srcdir/dcrdata" "$GOPATH/src/github.com/decred/dcrdata" + rm -rf $srcdir/checkout + git clone "$srcdir/dcrdata" "$srcdir/checkout" } build() { - export GOPATH="$srcdir" - msg2 'Building dcrdata and dependencies...' - cd "$GOPATH/src/github.com/decred/dcrdata" - dep ensure -v - go install . ./cmd/... + export GO111MODULE=on + cd "$srcdir/checkout/cmd/dcrdata" + go build -trimpath -v -ldflags "-s -w" . + npm clean-install + npm run build } package() { msg2 'Installing license...' - install -Dm 644 "$srcdir/src/github.com/decred/dcrdata/LICENSE" \ + install -Dm 644 "$srcdir/checkout/LICENSE" \ -t "$pkgdir/usr/share/licenses/dcrdata" msg2 'Installing docs...' - for _doc in CODE_OF_CONDUCT \ - CONTRIBUTING.md \ - README.md \ - sample-dcrdata.conf \ - sample-nginx.conf \ - sample-rate_limiting.html; do - install -Dm 644 "$srcdir/src/github.com/decred/dcrdata/$_doc" \ + for _doc in README.md \ + cmd/dcrdata/sample-dcrdata.conf \ + cmd/dcrdata/sample-nginx.conf \ + cmd/dcrdata/sample-rate_limiting.html; do + install -Dm 644 "$srcdir/checkout/$_doc" \ -t "$pkgdir/usr/share/doc/dcrdata" done msg2 'Installing...' - install -Dm 755 "$srcdir/bin"/* -t "$pkgdir/usr/bin" + install -Dm 755 "$srcdir/checkout/cmd/dcrdata/dcrdata" -t "$pkgdir/usr/bin" + cp -R "$srcdir/checkout/cmd/dcrdata/views" "$srcdir/checkout/cmd/dcrdata/public" "$pkgdir/usr/bin" } |