diff options
author | Charles Wise | 2019-03-25 15:36:59 +1300 |
---|---|---|
committer | Charles Wise | 2019-03-25 15:36:59 +1300 |
commit | a9c7095538d2cb8d48f448a649c237019e44bfcb (patch) | |
tree | 6ced254d7d0b3590d4debd82eeed973a09713e78 | |
parent | 812af299cddbdf64f4269c54a384a0a3df1b6483 (diff) | |
download | aur-a9c7095538d2cb8d48f448a649c237019e44bfcb.tar.gz |
Update to 2.1.2
-rw-r--r-- | .SRCINFO | 34 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rw-r--r-- | enum34-extra-requires.patch | 65 | ||||
-rw-r--r-- | linode-cli.install | 3 |
4 files changed, 111 insertions, 31 deletions
@@ -1,19 +1,27 @@ pkgbase = linode-cli - pkgdesc = A simple command-line interface to the Linode platform - pkgver = 1.4.7 - pkgrel = 2 - url = https://github.com/linode/cli + pkgdesc = Linode API wrapper + pkgver = 2.1.2 + pkgrel = 1 + url = https://github.com/linode/linode-cli install = linode-cli.install arch = any - license = GPL2 - depends = perl-try-tiny - depends = perl-libwww - depends = perl-json - depends = perl-crypt-ssleay - depends = perl-mozilla-ca - depends = perl-webservice-linode - source = https://github.com/linode/cli/archive/v1.4.7.zip - sha256sums = 776a7df7eb4e595fb246b9482c3de2661ec7ff11b35156c870e78ca49ce38c07 + license = BSD + makedepends = python-wheel + makedepends = python2-wheel + depends = python-colorclass + depends = python2-colorclass + depends = python-terminaltables + depends = python2-terminaltables + depends = python-requests + depends = python2-requests + depends = python-yaml + depends = python2-yaml + depends = python2-enum34 + replaces = linode-cli-dev + source = linode-cli-2.1.2.tar.gz::https://github.com/linode/linode-cli/archive/2.1.2.tar.gz + source = enum34-extra-requires.patch + sha256sums = 63df028a49d90ce4b6f371c36cab7f59cfbc37e0f4872a910432a1b6debf9eb0 + sha256sums = 3c05e163748ec607c3f6d62587e04911af2e593e25635c7acef39cd2d03f9f2e pkgname = linode-cli @@ -1,27 +1,33 @@ -# Maintainer: Slithery <aur at slithery dot uk> -# Contributor: Zack Buhman <zbuhman@linode.com> -# Contributor: Graham Edgecombe <graham@grahamedgecombe.com> +# Maintainer: Morgenstern <charles [at] charlesbwise [dot] com> pkgname=linode-cli -pkgver=1.4.7 -pkgrel=2 -pkgdesc='A simple command-line interface to the Linode platform' -url='https://github.com/linode/cli' -license=('GPL2') +pkgver=2.1.2 +pkgrel=1 +pkgdesc='Linode API wrapper' +url='https://github.com/linode/linode-cli' arch=('any') -depends=('perl-try-tiny' 'perl-libwww' 'perl-json' 'perl-crypt-ssleay' - 'perl-mozilla-ca' 'perl-webservice-linode') +license=('BSD') +makedepends=('python-wheel' 'python2-wheel') +depends=('python-colorclass' 'python2-colorclass' 'python-terminaltables' 'python2-terminaltables' 'python-requests' 'python2-requests' 'python-yaml' 'python2-yaml' 'python2-enum34') +replaces=('linode-cli-dev') install=linode-cli.install -source=("$url"/archive/v"$pkgver".zip) -sha256sums=('776a7df7eb4e595fb246b9482c3de2661ec7ff11b35156c870e78ca49ce38c07') +source=("${pkgname}-${pkgver}.tar.gz::https://github.com/linode/linode-cli/archive/${pkgver}.tar.gz" + enum34-extra-requires.patch) +sha256sums=('63df028a49d90ce4b6f371c36cab7f59cfbc37e0f4872a910432a1b6debf9eb0' + '3c05e163748ec607c3f6d62587e04911af2e593e25635c7acef39cd2d03f9f2e') + +prepare() { + cd "$srcdir/$pkgname-$pkgver" + patch --strip=2 --input="${srcdir}/enum34-extra-requires.patch" +} build() { - cd "cli-$pkgver" - PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor - make + cd "$srcdir/$pkgname-$pkgver" + make build } package() { - cd "cli-$pkgver" - make install DESTDIR="$pkgdir" + cd "$srcdir/$pkgname-$pkgver" + python setup.py install --root="$pkgdir/" --optimize=1 --skip-build + install -Dm644 "$srcdir"/"$pkgname"-"$pkgver"/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } diff --git a/enum34-extra-requires.patch b/enum34-extra-requires.patch new file mode 100644 index 000000000000..2f4a2b1e1100 --- /dev/null +++ b/enum34-extra-requires.patch @@ -0,0 +1,65 @@ +diff --unified --recursive --text package.orig/linode-cli-2.1.2/Makefile package.new/linode-cli-2.1.2/Makefile +--- package.orig/linode-cli-2.1.2/Makefile 2019-03-14 08:49:40.000000000 +1300 ++++ package.new/linode-cli-2.1.2/Makefile 2019-03-25 13:54:28.602667639 +1300 +@@ -9,8 +9,8 @@ + PYCMD=python3 + PIPCMD=pip3 + else +- PYCMD=python +- PIPCMD=pip ++ PYCMD=python2 ++ PIPCMD=pip2 + endif + + install: check-prerequisites requirements build +@@ -18,7 +18,7 @@ + + .PHONY: build + build: clean +- python -m linodecli bake ${SPEC} --skip-config ++ python2 -m linodecli bake ${SPEC} --skip-config + python3 -m linodecli bake ${SPEC} --skip-config + cp data-2 linodecli/ + cp data-3 linodecli/ +@@ -26,14 +26,14 @@ + + .PHONY: requirements + requirements: +- pip install -r requirements.txt ++ pip2 install -r requirements.txt + pip3 install -r requirements.txt + + .PHONY: check-prerequisites + check-prerequisites: +- @ pip -v >/dev/null ++ @ pip2 -v >/dev/null + @ pip3 -v >/dev/null +- @ python -V >/dev/null ++ @ python2 -V >/dev/null + @ python3 -V >/dev/null + + .PHONY: clean +diff --unified --recursive --text package.orig/linode-cli-2.1.2/requirements.txt package.new/linode-cli-2.1.2/requirements.txt +--- package.orig/linode-cli-2.1.2/requirements.txt 2019-03-14 08:49:40.000000000 +1300 ++++ package.new/linode-cli-2.1.2/requirements.txt 2019-03-25 13:55:52.365450565 +1300 +@@ -2,4 +2,4 @@ + colorclass + requests + PyYAML +-enum34 ++enum34; python_version < '3.4' +diff --unified --recursive --text package.orig/linode-cli-2.1.2/setup.py package.new/linode-cli-2.1.2/setup.py +--- package.orig/linode-cli-2.1.2/setup.py 2019-03-14 08:49:40.000000000 +1300 ++++ package.new/linode-cli-2.1.2/setup.py 2019-03-25 14:14:14.785811129 +1300 +@@ -47,7 +47,10 @@ + 'linodecli.plugins', + ], + license="BSD 3-Clause License", +- install_requires=["terminaltables","colorclass","requests","PyYAML","enum34"], ++ install_requires=["terminaltables","colorclass","requests","PyYAML"], ++ extras_require={ ++ ":python_version<'3.4'": ['enum34'], ++ }, + entry_points={ + "console_scripts": [ + "linode-cli = linodecli:main", diff --git a/linode-cli.install b/linode-cli.install index 5a70ef31734f..b61fd289a66f 100644 --- a/linode-cli.install +++ b/linode-cli.install @@ -1,3 +1,4 @@ post_install() { - echo "Run 'linode configure' to login to your Linode account." + echo "Run 'linode-cli configure' to configure the CLI with a token and optionally select some default values" + echo "See https://www.linode.com/docs/platform/api/using-the-linode-cli/ for assistance" } |