upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / typescript / trunk / PKGBUILD
blob73bc64e6e4e1653321db86e289caa40c4cd04d79
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Maintainer: Daniel M. Capella <polyzen@archlinux.org>
3 # Contributor: Bruno Galeotti <bgaleotti at gmail dot com>
5 _name=TypeScript
6 pkgname=typescript
7 pkgver=5.0.4
8 pkgrel=1
9 pkgdesc='JavaScript with syntax for types'
10 arch=('any')
11 url=http://www.typescriptlang.org
12 license=('Apache')
13 depends=('nodejs')
14 makedepends=('npm' 'rsync')
15 source=("https://github.com/microsoft/$_name/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
16 b2sums=('20565a208225fb9fcd5b5532296f94bf870b0452fb43c72a044e52e3a2e4a6f2af20119dbcb50f996c631ff87821c298c72fddd1289919f4463313c35b322049')
18 prepare() {
19   cd $_name-$pkgver
20   npm ci
23 build() {
24   cd $_name-$pkgver
25   npx hereby LKG
28 check() {
29   cd $_name-$pkgver
30   npm run test
33 package() {
34   install -d "$pkgdir"/usr/{bin,lib/node_modules/$pkgname}
35   ln -s ../lib/node_modules/$pkgname/bin/{tsc,tsserver} "$pkgdir"/usr/bin
37   cd $_name-$pkgver
38   rsync -r --exclude .gitattributes README.md SECURITY.md bin lib package.json \
39     "$pkgdir"/usr/lib/node_modules/$pkgname
40   install -Dt "$pkgdir"/usr/share/licenses/$pkgname ThirdPartyNoticeText.txt