1 # Contributor: Sven Greb <development@svengreb.de>
2 # Contributor: Arctic Ice Studio <development@arcticicestudio.com>
7 pkgdesc="A Make/rake-like build tool using Go"
9 url="https://magefile.org"
12 source=($pkgname-$pkgver.tar.gz::https://github.com/magefile/mage/archive/refs/tags/v$pkgver.tar.gz)
13 sha256sums=('3ce55e39d175d925c015b4dc773cea1fc4d3c64af9edcec6f9b7ab9388b751bf')
18 # mage is build with mage itself, therefore we simluate the execution of the provided `bootstrap.go` installation
19 # file that is recommended by the author.
20 # The file builds mage when mage itself is not installed on the target system yet and included metadata information
24 # 1. https://github.com/magefile/mage/blob/fe9f9420/.goreleaser.yml#L27
25 # 2. https://github.com/magefile/mage/blob/fe9f9420/.goreleaser.yml#L10
27 local BUILD_DATE="$(date --rfc-3339=date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}")"
33 -ldflags "-X \"github.com/magefile/mage/mage.timestamp=${BUILD_DATE}\" \
34 -X \"github.com/magefile/mage/mage.gitTag=v$pkgver\" \
35 -extldflags \"${LDFLAGS}\"" \
41 install -Dm755 build/"$pkgname" -t "$pkgdir/usr/bin/"
42 install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"