blob: 2e2301521c67e357f98f47973d57dc5607ddff30 (
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
|
_npmnamespace=@simon04
_npmname=npm2arch
pkgname=nodejs-npm2arch
pkgver=2.2.0
pkgrel=1
pkgdesc="Convert NPM package to a PKGBUILD for ArchLinux"
arch=(any)
url="https://github.com/simon04/npm2arch"
license=(MIT)
depends=('nodejs' 'npm')
optdepends=()
source=(https://registry.npmjs.org/$_npmnamespace/$_npmname/-/$_npmname-$pkgver.tgz)
noextract=($_npmname-$pkgver.tgz)
sha1sums=('fa495483eac433f0e1310577bf18ed31858c2ce4')
package() {
cd $srcdir
local _npmdir="$pkgdir/usr/lib/node_modules/"
mkdir -p $_npmdir
cd $_npmdir
npm install -g --prefix "$pkgdir/usr" $_npmnamespace/$_npmname@$pkgver
find "${pkgdir}"/usr -name package.json -exec sed -i '/"_where"/d' '{}' '+'
find "${pkgdir}"/usr -type d -exec chmod 755 {} +
}
# vim:set ts=2 sw=2 et:
|