Date: Wednesday, April 20, 2022 @ 08:23:34 Author: alerque Revision: 1187124
Migrate fx from AUR Added: fx/ fx/repos/ fx/trunk/ fx/trunk/PKGBUILD ----------+ PKGBUILD | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) Added: fx/trunk/PKGBUILD =================================================================== --- fx/trunk/PKGBUILD (rev 0) +++ fx/trunk/PKGBUILD 2022-04-20 08:23:34 UTC (rev 1187124) @@ -0,0 +1,37 @@ +# Maintainer: Caleb Maclennan <[email protected]> +# Contributor: Caltlgin Stsodaat <[email protected]> + +pkgname=fx +pkgver=21.0.0 +pkgrel=2 +pkgdesc='Command-line tool and terminal JSON viewer' +arch=(x86_64) +url="https://github.com/antonmedv/$pkgname" +license=(MIT) +depends=(glibc) +makedepends=(go) +_archive="$pkgname-$pkgver" +source=("$url/archive/$pkgver/$_archive.tar.gz") +sha256sums=('cd3a34b9072e0aafd0fb362daf7400d7e1fad9ae326c85302191e9179e6be749') + +prepare() { + cd "$_archive" + go mod vendor +} + +build() { + cd "$_archive" + export CGO_CPPFLAGS="$CPPFLAGS" + export CGO_CFLAGS="$CFLAGS" + export CGO_CXXFLAGS="$CXXFLAGS" + export CGO_LDFLAGS="$LDFLAGS" + export GOFLAGS="-buildmode=pie -trimpath -modcacherw -ldflags=-linkmode=external" + go build . +} + +package() { + cd "$_archive" + install -Dm0755 -t "$pkgdir/usr/bin/" "$pkgname" + install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md + install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE +}
