diff options
author | Ilaï Deutel | 2020-10-28 23:09:03 -0400 |
---|---|---|
committer | Ilaï Deutel | 2020-10-28 23:09:03 -0400 |
commit | 22c34643caedec48a445c01bb47f0a816bfbab0c (patch) | |
tree | 061e18fb1d6e3bf0b534a7c46a24c7ca98acf98b | |
parent | 1a9a35a85dd19b89c138a386d33887bcc04e0f2a (diff) | |
download | aur-22c34643caedec48a445c01bb47f0a816bfbab0c.tar.gz |
upgpkg: scc 2.13.0-1; Follow new packaging guidelines
upstream release
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 37 |
2 files changed, 20 insertions, 25 deletions
@@ -1,7 +1,7 @@ pkgbase = scc pkgdesc = Sloc, Cloc and Code: a very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go - pkgver = 2.12.0 - pkgrel = 2 + pkgver = 2.13.0 + pkgrel = 1 url = https://github.com/boyter/scc arch = x86_64 arch = i386 @@ -9,8 +9,8 @@ pkgbase = scc license = Unlicense makedepends = go depends = glibc - source = scc-2.12.0::https://github.com/boyter/scc/archive/v2.12.0.tar.gz - sha256sums = 48baba45e76ef02bb23ded3d1d904fed7e19297066a47b7e6b46baadc50c1eb1 + source = scc-2.13.0::https://github.com/boyter/scc/archive/v2.13.0.tar.gz + sha256sums = 11e2e44ef25ef848de1b380c94cb096ed77d3d590466c99c9f1b5c2dc99609c2 pkgname = scc @@ -1,8 +1,8 @@ # Maintainer: Ilaï Deutel pkgname=scc -pkgver=2.12.0 -pkgrel=2 +pkgver=2.13.0 +pkgrel=1 pkgdesc='Sloc, Cloc and Code: a very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go' arch=('x86_64' 'i386') url="https://github.com/boyter/scc" @@ -10,35 +10,30 @@ license=('MIT' 'Unlicense') depends=('glibc') makedepends=('go') source=("$pkgname-$pkgver::https://github.com/boyter/$pkgname/archive/v$pkgver.tar.gz") -sha256sums=('48baba45e76ef02bb23ded3d1d904fed7e19297066a47b7e6b46baadc50c1eb1') +sha256sums=('11e2e44ef25ef848de1b380c94cb096ed77d3d590466c99c9f1b5c2dc99609c2') prepare(){ - mkdir -p gopath/src/github.com/boyter - ln -rTsf $pkgname-$pkgver gopath/src/github.com/boyter/$pkgname - export GOPATH="$srcdir"/gopath - - # dep ensure fails because it updates vendor/github.com/monochromegane/go-gitignore - # cd gopath/src/github.com/boyter/$pkgname - # dep ensure + cd "$pkgname-$pkgver" + mkdir -p build/ } build() { - export GOPATH="$srcdir"/gopath - cd "$GOPATH/src/github.com/boyter/$pkgname" - go install \ - -trimpath \ - -buildmode=pie \ - -ldflags "-extldflags $LDFLAGS" \ - -v ./... + cd "$pkgname-$pkgver" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" + go build -o build ./... } check() { - export GOPATH="$srcdir"/gopath - cd "$GOPATH/src/github.com/boyter/$pkgname" + cd "$pkgname-$pkgver" go test ./... } package() { - install -Dm755 gopath/bin/$pkgname "$pkgdir"/usr/bin/$pkgname - install -Dm 644 "$srcdir/$pkgname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + cd "$pkgname-$pkgver" + install -Dm755 build/$pkgname "$pkgdir/usr/bin/$pkgname" + install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } |