summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorChristian Muehlhaeuser2020-10-04 10:47:34 +0200
committerChristian Muehlhaeuser2020-10-04 10:47:34 +0200
commit875f84409d7be135a8db0692c118cdb37ae19440 (patch)
treeed2244a3bb42650949382e4db844b6feb575c192 /PKGBUILD
parent46ce60e33e3016249cb2e089b0e7b7e14532f7a5 (diff)
downloadaur-875f84409d7be135a8db0692c118cdb37ae19440.tar.gz
Bump to v0.2.2
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD41
1 files changed, 30 insertions, 11 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f033fb646b21..ed73492cbb8b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,26 +1,45 @@
# Maintainer: Christian Muehlhaeuser <muesli at gmail dot com>
pkgname=mastotool
-pkgver=0.2.1
+pkgver=0.2.2
pkgrel=1
-pkgdesc="a collection of tools to work with your Mastodon account"
-arch=('x86_64' 'i686')
+pkgdesc="Disk Usage/Free Utility"
+arch=('x86_64' 'i686' 'armv6h' 'armv7h' 'aarch64')
url="https://github.com/muesli/mastotool"
license=('MIT')
makedepends=('go')
-options=('!strip' '!emptydirs' '!makeflags')
-source=("$pkgname-$pkgver::git+https://github.com/muesli/mastotool#tag=v$pkgver")
-sha256sums=('SKIP')
+source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
+sha256sums=('0fb625d9a22cf16d348602bd1660d0e1877c047444848f798f272764be2a424c')
+
+prepare() {
+ export GOPATH="$srcdir/gopath"
+ go clean -modcache
+}
build() {
- export GO111MODULE=on
- cd "$srcdir"/$pkgname-$pkgver
- go build
+ cd "$pkgname-$pkgver"
+
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+
+ go build \
+ -trimpath \
+ -buildmode=pie \
+ -mod=readonly \
+ -modcacherw \
+ -ldflags "-X main.Version=$pkgver -linkmode external -extldflags \"${LDFLAGS}\"" \
+ -o "$pkgname" .
+
+ go clean -modcache
}
package() {
- # Install binary
- install -Dm755 "$pkgname-$pkgver/mastotool" "$pkgdir/usr/bin/mastotool"
+ cd "$pkgname-$pkgver"
+
+ install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
+ install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim:set ts=4 sw=4 et: