summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLorenzo Cappelletti2020-05-12 22:11:42 +0200
committerLorenzo Cappelletti2020-05-12 22:13:41 +0200
commitfc7c88fcb423c3969430740e019ce1e9decf6ab5 (patch)
tree40e2308312fe682f162cbf2bdde78c52feb4d6cd
parent1553656b2e8b08949be67ffd3a1df77445a0c82b (diff)
downloadaur-fc7c88fcb423c3969430740e019ce1e9decf6ab5.tar.gz
Depend on mbed-os-tools + support to Python2
-rw-r--r--.SRCINFO37
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD68
3 files changed, 68 insertions, 41 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2b44224b153..c20bd213d64 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,31 +1,26 @@
pkgbase = python-mbed-cli
pkgdesc = ARM mbed Command Line Interface
pkgver = 1.10.3
- pkgrel = 1
- url = https://developer.mbed.org
+ pkgrel = 2
+ url = https://os.mbed.org
arch = any
license = Apache
makedepends = python-setuptools
- depends = python
- depends = python-colorama
- depends = python-pyserial
- depends = python-intelhex
- depends = python-jinja
- depends = python-beautifulsoup4
- depends = python-fuzzywuzzy
- depends = python-prettytable
- depends = python-requests
- depends = python-yaml
- depends = python-pyelftools
- depends = python-jsonschema
- optdepends = git: support git-based mbed projects
- optdepends = mercurial: support mercurial-based mbed projects
- optdepends = python-mbed-host-tests: Flash, reset and supervise tool
- optdepends = python-mbed-greentea: Test automation
- optdepends = python-mbed-ls: Automatic device detection
- options = !emptydirs
- source = https://github.com/ARMmbed/mbed-cli/archive/1.10.3.tar.gz
+ makedepends = python2-setuptools
+ source = python-mbed-cli-1.10.3.tar.gz::https://github.com/ARMmbed/mbed-cli/archive/1.10.3.tar.gz
sha256sums = 8a95093a89aa8fb7a911775155cdb4b9d124ef6af74393dfc1b0bb79c3e33327
pkgname = python-mbed-cli
+ depends = python
+ depends = python-pyserial
+ depends = python-mbed-os-tools
+ depends = git
+ depends = mercurial
+
+pkgname = python2-mbed-cli
+ depends = python
+ depends = python-pyserial
+ depends = python-mbed-os-tools
+ depends = git
+ depends = mercurial
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..57fa220ae7d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/pkg/
+/src/
+/*.tar.*
+/*.zip
diff --git a/PKGBUILD b/PKGBUILD
index 85622ef5652..5ff0b7cdadd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,31 +1,59 @@
-# Maintainer: Jimmy Stelzer <jimmy.stelzer@gmail.com>
+# Maintainer: Lorenzo Cappelletti <lorenzo.cappelletti gmail.com>
+# Contributor: Jimmy Stelzer <jimmy.stelzer@gmail.com>
# Contributor: Daniel Maslowski <info@orangecms.org>
-# Contributor: Lorenzo Cappelletti <lorenzo.cappelletti gmail.com>
-_pyname=mbed-cli
-pkgname=python-${_pyname}
+pkgbase=python-mbed-cli
+pkgname=('python-mbed-cli' 'python2-mbed-cli')
pkgver=1.10.3
-pkgrel=1
+pkgrel=2
pkgdesc="ARM mbed Command Line Interface"
arch=('any')
-url="https://developer.mbed.org"
+url="https://os.mbed.org"
license=('Apache')
-depends=('python' 'python-colorama' 'python-pyserial' 'python-intelhex' 'python-jinja' 'python-beautifulsoup4' 'python-fuzzywuzzy' 'python-prettytable' 'python-requests' 'python-yaml' 'python-pyelftools' 'python-jsonschema')
-optdepends=(
- 'git: support git-based mbed projects'
- 'mercurial: support mercurial-based mbed projects'
- 'python-mbed-host-tests: Flash, reset and supervise tool'
- 'python-mbed-greentea: Test automation'
- 'python-mbed-ls: Automatic device detection'
-)
-makedepends=('python-setuptools')
-options=(!emptydirs)
-source=("https://github.com/ARMmbed/mbed-cli/archive/$pkgver.tar.gz")
+makedepends=('python-setuptools' 'python2-setuptools')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/ARMmbed/mbed-cli/archive/${pkgver}.tar.gz")
sha256sums=('8a95093a89aa8fb7a911775155cdb4b9d124ef6af74393dfc1b0bb79c3e33327')
-package() {
- cd "$srcdir/${_pyname}-${pkgver}"
- python setup.py install --root="$pkgdir/" --optimize=1
+check_python-mbed-cli() {
+ checkdepends=('python-pytest')
+
+ cd "mbed-cli-${pkgver}"
+ pytest test
+}
+
+package_python-mbed-cli() {
+ depends=(
+ 'python'
+ 'python-pyserial'
+ 'python-mbed-os-tools'
+ 'git'
+ 'mercurial'
+ )
+
+ cd "mbed-cli-${pkgver}"
+ python setup.py install --root="${pkgdir}/" --optimize=1
+ install -Dm 0644 tools/bash_completion/mbed "${pkgdir}/etc/bash_completion.d/mbed-cli.sh"
+}
+
+check_python2-mbed-cli() {
+ checkdepends=('python-pytest')
+
+ cd "mbed-cli-${pkgver}"
+ pytest2 test
+}
+
+package_python2-mbed-cli() {
+ depends=(
+ 'python'
+ 'python-pyserial'
+ 'python-mbed-os-tools'
+ 'git'
+ 'mercurial'
+ )
+
+ cd "mbed-cli-${pkgver}"
+ python2 setup.py install --root="${pkgdir}/" --optimize=1
+ install -Dm 0644 tools/bash_completion/mbed "${pkgdir}/etc/bash_completion.d/mbed-cli.sh"
}
# vim:set ts=2 sw=2 et: