summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a4b13a0fc70b9c74a6704a226b4c0f1b816339a9 (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
# Maintainer: Lara Maia <dev@lara.click>
# Co-maintainer: Fernando Manfredi <contact at acidhub.click>


pkgname=python-wiringpi-git
pkgver=126.4ca39a6
pkgrel=1
pkgdesc="Python-wrapped version of Gordon Henderson's WiringPI."
url="https://github.com/WiringPi/WiringPi-Python"
arch=('x86_64' 'i686' 'armv6h' 'armv7h' 'armv8h')
license=('GPLv3')
depends=('python')
makedepends=('git' 'python-setuptools' 'swig')
replaces=('python-wiringpi2-git')
conflicts=('python-wiringpi')
provides=('python-wiringpi')
source=(git+https://github.com/WiringPi/WiringPi-Python.git)
sha256sums=('SKIP')

pkgver() {
    cd "$srcdir"/WiringPi-Python
    echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
    cd "$srcdir"/WiringPi-Python
    git submodule init
    git submodule update
    swig -python wiringpi.i
}

build() {
    cd "$srcdir"/WiringPi-Python
    python setup.py build
}

package() {
    cd "$srcdir"/WiringPi-Python
    python setup.py install --prefix=/usr --root=$pkgdir
}