diff options
author | Jörg Horchler | 2021-07-11 12:22:21 +0200 |
---|---|---|
committer | Jörg Horchler | 2021-07-11 12:22:21 +0200 |
commit | c259400faf9fdd08ebfaa16e28b4e8d9674c55a6 (patch) | |
tree | e12bcab56e4055dee7eaa90e44446a75c369b345 | |
parent | 61dbc3001f812786d08b237f4f6b1843055f9701 (diff) | |
download | aur-c259400faf9fdd08ebfaa16e28b4e8d9674c55a6.tar.gz |
raised version to 3.6.0
Signed-off-by: Jörg Horchler <joerg@horchler.xyz>
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 36 |
2 files changed, 25 insertions, 15 deletions
@@ -1,6 +1,6 @@ pkgbase = gotask-taskfile pkgdesc = A task runner / simpler Make alternative written in Go. Installs as gtask to allow coexistance with taskwarrior. - pkgver = 3.5.0 + pkgver = 3.6.0 pkgrel = 1 url = https://taskfile.dev/ arch = x86_64 @@ -12,7 +12,7 @@ pkgbase = gotask-taskfile makedepends = git provides = gotask-taskfile conflicts = gotask-taskfile - source = gotask-taskfile-3.5.0::git://github.com/go-task/task#tag=v3.5.0 + source = gotask-taskfile-3.6.0::git://github.com/go-task/task#tag=v3.6.0 md5sums = SKIP pkgname = gotask-taskfile @@ -2,7 +2,7 @@ pkgname=gotask-taskfile _binname=gtask -pkgver=3.5.0 +pkgver=3.6.0 pkgrel=1 pkgdesc="A task runner / simpler Make alternative written in Go. Installs as gtask to allow coexistance with taskwarrior." arch=('x86_64' 'i686' 'aarch64' 'armv7h') @@ -14,29 +14,39 @@ makedepends=('go' 'git') source=("${pkgname}-${pkgver}::git://github.com/go-task/task#tag=v${pkgver}") md5sums=('SKIP') -prepare(){ - cd "$pkgname-$pkgver" - mkdir -p build/ -} - build() { - 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/${_binname} ./cmd/... -} + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -modcacherw" -check() { cd "$pkgname-$pkgver" - go test ./... + _modname=$(awk '$1 == "module" {print $2}' go.mod) + _mainpath=$(awk '$1 == "main:" {print $2}' .goreleaser.yml) + _gobinname=$(awk '$1 == "binary:" {print $2}' .goreleaser.yml) + export _gobinname + + mkdir -p build/ + cd build + + echo "// +build: main" > main.go + echo "package main" >> main.go + echo "" >> main.go + echo "import _ \"${_modname}/${_mainpath}\"" >> main.go + + echo "module ${_gobinname}" > go.mod + echo "" >> go.mod + echo "require ${_modname} v${pkgver}" >> go.mod + + go mod tidy + go build -v -o ${_gobinname} -ldflags="-w -s -linkmode=external" ${_modname}/${_mainpath} } package() { cd "$pkgname-$pkgver" - install -Dm755 build/${_binname} "${pkgdir}/usr/bin/${_binname}" + install -Dm755 build/${_gobinname} "${pkgdir}/usr/bin/${_binname}" install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" install -Dm644 CHANGELOG.md "${pkgdir}/usr/share/doc/${pkgname}/CHANGELOG.md" install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md" |