summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1abed02291a99981fae6648fc42134491c78be1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Maintainer: Lorenzo Cappelletti <lorenzo.cappelletti gmail.com>
# Contributor: Jimmy Stelzer <jimmy.stelzer@gmail.com>
# Contributor: Daniel Maslowski <info@orangecms.org>

pkgbase=python-mbed-cli
pkgname=('python-mbed-cli' 'python2-mbed-cli')
pkgver=1.10.4
pkgrel=1
pkgdesc="ARM mbed Command Line Interface"
arch=('any')
url="https://os.mbed.com/"
license=('Apache')
optdepends=("mbed-os: for sharing Mbed OS source code among projects/users")
makedepends=('python-setuptools' 'python2-setuptools')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/ARMmbed/mbed-cli/archive/${pkgver}.tar.gz")
sha256sums=('3ecae62f31ed2b53e0b105b80634acc356ca1b4fccea08e13d0132a6e7ba7eff')

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: