diff options
author | Dimitris Kiziridis | 2020-03-24 10:29:11 +0200 |
---|---|---|
committer | Dimitris Kiziridis | 2020-03-24 10:29:11 +0200 |
commit | aa08356af8e7a956e9ef61f4f614a9f7927b0843 (patch) | |
tree | 1c58f1ccf876337b162b5a6df5675402240b397a /PKGBUILD | |
download | aur-aa08356af8e7a956e9ef61f4f614a9f7927b0843.tar.gz |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..2e31f5b1de80 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,25 @@ +# Maintainer: Dimitris Kiziridis <ragouel at outlook dot com> + +pkgname=legit +pkgver=3.0.1 +pkgrel=1 +pkgdesc="Add licenses to projects at the command line" +arch=('any') +url='https://github.com/captainsafia/legit' +license=('MIT') +makedepends=('npm') +noextract=("v${pkgver}.tar.gz") +source=("${url}/archive/v${pkgver}.tar.gz") +md5sums=('3954bd2dd6cd78c070716788a10cb633') + +package() { + npm install -g --user root --prefix "${pkgdir}/usr" "${srcdir}/v${pkgver}.tar.gz" + find "$pkgdir" -name package.json -print0 | xargs -r -0 sed -i '/_where/d' + find "${pkgdir}/usr" -type d -exec chmod 755 {} + + local tmppackage="$(mktemp)" + local pkgjson="$pkgdir/usr/lib/node_modules/@captainsafia/$pkgname/package.json" + jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage" + mv "$tmppackage" "$pkgjson" + chmod 644 "$pkgjson" + chown -R root:root "${pkgdir}" +}
\ No newline at end of file |