summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ef553af756e84d82bdd1fb07f89a3dc646c50b70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Maintainer: Micha Alt <micha.tucker at gmail dot com>

_npmname=broccoli-cli
pkgname=nodejs-$_npmname
pkgver=1.0.0
pkgrel=2
pkgdesc="Global CLI for broccoli.js"
arch=('any')
url="http://broccolijs.com/"
license=('MIT')
depends=('nodejs')
makedepends=('npm')
source=(https://registry.npmjs.org/$_npmname/-/$_npmname-$pkgver.tgz
       'LICENSE')
noextract=($_npmname-$pkgver.tgz)
md5sums=('173465398acd8664a30da24439ae6f08'
         '4741c206fc73f1a664bdadd0e4cef754')

package() {
  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

  cd "$srcdir"
  local _npmdir="$pkgdir/usr/lib/node_modules/"
  mkdir -p "$_npmdir"
  cd "$_npmdir"
  npm install --user root -g --prefix "$pkgdir/usr" $_npmname@$pkgver

  rmdir "${pkgdir}/usr/etc"
}