blob: 73ff633d15c01b03b1ef13deaced34455bdb1d32 (
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
|
pkgname=wiringop-zero-git
_pkgbase=${pkgname%-*-*}
pkgver="32.a8f0526"
pkgrel=1
pkgdesc="WiringPi / WiringOP libary for the Orange Pi Zero with 26 pin GPIO header"
arch=('armv7h')
url="https://github.com/xpertsavenue/WiringOP-Zero"
license=('GPL3')
depends=()
makedepends=('git')
conflicts=("${_pkgbase}")
source=("git+${url}")
md5sums=('SKIP')
#====================================
pkgver() {
cd ${srcdir}/WiringOP-Zero
printf '%s' "$(git rev-list --count HEAD)" "." "$(git rev-parse --short HEAD)"
}
#====================================
prepare() {
cd ${srcdir}/WiringOP-Zero
sed -i 's|ln -sf $(DESTDIR)$(PREFIX)/lib$(LIBARCH)/libwiringPiDev.so|ln -sf libwiringPiDev.so|g' ${srcdir}/WiringOP-Zero/devLib/Makefile
sed -i 's|$(DESTDIR)/lib|$(DESTDIR)$(PREFIX)/lib|g' */Makefile
}
#====================================
package() {
cd ${srcdir}/WiringOP-Zero
install -dm755 "${pkgdir}/usr/bin"
install -dm755 "${pkgdir}/usr/lib"
install -dm755 "${pkgdir}/usr/include"
msg2 "WiringPi Library"
cd wiringPi
make
make DESTDIR="${pkgdir}" PREFIX="/usr" LDCONFIG=true install
msg2 "WiringPi Devices Library"
cp wiringPi.h ../devLib/
cp wiringPiSPI.h ../devLib/
cp sn3218.h ../devLib/
cp mcp23s17.h ../devLib/
cd ../devLib
make
make DESTDIR="${pkgdir}" PREFIX="/usr" LDCONFIG=true install
msg2 "GPIO Utility"
cd ../gpio
make DESTDIR="${pkgdir}" PREFIX="/usr"
make DESTDIR="${pkgdir}" PREFIX="/usr" LDCONFIG=true install
}
|