summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: af50b3fd234bcb041536606abe1c01d8fcdc0bbb (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
# Maintainer: yjun <jerrysteve1101@gmail.com>

pkgname=python-pynrfjprog-git
_pkgname=${pkgname%-git}
_gitname=${_pkgname/python-}
pkgver=r29.aed16b9
pkgrel=2
pkgdesc="Python wrapper around the nrfjprog dynamic link library (DLL)"
arch=('any')
url="https://github.com/NordicSemiconductor/pynrfjprog"
license=('custom')
depends=('python-future'
         'nrf5x-command-line-tools')
makedepends=('git'
             'python-setuptools')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("git+https://github.com/NordicSemiconductor/pynrfjprog"
        "fixed-LICENSE-name.patch")
sha256sums=('SKIP'
            '8312eb036c27ab467f25f367a0ca82e71eafc5ee184d1716578c9a6e1e17a6c8')

pkgver() {
  cd ${_gitname}

  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd ${_gitname}

  patch --forward --strip=1 --input="${srcdir}/fixed-LICENSE-name.patch"
}

build() {
  cd ${_gitname}

  python setup.py build
}

package() {
  cd $_gitname

  python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}

# vim: set sw=2 ts=2 et: