upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / fx / trunk / PKGBUILD
blob4e890213b103b12d77f51f07a4424049a03cd251
1 # Maintainer: Caleb Maclennan <caleb@alerque.com>
2 # Contributor: Caltlgin Stsodaat <contact@fossdaily.xyz>
4 pkgname=fx
5 pkgver=24.1.0
6 pkgrel=1
7 pkgdesc='Command-line tool and terminal JSON viewer'
8 arch=(x86_64)
9 url="https://github.com/antonmedv/$pkgname"
10 license=(MIT)
11 depends=(glibc)
12 makedepends=(go)
13 _archive="$pkgname-$pkgver"
14 source=("$url/archive/$pkgver/$_archive.tar.gz")
15 sha256sums=('1e034ac1d815b05a06a193fa409da1bcbf35453a04759e2c76c745a82da1ad87')
17 prepare() {
18         cd "$_archive"
19         go mod vendor
22 build() {
23         cd "$_archive"
24         export CGO_CPPFLAGS="$CPPFLAGS"
25         export CGO_CFLAGS="$CFLAGS"
26         export CGO_CXXFLAGS="$CXXFLAGS"
27         export CGO_LDFLAGS="$LDFLAGS"
28         export GOFLAGS="-buildmode=pie -trimpath -modcacherw -ldflags=-linkmode=external"
29         go build .
32 package() {
33         cd "$_archive"
34         install -Dm0755 -t "$pkgdir/usr/bin/" "$pkgname"
35         install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
36         install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE