diff options
author | Oskar Carl | 2019-07-06 13:52:17 +0200 |
---|---|---|
committer | Oskar Carl | 2019-07-06 13:52:17 +0200 |
commit | 42e86e6a2aab3b0010742abd32db93b3a9398c80 (patch) | |
tree | 9e060250c6672b56d71d1ea89134b6fac32facc4 | |
parent | 455db3baa3088b738da5b4c3272daa1815a1a680 (diff) | |
download | aur-42e86e6a2aab3b0010742abd32db93b3a9398c80.tar.gz |
fix dependencies, remove unwanted paths in the package
-rw-r--r-- | .SRCINFO | 1 | ||||
-rw-r--r-- | PKGBUILD | 8 |
2 files changed, 8 insertions, 1 deletions
@@ -6,6 +6,7 @@ pkgbase = fyrlang arch = any license = BSD makedepends = npm + makedepends = jq depends = nodejs depends = gcc source = https://registry.npmjs.org/fyrlang/-/fyrlang-0.1.4.tgz @@ -8,17 +8,21 @@ arch=('any') url="https://github.com/vs-ude/fyr" license=('BSD') depends=('nodejs' 'gcc') -makedepends=('npm') +makedepends=('npm' 'jq') source=("https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz") sha256sums=('6ba62ad3035a4b27176fd4d36081148c767f970deff9734bcc69032a28e38207') package() { + # install production dependencies; this will also recompile the runtime using gcc npm install -g --user root --prefix "$pkgdir"/usr "$srcdir"/$pkgname-$pkgver.tgz # Non-deterministic race in npm gives 777 permissions to random directories. # See https://github.com/npm/npm/issues/9359 for details. find "${pkgdir}"/usr -type d -exec chmod 755 {} + + # Remove references to $pkgdir + find "$pkgdir" -name package.json -print0 | xargs -r -0 sed -i '/_where/d' + # Remove references to $srcdir local tmppackage="$(mktemp)" local pkgjson="$pkgdir/usr/lib/node_modules/$pkgname/package.json" @@ -26,8 +30,10 @@ package() { mv "$tmppackage" "$pkgjson" chmod 644 "$pkgjson" + # install the license, as it is recommended for BSD install -Dm644 "$srcdir/package/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md" + # link the fyrc binary to amke it accessible mkdir -p "${pkgdir}/usr/bin/" ln -s "/usr/lib/node_modules/$pkgname/bin/fyrc" "${pkgdir}/usr/bin/fyrc" } |