diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 41 |
1 files changed, 30 insertions, 11 deletions
@@ -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: |