rmpkg: go-task

This commit is contained in:
George Rawlinson 2023-11-25 20:19:51 +13:00
parent a45d9fc36e
commit e2ce7a1b1a
Signed by: grawlinson
GPG key ID: E0959FEA8B550539
2 changed files with 0 additions and 72 deletions

View file

@ -1,66 +0,0 @@
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
pkgname=go-task
pkgver=3.12.0
pkgrel=1
pkgdesc='A task runner/simpler Make alternative written in Go'
arch=('x86_64')
url='https://taskfile.dev'
license=('MIT')
depends=('glibc')
makedepends=('git' 'go')
options=('!lto')
install=go-task.install
_commit='f2abc13ce2e26017b69ea7de1327aa8be7892da5'
source=("$pkgname::git+https://github.com/go-task/task#commit=$_commit")
md5sums=('SKIP')
pkgver() {
cd "$pkgname"
git describe --tags | sed 's/^v//'
}
prepare() {
cd "$pkgname"
# download dependencies
go mod download
}
build() {
cd "$pkgname"
# set Go flags
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
go build -v \
-trimpath \
-buildmode=pie \
-mod=readonly \
-modcacherw \
-ldflags "-linkmode external -extldflags ${LDFLAGS} \
-X main.version=${pkgver}" \
-o go-task \
./cmd/...
}
check() {
cd "$pkgname"
go test -v ./...
}
package() {
cd "$pkgname"
# binary
install -vDm755 -t "$pkgdir/usr/bin" go-task
# XXX: completions require a bit of massaging, so they're not packaged yet
# license
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}

View file

@ -1,6 +0,0 @@
post_install() {
cat >&2 <<-EOF
The binary name has been changed to 'go-task' in order to avoid conflicts
with community/task.
EOF
}