summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames An2018-03-17 19:55:11 -0400
committerJames An2018-03-17 19:55:11 -0400
commita3ddd63f6a061555bda5541367b1be2cd785320a (patch)
tree6dd09cd8c803bec2cd688320d134cb2012913f82
parent278cdc4358e6d6d09f367ceedf6754c66c81823b (diff)
downloadaur-a3ddd63f6a061555bda5541367b1be2cd785320a.tar.gz
Updated to latest upstream release and changed upstream source to use the official public npm registry.
Changed package to use a packaged release rather than VCS source. Removed separate shell autocompletion file and replaced it with the upstream equivalent.
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD39
-rw-r--r--bash-completion32
3 files changed, 22 insertions, 64 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 202557b6ab4d..4774564304e2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,18 @@
pkgbase = nodejs-profitbricks-cli
pkgdesc = ProfitBricks Cross Platform Command Line tool
- pkgver = 1.1.1.r1.g2c4535b
+ pkgver = 4.1.0
pkgrel = 1
- url = https://github.com/profitbricks/profitbricks-cli
+ url = https://devops.profitbricks.com/tools/cli/
arch = any
license = Apache
- makedepends = git
makedepends = npm
depends = nodejs
- provides = profitbricks-cli=1.1.1.r1.g2c4535b
+ provides = profitbricks-cli=4.1.0
conflicts = profitbricks-cli
- source = profitbricks-cli::git+https://github.com/profitbricks/profitbricks-cli.git
- source = bash-completion
- md5sums = SKIP
- md5sums = 657152bc10770c22c3cf696bf02bb962
+ noextract = profitbricks-cli-4.1.0.tgz
+ options = !emptydirs
+ source = http://registry.npmjs.org/profitbricks-cli/-/profitbricks-cli-4.1.0.tgz
+ md5sums = ffd80bb29cb15807f922bf31b7e8b1c9
pkgname = nodejs-profitbricks-cli
diff --git a/PKGBUILD b/PKGBUILD
index 3cb0774c5228..2efe49e4c491 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,37 +1,28 @@
# Maintainer: James An <james@jamesan.ca>
-_pkgname=profitbricks-cli
-pkgname="nodejs-$_pkgname"
-pkgver=1.1.1.r1.g2c4535b
+pkgname=nodejs-profitbricks-cli
+_pkgname=${pkgname#nodejs-}
+pkgver=4.1.0
pkgrel=1
pkgdesc="ProfitBricks Cross Platform Command Line tool"
arch=('any')
-url="https://github.com/profitbricks/$_pkgname"
+url="https://devops.profitbricks.com/tools/cli/"
license=('Apache')
depends=('nodejs')
-makedepends=('git' 'npm')
+makedepends=('npm')
provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname")
-source=(
- "$_pkgname"::"git+https://github.com/profitbricks/$_pkgname.git"
- bash-completion
-)
-md5sums=('SKIP'
- '657152bc10770c22c3cf696bf02bb962')
-
-#~ pkgver() {
- #~ cd "$_pkgname"
- #~ (
- #~ set -o pipefail
- #~ git describe --long --tag | sed -r 's/([^-]*-g)/r\1/;s/-/./g' ||
- #~ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
- #~ )
-#~ }
+options=(!emptydirs)
+source=("http://registry.npmjs.org/$_pkgname/-/$_pkgname-$pkgver.tgz")
+noextract=($_pkgname-$pkgver.tgz)
+md5sums=('ffd80bb29cb15807f922bf31b7e8b1c9')
package() {
- install -Dm644 bash-completion "$pkgdir/usr/share/bash-completion/completion/profitbricks"
- install -dm755 "$pkgdir/usr/lib/node_modules"
+ npm install -g $_pkgname-$pkgver.tgz --prefix "$pkgdir/usr"
+ # 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 {} +
- cd "$pkgdir/usr/lib/node_modules"
- npm install -g --prefix "$pkgdir/usr" $srcdir/$_pkgname
+ # Configure shell autocompletion.
+ install -Dm644 "$pkgdir/usr/lib/node_modules/$_pkgname/autocomplete" "$pkgdir/usr/share/bash-completion/completions/$_pkgname"
}
diff --git a/bash-completion b/bash-completion
deleted file mode 100644
index 0621608c13f0..000000000000
--- a/bash-completion
+++ /dev/null
@@ -1,32 +0,0 @@
-complete -W '
- -h --help
- -V --version
- setup datacenter server
- volume snapshot
- loadbalancer nic ipblock
- drives image lan
- list get show create
- delete update attach detach
- start stop reboot
- -i --id --datacenterid
- -n --name
- -l --location
- -d --description
- -p --path
- -r --ram
- -c --cores
- -a --availabilityzone
- --bootVolume --bootCdrom
- --volumeid --volumesize
- --volumename --imageid
- -b --bus
- -s --size
- --licencetype
- --cpuHotPlug --cpuHotUnplug
- --ramHotPlug --ramHotUnplug
- --nicHotPlug --nicHotUnplug
- --discVirtioHotPlug --discVirtioHotUnplug
- --discScsiHotPlug --discScsiHotUnplug
- --ip --dhcp --serverid --lan
- --public --json
- -f --force' profitbricks