diff options
author | Alynx Zhou | 2019-10-27 23:13:58 +0800 |
---|---|---|
committer | Alynx Zhou | 2019-10-27 23:13:58 +0800 |
commit | 7ad7d8a998262b28b8141ebaa1317157ae509838 (patch) | |
tree | 05947bade674867f5d14ae328a03cf43793a24d1 | |
parent | aaad3d66cc26b0315d2d89fe2db81e0ba651a684 (diff) | |
download | aur-7ad7d8a998262b28b8141ebaa1317157ae509838.tar.gz |
Updated string and variable format.
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 32 |
2 files changed, 17 insertions, 17 deletions
@@ -1,7 +1,7 @@ pkgbase = hikarujs pkgdesc = A static site generator that generates routes based on directories naturally. pkgver = 1.0.11 - pkgrel = 4 + pkgrel = 5 url = https://hikaru.alynx.moe/ arch = any license = Apache @@ -2,37 +2,37 @@ pkgname=hikarujs pkgver=1.0.11 -pkgrel=4 +pkgrel=5 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' 'jq') -source=("https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz") -noextract=("$pkgname-$pkgver.tgz") +source=("https://registry.npmjs.org/${pkgname}/-/${pkgname}-${pkgver}.tgz") +noextract=("${pkgname}-${pkgver}.tgz") sha512sums=('d273887454904061112d4e28fcf9ac9a65d07ea8d54fbcaa6ec8f853e461c234ed134cb0a917133996cf6af24ee2156f65c9b026d989ba027f053b43ea6adb7f') package() { npm install \ --user root --global \ - --prefix "$pkgdir/usr" \ - --cache "${srcdir}/npm-cache" \ + --prefix "${pkgdir}/usr" \ + --cache "${srcdir}/.npm" \ --loglevel=error \ - "$srcdir"/$pkgname-$pkgver.tgz + "${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}" -name package.json -print0 | xargs -r -0 sed -i '/_where/d' + local tmpjson="$(mktemp)" + local pkgjson="${pkgdir}/usr/lib/node_modules/${pkgname}/package.json" + jq '.|=with_entries(select(.key|test("_.+")|not))' "${pkgjson}" > "${tmpjson}" + mv "${tmpjson}" "${pkgjson}" + chmod 0644 "${pkgjson}" - find "${pkgdir}"/usr -type d -exec chmod 755 {} + - chown -R root:root "$pkgdir" + find "${pkgdir}/usr" -type d -exec chmod 0755 {} + + chown -R root:root "${pkgdir}" install -Dm0644 \ - "$pkgdir/usr/lib/node_modules/$pkgname/LICENSE" \ - "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + "${pkgdir}/usr/lib/node_modules/${pkgname}/LICENSE" \ + "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } |