summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJagannathan Tiruvallur Eachambadi2018-04-12 15:59:48 +0200
committerJagannathan Tiruvallur Eachambadi2018-04-12 15:59:48 +0200
commitee0079857ed62320a0290aeada9b7f7107397854 (patch)
treec2012771e46df0f5161ce09f7cd3db0697cb3b34 /PKGBUILD
parent26c6b98bd50fd069e32e9b963f523af5fb7d909c (diff)
downloadaur-ee0079857ed62320a0290aeada9b7f7107397854.tar.gz
updpkg: 5.10.0
Package now built properly from source and copied to the appropritate location in pkgdir. Bash completion is also generated.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD29
1 files changed, 20 insertions, 9 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 8e7e2826099a..48e34f9c2f0a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
_npmname=triton
pkgname=nodejs-$_npmname
-pkgver=5.8.0
+pkgver=5.10.0
pkgrel=1
pkgdesc="triton is a CLI tool for working with the CloudAPI for Joyent's Triton Public Cloud and Private Cloud"
arch=('any')
@@ -10,14 +10,25 @@ url="https://github.com/joyent/node-triton"
license=('MPL')
depends=('nodejs')
makedepends=('npm')
-options=('!emptydirs')
-source=(http://registry.npmjs.org/$_npmname/-/$_npmname-$pkgver.tgz)
-noextract=($_npmname-$pkgver.tgz)
-md5sums=('010e7415ea776c04c0658091ef090f28')
+source=($pkgname-$pkgver.tar.gz::"https://github.com/joyent/node-triton/archive/$pkgver.tar.gz")
+md5sums=('33a08d8f50b50a0c9b0fb8da1057174d')
+
+build() {
+ cd node-$_npmname-$pkgver
+ npm install --no-optional
+}
package() {
- local _npmdir="$pkgdir/usr/lib/node_modules/"
- mkdir -p $_npmdir
- cd $_npmdir
- npm install -g --user root --prefix "$pkgdir/usr" $_npmname@$pkgver
+ cd node-$_npmname-$pkgver
+
+ mkdir -p "${pkgdir}"/usr/{bin,lib/node_modules/triton/}
+ cp -r * "${pkgdir}"/usr/lib/node_modules/triton/
+
+ mkdir -p "${pkgdir}"/etc/bash_completion.d
+ ./bin/triton completion > "${pkgdir}"/etc/bash_completion.d/triton
+
+ # security issue (see wiki)
+ find "${pkgdir}"/usr -type d -exec chmod 755 {} +
+
+ ln -s ../lib/node_modules/triton/bin/triton "${pkgdir}"/usr/bin/triton
}