diff options
author | Alynx Zhou | 2019-10-27 17:05:17 +0800 |
---|---|---|
committer | Alynx Zhou | 2019-10-27 17:05:17 +0800 |
commit | aaad3d66cc26b0315d2d89fe2db81e0ba651a684 (patch) | |
tree | b1f6c45f4a4fb4907272711744be53353febc400 | |
parent | a3aa3a36adb4a019e1b9f2d5d20f1bfcb8027ca8 (diff) | |
download | aur-aaad3d66cc26b0315d2d89fe2db81e0ba651a684.tar.gz |
Updated PKGBUILD.
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 13 |
2 files changed, 13 insertions, 3 deletions
@@ -1,11 +1,12 @@ pkgbase = hikarujs pkgdesc = A static site generator that generates routes based on directories naturally. pkgver = 1.0.11 - pkgrel = 3 + pkgrel = 4 url = https://hikaru.alynx.moe/ arch = any license = Apache makedepends = npm + makedepends = jq depends = nodejs noextract = hikarujs-1.0.11.tgz source = https://registry.npmjs.org/hikarujs/-/hikarujs-1.0.11.tgz @@ -2,13 +2,13 @@ pkgname=hikarujs pkgver=1.0.11 -pkgrel=3 +pkgrel=4 pkgdesc='A static site generator that generates routes based on directories naturally.' arch=('any') url='https://hikaru.alynx.moe/' license=('Apache') depends=('nodejs') -makedepends=('npm') +makedepends=('npm' 'jq') source=("https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz") noextract=("$pkgname-$pkgver.tgz") sha512sums=('d273887454904061112d4e28fcf9ac9a65d07ea8d54fbcaa6ec8f853e461c234ed134cb0a917133996cf6af24ee2156f65c9b026d989ba027f053b43ea6adb7f') @@ -17,10 +17,19 @@ package() { npm install \ --user root --global \ --prefix "$pkgdir/usr" \ + --cache "${srcdir}/npm-cache" \ + --loglevel=error \ "$srcdir"/$pkgname-$pkgver.tgz 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" + find "${pkgdir}"/usr -type d -exec chmod 755 {} + + chown -R root:root "$pkgdir" install -Dm0644 \ "$pkgdir/usr/lib/node_modules/$pkgname/LICENSE" \ |