pkgbuild-linode-cli

CLI for the Linode API
git clone git://fossdaily.xyz/pkgbuild-linode-cli
Log | Files | Refs

commit d49ba6c98badbe689f222769c05d0353fcf71fb3
Author: caltlgin <contact@fossdaily.xyz>
Date:   Wed, 18 Nov 2020 16:52:20 +1300

Add to caltlgin repo

Diffstat:
A.SRCINFO | 17+++++++++++++++++
A.gitignore | 4++++
APKGBUILD | 38++++++++++++++++++++++++++++++++++++++
3 files changed, 59 insertions(+), 0 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = linode-cli + pkgdesc = CLI for the Linode API + pkgver = 3.2.1 + pkgrel = 1 + url = https://github.com/linode/linode-cli + arch = any + license = BSD + makedepends = python-setuptools + depends = python-colorclass + depends = python-requests + depends = python-terminaltables + depends = python-yaml + source = linode-cli-3.2.1.tar.gz::https://github.com/linode/linode-cli/archive/3.2.1.tar.gz + sha256sums = cf4f86af83d2b25ad0d4261a95e91e4128733734ce84eb2b3b4cdf8b03c8c3b6 + +pkgname = linode-cli + diff --git a/.gitignore b/.gitignore @@ -0,0 +1,4 @@ +* +!.gitignore +!.SRCINFO +!PKGBUILD diff --git a/PKGBUILD b/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: Caltlgin Stsodaat <contact@fossdaily.xyz> + +pkgname='linode-cli' +pkgver=3.2.1 +pkgrel=1 +pkgdesc='CLI for the Linode API' +arch=('any') +url='https://github.com/linode/linode-cli' +_url_pypi='https://pypi.org/project/linode-cli/' +license=('BSD') +depends=('python-colorclass' 'python-requests' 'python-terminaltables' 'python-yaml') +makedepends=('python-setuptools') +source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz") +sha256sums=('cf4f86af83d2b25ad0d4261a95e91e4128733734ce84eb2b3b4cdf8b03c8c3b6') + +prepare() { + # Remove references to enum34 + cd "${pkgname}-${pkgver}" + sed -i.bak '/enum34/d' 'requirements.txt' + sed -i.bak 's/,"enum34"//' 'setup.py' +} + +build() { + cd "${pkgname}-${pkgver}" + # Reference: https://github.com/linode/linode-cli/blob/master/Makefile + python -m linodecli bake 'https://www.linode.com/docs/api/openapi.yaml' --skip-config + install -Dvm644 'data-'* -t "${pkgname/-/}" + python setup.py build +} + +package() { + cd "${pkgname}-${pkgver}" + python setup.py install --root="${pkgdir}" --optimize=1 --skip-build + install -Dvm644 'README.rst' -t "${pkgdir}/usr/share/doc/${pkgname}" + install -Dvm644 'LICENSE' -t "${pkgdir}/usr/share/licenses/${pkgname}" +} + +# vim: ts=2 sw=2 et: