diff options
author | Dimitris Kiziridis | 2020-03-31 01:17:10 +0300 |
---|---|---|
committer | Dimitris Kiziridis | 2020-03-31 01:17:10 +0300 |
commit | 234dd675825869d6d6df43e15dd39a3c8d672bb0 (patch) | |
tree | 0aa009306b12c416356de2768a924233df73782b | |
download | aur-234dd675825869d6d6df43e15dd39a3c8d672bb0.tar.gz |
Initial commmit
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 40 |
2 files changed, 55 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..8f2a673c0d5c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = apicompat-git + pkgdesc = Checks recent changes to a Go project for backwards incompatible changes + pkgver = r125.5f916b1 + pkgrel = 1 + url = https://abicheck.bradleyf.id.au + arch = x86_64 + license = MIT + makedepends = git + makedepends = go + provides = apicompat + source = git+https://github.com/bradleyfalzon/apicompat + md5sums = SKIP + +pkgname = apicompat-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..19f292286c37 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: Dimitris Kiziridis <ragouel at outlook dot com> + +pkgname=apicompat-git +_pkgname=apicompat +pkgver=r125.5f916b1 +pkgrel=1 +pkgdesc="Checks recent changes to a Go project for backwards incompatible changes" +arch=('x86_64') +url='https://abicheck.bradleyf.id.au' +license=('MIT') +provides=('apicompat') +makedepends=('git' 'go') +source=("git+https://github.com/bradleyfalzon/apicompat") +md5sums=('SKIP') + +pkgver() { + cd "${srcdir}/${_pkgname}" + ( set -o pipefail + git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) + +} + +build() { + cd "${srcdir}/${_pkgname}" + mkdir -p $srcdir/go + export GOPATH="${srcdir}"/go + export PATH=$PATH:$GOPATH/bin + go get -d -v ./... + cd cmd/apicompat + go build -v -o "${srcdir}/${_pkgname}-bin" +} + +package() { + cd "${srcdir}/${_pkgname}" + install -Dm755 ../${_pkgname}-bin "${pkgdir}/usr/bin/${_pkgname}" + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE" + go clean -modcache #Remove go libraries +}
\ No newline at end of file |