diff options
author | Ilaï Deutel | 2020-02-12 09:46:08 -0800 |
---|---|---|
committer | Ilaï Deutel | 2020-02-12 09:46:08 -0800 |
commit | 103b1506c71e0b1e295dd0f6d1bbae8538197e30 (patch) | |
tree | 400f13e2447f4664459cc69f2d2a6ea3f60bd839 | |
download | aur-103b1506c71e0b1e295dd0f6d1bbae8538197e30.tar.gz |
Initial upload: scc 2.11.0-1
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 44 |
2 files changed, 60 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..1ace2071ef94 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +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.11.0 + pkgrel = 1 + url = https://github.com/boyter/scc + arch = x86_64 + arch = i386 + license = MIT + license = Unlicense + makedepends = go-pie + depends = glibc + source = scc-2.11.0::https://github.com/boyter/scc/archive/v2.11.0.tar.gz + sha256sums = 04fbfebc92180a72413b68e4475fac590309a7f2fb365ea5105cc36301155300 + +pkgname = scc + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..2554990087ac --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: Ilaï Deutel + +pkgname=scc +pkgver=2.11.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" +license=('MIT' 'Unlicense') +depends=('glibc') +makedepends=('go-pie') +source=("$pkgname-$pkgver::https://github.com/boyter/$pkgname/archive/v$pkgver.tar.gz") +sha256sums=('04fbfebc92180a72413b68e4475fac590309a7f2fb365ea5105cc36301155300') + +prepare(){ + mkdir -p gopath/src/github.com/boyter + ln -rTsf $pkgname-$pkgver gopath/src/github.com/boyter/$pkgname + export GOPATH="$srcdir"/gopath + + # the dependencies can be fetched here if needed + cd gopath/src/github.com/boyter/$pkgname + # dep ensure fails because it updates vendor/github.com/monochromegane/go-gitignore + # dep ensure +} + +build() { + export GOPATH="$srcdir"/gopath + cd "$GOPATH/src/github.com/boyter/$pkgname" + go build \ + -trimpath \ + -ldflags "-extldflags $LDFLAGS" \ + -v ./... +} + +check() { + export GOPATH="$srcdir"/gopath + cd "$GOPATH/src/github.com/boyter/$pkgname" + 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" +} |