diff options
author | Martino Pilia | 2021-05-23 11:36:50 +0200 |
---|---|---|
committer | Martino Pilia | 2021-05-23 11:36:50 +0200 |
commit | bc8edc5616c73e98515ba1c2776e8ce0a6765ec0 (patch) | |
tree | b273879a980454a4f68d8b1a835dec4a9b864435 | |
parent | 87f7b0e3034405295b98e124026aa136b36c26db (diff) | |
download | aur-bc8edc5616c73e98515ba1c2776e8ce0a6765ec0.tar.gz |
Update build
-rw-r--r-- | PKGBUILD | 33 |
1 files changed, 14 insertions, 19 deletions
@@ -1,38 +1,33 @@ # Maintainer of this PKGBUILD file: Martino Pilia <martino.pilia@gmail.com> _name=checkmake pkgname=${_name}-git -pkgver=0.1.0.r14.gff21564 -pkgrel=2 +pkgver=0.1.0.r47.g575315c +pkgrel=1 pkgdesc="Experimental linter/analyzer for makefiles" arch=('any') url="https://github.com/mrtazz/checkmake" license=('MIT') -makedepends=('go-pie' 'git') +makedepends=('git' 'go') conflicts=('checkmake') -source=(git+https://github.com/mrtazz/checkmake.git) +source=("git+https://github.com/mrtazz/checkmake.git") sha256sums=('SKIP') pkgver() { - cd "$_name" + cd "${srcdir}/${_name}" git describe --long --tags | sed 's/_/./;s/\([^-]*-g\)/r\1/;s/-/./g' } -prepare(){ - mkdir -p gopath/src/github.com/mrtazz - ln -rTsf "${_name}" gopath/src/github.com/mrtazz/checkmake -} - build(){ - cd "gopath/src/github.com/mrtazz/checkmake" - export GOPATH="${srcdir}/gopath" - go install \ - -gcflags "all=-trimpath=${GOPATH}" \ - -asmflags "all=-trimpath=${GOPATH}" \ - ./cmd/... + cd "${srcdir}/${_name}" + export CGO_LDFLAGS="$LDFLAGS" + export CGO_CFLAGS="$CFLAGS" + export CGO_CXXFLAGS="$CXXFLAGS" + export CGO_CPPFLAGS="$CPPFLAGS" + make EXT_LDFLAGS="-linkmode external" GOFLAGS="-buildmode=pie -trimpath" } package() { - install -Dm755 gopath/bin/checkmake "${pkgdir}/usr/bin/checkmake" - cd "${_name}" - install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_name}/LICENSE" + cd "${srcdir}/${_name}" + install -Dm755 checkmake "${pkgdir}/usr/bin/checkmake" + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } |