summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorGeorge Rawlinson2020-06-01 20:09:47 +1200
committerGeorge Rawlinson2020-06-01 20:09:47 +1200
commit3e4dcbd71ec50332596cf17b25818929aa2338e3 (patch)
treec9e164fe16afae91a7c75aed5724e6d5bfda45fb /PKGBUILD
parentaac995bfddc9dc5d3f5c3437aeff1e106294b073 (diff)
downloadaur-3e4dcbd71ec50332596cf17b25818929aa2338e3.tar.gz
upgpkg: license-detector 4.0.0-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD24
1 files changed, 13 insertions, 11 deletions
diff --git a/PKGBUILD b/PKGBUILD
index d23526d69712..3e4cf4e53d15 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,30 +2,32 @@
pkgname=license-detector
_pkgname="go-$pkgname"
-pkgver=3.1.0
-pkgrel=2
+pkgver=4.0.0
+pkgrel=1
pkgdesc="Reliable project licenses detector"
arch=('x86_64')
-url="https://github.com/src-d/go-license-detector"
+url="https://github.com/go-enry/go-license-detector"
license=('Apache')
makedepends=('go')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/src-d/go-license-detector/archive/v3.1.0.tar.gz")
-sha256sums=('bb12da726fa39e62f8547c86db13a919ad7f0bdf229be158e68e8aff382b6575')
+source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
+sha512sums=('bfa05f73958a45efb5760a3a3e74ee46030c3f2bac232b67a6d3b046a3c0840e89880b5b26c4dc0e97985617630745f4a76192dc1bfb527f65419a2eebe0fe25')
prepare() {
cd "$_pkgname-$pkgver"
go mod vendor
+ mkdir -p build
}
build() {
- export CGO_LDFLAGS="$LDFLAGS"
- export GOFLAGS="-buildmode=pie -trimpath -mod=vendor -modcacherw"
cd "$_pkgname-$pkgver"
- go build \
- gopkg.in/src-d/go-license-detector.v3/cmd/license-detector
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -mod=vendor -modcacherw"
+ go build -o build ./cmd/...
}
package() {
- cd "$_pkgname-$pkgver"
- install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
+ install -Dm755 -t "$pkgdir/usr/bin" "$_pkgname-$pkgver/build/$pkgname"
}