summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO11
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD43
3 files changed, 27 insertions, 33 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c6dcc2818beb..300d2e558159 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,12 @@
pkgbase = fx
pkgdesc = Command-line tool and terminal JSON viewer
- pkgver = 20.0.2
+ pkgver = 21.0.0
pkgrel = 1
url = https://github.com/antonmedv/fx
arch = any
license = MIT
- makedepends = npm
- makedepends = jq
- noextract = fx-20.0.2.tgz
- source = https://registry.npmjs.org/fx/-/fx-20.0.2.tgz
- sha256sums = 7ec01246c8291cd6194587e4fe0eba92a554336ec2342a74c9eb47cf1b41179c
+ makedepends = go
+ source = https://github.com/antonmedv/fx/archive/refs/tags/21.0.0.tar.gz
+ sha256sums = cd3a34b9072e0aafd0fb362daf7400d7e1fad9ae326c85302191e9179e6be749
pkgname = fx
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..7cfc73166945
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+/src
+/pkg
+/gopath
+/.cache
+/*.tar.gz
+/*.zst
diff --git a/PKGBUILD b/PKGBUILD
index 03264585aa73..a3683a3d7b06 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,38 +1,29 @@
-# Maintainer: Caltlgin Stsodaat <contact@fossdaily.xyz>
+# Maintainer: Yasuaki Uechi <y@uechi.io>
+# Contributor: Caltlgin Stsodaat <contact@fossdaily.xyz>
pkgname='fx'
-pkgver=20.0.2
+pkgver=21.0.0
pkgrel=1
-pkgdesc='Command-line tool and terminal JSON viewer'
+pkgdesc='Terminal JSON viewer'
arch=('any')
url='https://github.com/antonmedv/fx'
license=('MIT')
-makedepends=('npm' 'jq')
-noextract=("${pkgname}-${pkgver}.tgz")
-source=("https://registry.npmjs.org/${pkgname}/-/${pkgname}-${pkgver}.tgz")
-sha256sums=('7ec01246c8291cd6194587e4fe0eba92a554336ec2342a74c9eb47cf1b41179c')
+makedepends=('go')
+source=("https://github.com/antonmedv/fx/archive/refs/tags/${pkgver}.tar.gz")
+sha256sums=('cd3a34b9072e0aafd0fb362daf7400d7e1fad9ae326c85302191e9179e6be749')
-package() {
- npm install -g \
- --cache "${srcdir}/npm-cache" \
- --prefix "${pkgdir}/usr" \
- --user root \
- "${srcdir}/${pkgname}-${pkgver}.tgz"
+build() {
+ export GOPATH="$srcdir/gopath"
- find "${pkgdir}/usr" -type d -exec chmod 755 {} +
- chown -R root:root "${pkgdir}"
+ cd "$srcdir/$pkgname-$pkgver"
- find "${pkgdir}" -name 'package.json' -print0 | xargs -r -0 sed -i '/_where/d'
+ go build
+}
- local PKG_TEMP="$(mktemp)"
- local PKG_JSON="${pkgdir}/usr/lib/node_modules/${pkgname}/package.json"
- jq '.|=with_entries(select(.key|test("_.+")|not))' "${PKG_JSON}" > "${PKG_TEMP}"
- mv -f "${PKG_TEMP}" "${PKG_JSON}"
- chmod 644 "${PKG_JSON}"
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
- cd "${pkgdir}/usr/lib/node_modules/${pkgname}"
- install -Dvm644 'README.md' -t "${pkgdir}/usr/share/doc/${pkgname}"
- install -Dvm644 'LICENSE' -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm755 -t "${pkgdir}/usr/bin" fx
+ install -Dm644 'README.md' -t "${pkgdir}/usr/share/doc/${pkgname}"
+ install -Dm644 'LICENSE' -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
-
-# vim: ts=2 sw=2 et: