archrelease: copy trunk to community-any
[ArchLinux/community.git] / ts-node / trunk / PKGBUILD
blobdf3f2eff042990bd69031ea54ed8408a1feecb45
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Bruno Galeotti <bgaleotti at gmail dot com>
4 pkgname=ts-node
5 pkgver=10.9.1
6 pkgrel=1
7 pkgdesc="TypeScript execution and REPL for node.js, with source map support"
8 arch=('any')
9 url="https://github.com/TypeStrong/ts-node"
10 license=('MIT')
11 depends=('nodejs' 'typescript')
12 makedepends=('npm')
13 source=(https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz)
14 noextract=($pkgname-$pkgver.tgz)
15 sha512sums=('36d572b153e4c71af0146514c466217eec7c93bf29401dc9a9805794b45981d194a933b9c14fd4c87a29e69ef48846c6841eeae4a9a26625346372a526b49c13')
17 package() {
18   npm install -g --prefix "$pkgdir"/usr "$srcdir"/$pkgname-$pkgver.tgz
20   # Non-deterministic race in npm gives 777 permissions to random directories.
21   # See https://github.com/npm/npm/issues/9359 for details.
22   chmod -R u=rwX,go=rX "$pkgdir"
24   # npm installs package.json owned by build user
25   # https://bugs.archlinux.org/task/63396
26   chown -R root:root "$pkgdir"
28   # Dedup typescript
29   rm -r "$pkgdir"/usr/lib/node_modules/ts-node/node_modules/{typescript,.bin/{tsc,tsserver}}
32 # vim:set ts=2 sw=2 et: