summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames An2015-11-28 01:47:55 -0500
committerJames An2015-11-28 01:47:55 -0500
commit278cdc4358e6d6d09f367ceedf6754c66c81823b (patch)
tree0f699ad3ab861996c413b0c1649f151c3e3075f6
downloadaur-278cdc4358e6d6d09f367ceedf6754c66c81823b.tar.gz
Initial commit with fully functional PKGBUILD and derived bash completion script.
-rw-r--r--.SRCINFO19
-rw-r--r--.gitignore27
-rw-r--r--PKGBUILD37
-rw-r--r--bash-completion32
4 files changed, 115 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..202557b6ab4d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = nodejs-profitbricks-cli
+ pkgdesc = ProfitBricks Cross Platform Command Line tool
+ pkgver = 1.1.1.r1.g2c4535b
+ pkgrel = 1
+ url = https://github.com/profitbricks/profitbricks-cli
+ arch = any
+ license = Apache
+ makedepends = git
+ makedepends = npm
+ depends = nodejs
+ provides = profitbricks-cli=1.1.1.r1.g2c4535b
+ conflicts = profitbricks-cli
+ source = profitbricks-cli::git+https://github.com/profitbricks/profitbricks-cli.git
+ source = bash-completion
+ md5sums = SKIP
+ md5sums = 657152bc10770c22c3cf696bf02bb962
+
+pkgname = nodejs-profitbricks-cli
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..43316bc3c124
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,27 @@
+# From: https://github.com/github/gitignore/blob/master/ArchLinuxPackages.gitignore
+
+*.tar
+*.tar.*
+*.zip
+*.tgz
+*.log
+*.log.*
+*.sig
+
+# makepkg working folders
+pkg
+src
+
+#
+# Additional ignore patterns:
+#
+
+# Source files
+*.deb
+*.gem
+*.out
+*.rpm
+*.html
+
+# Ignore package source folders
+*/*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3cb0774c5228
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: James An <james@jamesan.ca>
+
+_pkgname=profitbricks-cli
+pkgname="nodejs-$_pkgname"
+pkgver=1.1.1.r1.g2c4535b
+pkgrel=1
+pkgdesc="ProfitBricks Cross Platform Command Line tool"
+arch=('any')
+url="https://github.com/profitbricks/$_pkgname"
+license=('Apache')
+depends=('nodejs')
+makedepends=('git' '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)"
+ #~ )
+#~ }
+
+package() {
+ install -Dm644 bash-completion "$pkgdir/usr/share/bash-completion/completion/profitbricks"
+ install -dm755 "$pkgdir/usr/lib/node_modules"
+
+ cd "$pkgdir/usr/lib/node_modules"
+ npm install -g --prefix "$pkgdir/usr" $srcdir/$_pkgname
+}
diff --git a/bash-completion b/bash-completion
new file mode 100644
index 000000000000..0621608c13f0
--- /dev/null
+++ b/bash-completion
@@ -0,0 +1,32 @@
+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