summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPellegrino Prevete2023-06-28 18:18:06 +0200
committerPellegrino Prevete2023-06-28 18:18:06 +0200
commitbfd3da0bfedf5751cdf264d4f5d19ee087f72bd8 (patch)
tree34462cbf88de6281a507a8e6aac51ead73e4714b
downloadaur-bfd3da0bfedf5751cdf264d4f5d19ee087f72bd8.tar.gz
initial release
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD62
2 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..eb64af7afb02
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = typescript-git
+ pkgdesc = JavaScript with syntax for types
+ pkgver = 5.1.5+6696ecd37
+ pkgrel = 1
+ url = http://www.typescriptlang.org
+ arch = any
+ license = Apache
+ makedepends = npm
+ makedepends = rsync
+ depends = nodejs
+ provides = typescript
+ conflicts = typescript
+ source = git+https://github.com/microsoft/TypeScript
+ b2sums = SKIP
+
+pkgname = typescript-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..445f2165fce1
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,62 @@
+# Maintainer: Pellegrino Prevete (tallero) <pellegrinoprevete@gmail.com>
+# Contributor: Felix Yan <felixonmars@archlinux.org>
+# Contributor: Daniel M. Capella <polyzen@archlinux.org>
+# Contributor: Bruno Galeotti <bgaleotti at gmail dot com>
+
+_name=TypeScript
+_pkgname=typescript
+pkgname="${_pkgname}-git"
+pkgver=5.1.5+6696ecd37
+pkgrel=1
+pkgdesc='JavaScript with syntax for types'
+arch=('any')
+url="http://www.${_pkgname}lang.org"
+license=('Apache')
+depends=('nodejs')
+makedepends=(
+ 'npm'
+ 'rsync')
+provides=("${_pkgname}")
+conflicts=("${_pkgname}")
+source=(
+ # This source tree is very large
+ "git+https://github.com/microsoft/${_name}"
+ # "git+ssh://git@github.com/microsoft/${_name}"
+ # "${_name}::git+file:///tmp/${_name}.git"
+ )
+b2sums=(
+ 'SKIP')
+
+pkgver() {
+ local _pkgver
+ cd "${_name}"
+ _pkgver="$(git describe --tags | sed 's/-/+/g')"
+ if [ "${_pkgver}" = "" ]; then
+ echo "${pkgver}+$(git describe --tags --always)"
+ fi
+}
+
+prepare() {
+ cd "${_name}"
+ npm ci
+}
+
+build() {
+ cd "${_name}"
+ npx hereby LKG
+}
+
+check() {
+ cd "${_name}"
+ npm run test
+}
+
+package() {
+ install -d "${pkgdir}/usr/"{bin,"lib/node_modules/${_pkgname}"}
+ ln -s "../lib/node_modules/${_pkgname}/bin/"{tsc,tsserver} "${pkgdir}/usr/bin"
+
+ cd "${_name}"
+ rsync -r --exclude .gitattributes README.md SECURITY.md bin lib package.json \
+ "${pkgdir}/usr/lib/node_modules/${_pkgname}"
+ install -Dt "${pkgdir}/usr/share/licenses/${_pkgname}" ThirdPartyNoticeText.txt
+}