summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorOskar Carl2019-07-06 13:52:17 +0200
committerOskar Carl2019-07-06 13:52:17 +0200
commit42e86e6a2aab3b0010742abd32db93b3a9398c80 (patch)
tree9e060250c6672b56d71d1ea89134b6fac32facc4
parent455db3baa3088b738da5b4c3272daa1815a1a680 (diff)
downloadaur-42e86e6a2aab3b0010742abd32db93b3a9398c80.tar.gz
fix dependencies, remove unwanted paths in the package
-rw-r--r--.SRCINFO1
-rw-r--r--PKGBUILD8
2 files changed, 8 insertions, 1 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e00ecfaee189..d721e661ffb3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index 23ab826f1064..bdc751b967b4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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"
}