diff options
author | JP-Ellis | 2023-03-22 08:55:36 +1100 |
---|---|---|
committer | JP-Ellis | 2023-03-22 08:55:36 +1100 |
commit | bc92aef887c39f964906ae58ecb425b1966fbe23 (patch) | |
tree | be679159ada4d54dec637e4c77f2e691c0005a15 | |
download | aur-bc92aef887c39f964906ae58ecb425b1966fbe23.tar.gz |
v0.1.29
Signed-off-by: JP-Ellis <josh@jpellis.me>
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 29 |
2 files changed, 43 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9e593453edb7 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,14 @@ +pkgbase = github-copilot-cli + pkgdesc = A CLI experience for letting GitHub Copilot help you on the command line + pkgver = 0.1.29 + pkgrel = 1 + url = https://githubnext.com/projects/copilot-cli/ + arch = any + license = none + makedepends = npm + makedepends = jq + noextract = github-copilot-cli-0.1.29.tgz + source = https://registry.npmjs.org/@githubnext/github-copilot-cli/-/github-copilot-cli-0.1.29.tgz + sha256sums = db29c3ac63393604d254bb1060e28700a0815a1d052879a944c60263fc9b49d8 + +pkgname = github-copilot-cli diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..10ccfa95203b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,29 @@ +# Maintainer: JP-Ellis <josh@jpellis.me> +pkgname=github-copilot-cli +_pkgname="@githubnext/$pkgname" +pkgver=0.1.29 +pkgrel=1 +pkgdesc="A CLI experience for letting GitHub Copilot help you on the command line" +arch=('any') +url="https://githubnext.com/projects/copilot-cli/" +license=('none') +makedepends=('npm' 'jq') +source=("https://registry.npmjs.org/${_pkgname}/-/$pkgname-$pkgver.tgz") +sha256sums=('db29c3ac63393604d254bb1060e28700a0815a1d052879a944c60263fc9b49d8') +noextract=("${pkgname}-${pkgver}.tgz") + +package() { + npm install -g --cache "${srcdir}/npm-cache" --prefix "${pkgdir}/usr" "${srcdir}/${pkgname}-${pkgver}.tgz" + + msg2 "Fixing file ownership" + chown -R root:root "${pkgdir}" + + msg2 "Removing references to srcdir" + find "$pkgdir" -name package.json -print0 | xargs -r -0 sed -i '/_where/d' + + local tmppackage="$(mktemp)" + local pkgjson="$pkgdir/usr/lib/node_modules/${_pkgname}/package.json" + jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage" + mv "$tmppackage" "$pkgjson" + chmod 644 "$pkgjson" +} |