summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorkh@valera2021-01-31 00:41:54 +0200
committerkh@valera2021-01-31 00:41:54 +0200
commitcfa39c3b2a916196311eb73c8bad2804182732c3 (patch)
treeb26b46a4a27e98afd4b85e16dbf87b58afaf27e8
downloadaur-cfa39c3b2a916196311eb73c8bad2804182732c3.tar.gz
wiringop-zero-git
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD48
2 files changed, 62 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..c89c4fe7c09
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = wiringop-zero-git
+ pkgdesc = WiringPi / WiringOP libary for the Orange Pi Zero with 26 pin GPIO header
+ pkgver = a8f0526
+ pkgrel = 1
+ url = https://github.com/xpertsavenue/WiringOP-Zero
+ arch = armv7h
+ license = GPL3
+ makedepends = git
+ conflicts = wiringop
+ source = git+https://github.com/xpertsavenue/WiringOP-Zero
+ md5sums = SKIP
+
+pkgname = wiringop-zero-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..5832730b1f5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+pkgname=wiringop-zero-git
+_pkgbase=${pkgname%-*-*}
+pkgver="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')
+
+#====================================
+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
+}