summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorkh@valera2021-03-17 00:13:33 +0200
committerkh@valera2021-03-17 00:13:33 +0200
commit132efb828876d46f1c9ba596f9919586bd614963 (patch)
treebcce9dbf39f08c3049035149d31661dda601194a
parentcfa39c3b2a916196311eb73c8bad2804182732c3 (diff)
downloadaur-132efb828876d46f1c9ba596f9919586bd614963.tar.gz
pkgver
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD8
-rwxr-xr-xtest.sh36
3 files changed, 44 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c89c4fe7c09..581352d482b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = wiringop-zero-git
pkgdesc = WiringPi / WiringOP libary for the Orange Pi Zero with 26 pin GPIO header
- pkgver = a8f0526
+ pkgver = 32.a8f0526
pkgrel = 1
url = https://github.com/xpertsavenue/WiringOP-Zero
arch = armv7h
diff --git a/PKGBUILD b/PKGBUILD
index 5832730b1f5..73ff633d15c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=wiringop-zero-git
_pkgbase=${pkgname%-*-*}
-pkgver="a8f0526"
+pkgver="32.a8f0526"
pkgrel=1
pkgdesc="WiringPi / WiringOP libary for the Orange Pi Zero with 26 pin GPIO header"
arch=('armv7h')
@@ -13,6 +13,12 @@ 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
diff --git a/test.sh b/test.sh
new file mode 100755
index 00000000000..13e8d9701d4
--- /dev/null
+++ b/test.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+# test.sh:
+# Simple test: Assumes LEDs on Pins 0-7 and lights them in-turn.
+
+mode=$1
+
+for i in `seq 0 7`;
+do
+ gpio mode $i out
+done
+
+while true;
+do
+ for i in `seq 0 7`;
+ do
+ echo "gpio write $i 1"
+ gpio write $i 1
+ if [ -z "$mode" ]; then
+ sleep 0.9;
+ elif [[ "$mode"=="read" ]]; then
+ read;
+ fi
+ done
+
+ for i in `seq 0 7`;
+ do
+ echo "gpio write $i 0"
+ gpio write $i 0
+ if [ -z "$mode" ]; then
+ sleep 0.9;
+ elif [[ "$mode"=="read" ]]; then
+ read;
+ fi
+ done
+done