summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 233222573cb3c062e50655125a5349ac38dc7e9f (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
31
# Maintainer ZhangHua <zhanghua.00@qq.com>
pkgname=nrm-git
pkgver=1.2.2_b3ba7aa
pkgrel=1
pkgdesc='NPM registry manager, fast switch between different registries: npm, cnpm, nj, taobao'
provides=(nrm)
url=https://github.com/Pana/nrm
licence=('MIT')
source=(git+https://github.com/Pana/nrm)
arch=("any")
depends=(nodejs)
makedepends=(yarn jq)
sha256sums=('SKIP')
pkgver(){
	cd ${srcdir}/nrm
	echo $(jq -r ".version" package.json)_$(git rev-parse --short HEAD)
}
build(){
	cd ${srcdir}/nrm
	yarn install
}
package(){
	cd ${srcdir}/nrm
	mkdir -p ${pkgdir}/usr/bin
	ln -s ../lib/node_modules/nrm/cli.js ${pkgdir}/usr/bin/nrm
	mkdir -p ${pkgdir}/usr/lib/node_modules/nrm
	for file in node_modules cli.js LICENSE package.json README.md registries.json
	do
		cp -r ${file} ${pkgdir}/usr/lib/node_modules/nrm/${file}
	done
}