# Maintainer: Wael Karram <wael@waelk.tech>
# Maintainer (aur): Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: Emilio Reggi <nag@mailbox.org>


# Parabola changes and rationale:
#   - Add option for armv7h builds.
#   - in libre as blacklist replacement of 'gmni'


pkgname=bombadillo
pkgver=2.4.0
pkgrel=1
pkgdesc="A non-web client for the terminal, supporting Gopher, Gemini and much more."
arch=('x86_64' 'i686' 'arm')
arch=( ${arch[*]/arm/armv7h} )
url="https://bombadillo.colorfield.space"
license=('GPL3')
depends=('glibc')
makedepends=('go')
replaces=('gmni')
source=("$pkgname-$pkgver.tar.gz::https://tildegit.org/sloum/bombadillo/archive/$pkgver.tar.gz")
sha256sums=('e0daed1d9d0fe7cbea52bc3e6ecff327749b54e792774e6b985e0d64b7a36437')

build() {
	export CGO_CPPFLAGS="${CPPFLAGS}"
	export CGO_CFLAGS="${CFLAGS}"
	export CGO_CXXFLAGS="${CXXFLAGS}"
	export CGO_LDFLAGS="${LDFLAGS}"
	export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"

	cd "$pkgname"
	make PREFIX=/usr
}

package() {
	cd "$pkgname"
	make VERSION="$pkgver" DESTDIR="$pkgdir/" PREFIX=/usr install
}
