summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlynx Zhou2019-10-27 23:13:58 +0800
committerAlynx Zhou2019-10-27 23:13:58 +0800
commit7ad7d8a998262b28b8141ebaa1317157ae509838 (patch)
tree05947bade674867f5d14ae328a03cf43793a24d1
parentaaad3d66cc26b0315d2d89fe2db81e0ba651a684 (diff)
downloadaur-7ad7d8a998262b28b8141ebaa1317157ae509838.tar.gz
Updated string and variable format.
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD32
2 files changed, 17 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9eee3987a3fe..a65ba9656ce5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index 832de4c9d2c5..28f00e514561 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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"
}