diff options
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | .gitignore | 57 | ||||
-rw-r--r-- | PKGBUILD | 30 |
3 files changed, 103 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..4b0bbba50249 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = codestats-cli + pkgdesc = A command utility to view your stats from Code::Stats + pkgver = 1.0.2 + pkgrel = 1 + url = https://gitlab.com/code-stats/codestats-cli + arch = any + license = MIT + makedepends = npm + makedepends = jq + depends = nodejs + noextract = codestats-cli-1.0.2.tgz + source = https://registry.npmjs.org/codestats-cli/-/codestats-cli-1.0.2.tgz + sha256sums = 37f3bd3db2ac0f7f17c1252a598c3d6894c8fe967119befb8e12958c6f35f6d1 + +pkgname = codestats-cli + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..14fdf1e39021 --- /dev/null +++ b/.gitignore @@ -0,0 +1,57 @@ +### https://raw.github.com/github/gitignore/475f63beb5815372181a0c93262517cd2a05214e/Global/Linux.gitignore + +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + + +### https://raw.github.com/github/gitignore/475f63beb5815372181a0c93262517cd2a05214e/Global/Vim.gitignore + +# Swap +[._]*.s[a-v][a-z] +!*.svg # comment out if you don't need vector files +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim +Sessionx.vim + +# Temporary +.netrwhist +*~ +# Auto-generated tag files +tags +# Persistent undo +[._]*.un~ + + +### https://raw.github.com/github/gitignore/475f63beb5815372181a0c93262517cd2a05214e/ArchLinuxPackages.gitignore + +*.tar +*.tar.* +*.jar +*.exe +*.msi +*.zip +*.tgz +*.log +*.log.* +*.sig + +pkg/ +src/ + + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..beab917034e8 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,30 @@ +# Maintainer: Zhanibek Adilbekov <zhanibek.adilbekov@pm.me> +pkgname=codestats-cli +pkgver=1.0.2 +pkgrel=1 +pkgdesc="A command utility to view your stats from Code::Stats" +arch=('any') +url="https://gitlab.com/code-stats/codestats-cli" +license=('MIT') +depends=('nodejs') +makedepends=('npm' 'jq') +source=( + "https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz") +noextract=("$pkgname-$pkgver.tgz") +sha256sums=('37f3bd3db2ac0f7f17c1252a598c3d6894c8fe967119befb8e12958c6f35f6d1') + +package() { + npm install -g --user root --prefix "$pkgdir/usr" "$srcdir/$pkgname-$pkgver.tgz" + find "$pkgdir/usr" -type d -exec chmod 755 {} + + chown -R root:root "${pkgdir}" + + # Remove references to $pkgdir + find "$pkgdir" -type f -name package.json -print0 | xargs -0 sed -i "/_where/d" + + # Remove references to $srcdir + 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" +} |