summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO12
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD52
3 files changed, 23 insertions, 45 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c17650c744e7..ad43b28957e2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,14 @@
pkgbase = nodejs-triton
- pkgdesc = triton is a CLI tool for working with the CloudAPI for Joyent's Triton Public Cloud and Private Cloud
- pkgver = 7.3.0
+ pkgdesc = Triton client tool and node.js library
+ pkgver = 7.15.1
pkgrel = 1
url = https://github.com/joyent/node-triton
arch = any
license = MPL
makedepends = npm
- makedepends = jq
depends = nodejs
- noextract = nodejs-triton-7.3.0.tar.gz
- source = nodejs-triton-7.3.0.tar.gz::https://github.com/joyent/node-triton/archive/7.3.0.tar.gz
- sha256sums = b7e9b6be5e30474263e462c2e44169de32848b83a1fd4694e1e5887f087704d7
+ noextract = triton-7.15.1.tgz
+ source = https://registry.npmjs.org/triton/-/triton-7.15.1.tgz
+ sha256sums = e325641d2ba183c484597e196ee74ecf67e6a0bcb459dd7ef49d23c509eec984
pkgname = nodejs-triton
-
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 93f5d9f2777e..000000000000
--- a/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-pkg/
-src/
-*.tar.gz
-*.tar.xz
diff --git a/PKGBUILD b/PKGBUILD
index 3663699a0a72..21dd8aecdc5a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,47 +1,31 @@
-# Maintainer: Sam Whited <sam@samwhited.com>
+# Maintainer: Yufan You <ouuansteve at gmail>
+# Contributor: Sam Whited <sam@samwhited.com>
# Contributor: j605
_npmname=triton
-pkgname=nodejs-$_npmname
-pkgver=7.3.0
+pkgname=nodejs-triton
+pkgver=7.15.1
pkgrel=1
-pkgdesc="triton is a CLI tool for working with the CloudAPI for Joyent's Triton Public Cloud and Private Cloud"
+pkgdesc="Triton client tool and node.js library"
arch=('any')
url="https://github.com/joyent/node-triton"
license=('MPL')
depends=('nodejs')
-makedepends=('npm' 'jq')
-source=($pkgname-$pkgver.tar.gz::"https://github.com/joyent/node-triton/archive/$pkgver.tar.gz")
-noextract=("$pkgname-$pkgver.tar.gz")
-sha256sums=('b7e9b6be5e30474263e462c2e44169de32848b83a1fd4694e1e5887f087704d7')
+makedepends=('npm')
+source=(https://registry.npmjs.org/$_npmname/-/$_npmname-$pkgver.tgz)
+noextract=($_npmname-$pkgver.tgz)
+sha256sums=('e325641d2ba183c484597e196ee74ecf67e6a0bcb459dd7ef49d23c509eec984')
package() {
- npm install --cache "${srcdir}"/npm-cache --no-optional -g --user root --prefix "$pkgdir/usr" "$srcdir/$pkgname-$pkgver.tar.gz"
+ cd "$srcdir"
+ local _npmdir="$pkgdir/usr/lib/node_modules/"
+ mkdir -p "$_npmdir"
+ cd "$_npmdir"
+ npm install -g --prefix "$pkgdir/usr" "$srcdir/$_npmname-$pkgver.tgz"
- install -dm755 "${pkgdir}"/etc/bash_completion.d
- "${pkgdir}"/usr/bin/triton completion > "${pkgdir}"/etc/bash_completion.d/triton
+ # Remove the files that contain references to $pkgdir
+ rm "$pkgdir/usr/lib/node_modules/$_npmname/node_modules/dtrace-provider/build/Makefile"
+ rm "$pkgdir/usr/lib/node_modules/$_npmname/node_modules/dtrace-provider/build/config.gypi"
- # Non-deterministic race in npm gives 777 permissions to random directories.
- # See https://github.com/npm/npm/issues/9359 for details.
- find "${pkgdir}"/usr -type d -exec chmod 755 {} +
- chown -R root:root "${pkgdir}"
-
- # Remove references to $pkgdir
- find "$pkgdir" -type f -name package.json -print0 | xargs -0 sed -i '/_where/d'
- for pkgjson in `find "$pkgdir" -type f -name package.json`; do
- local tmppackage="$(mktemp)"
- jq '.|=with_entries(select(.key|test("man")|not))' "$pkgjson" > "$tmppackage"
- mv "$tmppackage" "$pkgjson"
- chmod 644 "$pkgjson"
- done
-
- # Remove references to $srcdir
- for pkgjson in `find "$pkgdir" -type f -name package.json`; do
- local tmppackage="$(mktemp)"
- jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage"
- mv "$tmppackage" "$pkgjson"
- chmod 644 "$pkgjson"
- done
+ chown -R root:root "${pkgdir}"
}
-
-# vim: ts=2 sw=2 et: