aports/testing/mage/APKBUILD
2022-05-12 02:01:31 +02:00

38 lines
1.0 KiB
Plaintext

# Contributor: Mark Pashmfouroush <mark@markpash.me>
# Maintainer: Mark Pashmfouroush <mark@markpash.me>
pkgname=mage
pkgver=1.12.1
pkgrel=2
# Commit hash that corresponds to the version
_commit=2f1ec406dfa856a4b8378ef837061abc2a0ce01b
pkgdesc="make-like build tool using Go"
url="https://magefile.org/"
license="Apache-2.0"
arch="all"
depends="go"
options="chmod-clean"
source="https://github.com/magefile/mage/archive/v$pkgver/mage-$pkgver.tar.gz"
export GOPATH="$srcdir"
build() {
go build -o bin/mage -ldflags="
-X \"github.com/magefile/mage/mage.timestamp=$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})\"
-X \"github.com/magefile/mage/mage.commitHash=$_commit\"
-X \"github.com/magefile/mage/mage.gitTag=$pkgver\"
"
}
check() {
go vet ./...
go test -v -tags CI ./...
}
package() {
install -Dm0755 bin/mage "$pkgdir/usr/bin/mage"
}
sha512sums="
bad85971bd484745a2a4ae1099579311464a18dce27199787d408cafdcfdce918780c3b3f7059e222d4b98a16ee5363e4e095fea9d23702e23b86ba3fed04394 mage-1.12.1.tar.gz
"