1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Maintainer: Daniel M. Capella <polyzen@archlinux.org>
7 pkgdesc='An AST-based pattern checker for JavaScript'
9 url='https://eslint.org'
11 depends=('acorn' 'nodejs')
12 makedepends=('npm' 'rsync')
13 options=('!emptydirs')
14 source=("https://github.com/$pkgname/$pkgname/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
15 b2sums=('a2fd5cfba9ce6d4415038095374c27e40516c3c59b9cd67073e75916eec31aa31a3f63f451e40371db64336e700f531ffce9f49ba79ec862d9ce389e0c96e816')
30 npm prune --production
32 local _npmdir=/usr/lib/node_modules/$pkgname
33 install -d "$pkgdir"/usr/bin
34 ln -s $_npmdir/bin/$pkgname.js "$pkgdir"/usr/bin/$pkgname
35 install -Dt "$pkgdir"/$_npmdir/bin bin/$pkgname.js
36 rsync -r --exclude .cache --exclude .package-lock.json conf lib messages \
37 node_modules package.json "$pkgdir"/$_npmdir
38 install -Dm644 -t "$pkgdir"/usr/share/doc/$pkgname README.md
39 install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE
42 rm -r "$pkgdir"/$_npmdir/node_modules/acorn