archrelease: copy trunk to community-any
[arch-community.git] / coffeescript / trunk / PKGBUILD
blobdcd3da9d4438047c56d51ba30988af016aaa7acc
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: sloppybench <sloppybench@eml.cc>
3 # Contributor: der_FeniX <derfenix@gmail.com>
4 # Contributor: Anatol Pomozov <anatol.pomozov@gmail.com>
5 # Contributor: Gordin <9ordin @t gmail dot com>
6 # Contributor: Simon Lipp <aur@simon.lipp.name>
7 # Contributor: Chris Bolton <http://scr.im/chris-kun>
8 # Contributor: Sergei Lebedev <superbobry at gmail dot com>
9 # Contributor: flying sheep <flying-sheep@web.de>
11 pkgname=coffeescript
12 pkgver=2.7.0
13 pkgrel=1
14 pkgdesc='CoffeeScript is a little language that compiles into JavaScript'
15 arch=('any')
16 url='https://coffeescript.org'
17 license=('MIT')
18 depends=('nodejs')
19 makedepends=('npm')
20 provides=("coffee-script=$pkgver")
21 conflicts=('coffee-script')
22 replaces=('coffee-script')
23 source=("https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz")
24 noextract=("$pkgname-$pkgver.tgz")
25 sha512sums=('8735a9e93504d9dfe309c37aecbad6d5e8796ffad20ca40aea80fa54c2e582061551415ec604c7f73ddd3588a1cd7e11321cdee454d4b1498e5d5889285411fc')
27 package() {
28   npm install -g --prefix "$pkgdir"/usr "$srcdir"/$pkgname-$pkgver.tgz
30   # Non-deterministic race in npm gives 777 permissions to random directories.
31   # See https://github.com/npm/npm/issues/9359 for details.
32   chmod -R u=rwX,go=rX "$pkgdir"
34   # npm installs package.json owned by build user
35   # https://bugs.archlinux.org/task/63396
36   chown -R root:root "$pkgdir"
38   mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
39   ln -s "../../../lib/node_modules/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/"