semver: import as npm new dependency

This commit is contained in:
Jeff Huang 2018-01-09 03:06:09 +00:00
parent 6733254e45
commit 5fd6f8848c

23
semver/PKGBUILD Normal file
View File

@ -0,0 +1,23 @@
# Contribution from Arch:
# Maintainer: Felix Yan <felixonmars@archlinux.org>
pkgname=semver
pkgver=5.4.1
pkgrel=1
pkgdesc='The semantic version parser used by npm.'
arch=('any')
url='https://github.com/npm/node-semver'
license=('ISC')
depends=('nodejs')
makedepends=('npm')
source=(https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz)
noextract=($pkgname-$pkgver.tgz)
sha512sums=('59f1bf5fdfa801387cd57b65948a3f23c80e898f445d176fd5c41dcb291e5cad7b61c516dc45d4022d93a38a5c1fa9d9b493ebed93a933938cc962599bef11b2')
package() {
npm install -g --user root --prefix "$pkgdir"/usr "$srcdir"/$pkgname-$pkgver.tgz
rm -r "$pkgdir"/usr/etc
install -d "$pkgdir"/usr/share/licenses/$pkgname
ln -s ../../../lib/node_modules/$pkgname/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}