Skip to content

Instantly share code, notes, and snippets.

@tetov tetov/PKGBUILD
Created Nov 10, 2019

Embed
What would you like to do?
Fix for build failure alex js
# Maintainer of this PKGBUILD file: Martino Pilia <martino.pilia@gmail.com>
_name=alex
pkgname=alexjs
pkgver=8.0.0
pkgrel=1
pkgdesc="Catch insensitive, inconsiderate writing"
arch=('any')
url="https://alexjs.com"
license=('MIT')
depends=('nodejs')
makedepends=('npm')
source=("https://registry.npmjs.org/$_name/-/$_name-$pkgver.tgz")
sha256sums=('2f7d7954af4742f98cb898dfac88d6667d8a70483bf5acc1e5377ee0b0730722')
package() {
npm install -g \
--user root \
--prefix "$pkgdir"/usr \
"$srcdir"/$_name-$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 {} +
# Solve conflict with the alex package (Haskell lexer generator)
# https://github.com/get-alex/alex/issues/83
mv "${pkgdir}"/usr/bin/alex "${pkgdir}"/usr/bin/alexjs
mv "${srcdir}"/package/license "${srcdir}"/package/LICENSE
install -D -m644 \
"${srcdir}/package/LICENSE" \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.