summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiorgio Gilestro2022-03-18 10:25:23 +0000
committerGiorgio Gilestro2022-03-18 10:25:23 +0000
commit42960e0a911edd99b93b63854173314223af0aed (patch)
tree7be99dcc7f98eb80163b8c138ad18e22804572c5
parent457552955a7b56d8f65b9f03be4e99f35a8477ae (diff)
downloadaur-42960e0a911edd99b93b63854173314223af0aed.tar.gz
Install support for I2C and GPIO listener service
Make ethoclient an executable command
-rw-r--r--.SRCINFO1
-rw-r--r--PKGBUILD8
-rw-r--r--ethoscope-device.install13
3 files changed, 18 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2d32f2ddf51b..2133e9877ec9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -18,6 +18,7 @@ pkgbase = ethoscope-device
depends = mariadb
depends = dnsmasq
depends = f2fs-tools
+ depends = i2c-tools
depends = wpa_supplicant
depends = ifplugd
depends = qt5-base
diff --git a/PKGBUILD b/PKGBUILD
index 65ec78c2aa71..713e5667b962 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@ arch=('any')
url="http://lab.gilest.ro/ethoscope"
license=('GPL3')
makedepends=('git' 'gcc-fortran' )
-depends=('git' 'avahi' 'rsync' 'wget' 'fping' 'ntp' 'openssh' 'mariadb' 'dnsmasq' 'f2fs-tools' 'wpa_supplicant' 'ifplugd' 'qt5-base' 'python-opencv' 'hdf5' 'gtk3' 'python' 'python-pip' 'python-numpy' 'python-scipy' 'python-bottle' 'python-pyserial' 'python-mysql-connector' 'python-netifaces' 'python-cherrypy' 'python-eventlet' 'python-gitpython' 'python-dnspython' 'python-greenlet' 'python-monotonic' 'python-picamera' 'python-zeroconf')
+depends=('git' 'avahi' 'rsync' 'wget' 'fping' 'ntp' 'openssh' 'mariadb' 'dnsmasq' 'f2fs-tools' 'i2c-tools' 'wpa_supplicant' 'ifplugd' 'qt5-base' 'python-opencv' 'hdf5' 'gtk3' 'python' 'python-pip' 'python-numpy' 'python-scipy' 'python-bottle' 'python-pyserial' 'python-mysql-connector' 'python-netifaces' 'python-cherrypy' 'python-eventlet' 'python-gitpython' 'python-dnspython' 'python-greenlet' 'python-monotonic' 'python-picamera' 'python-zeroconf')
provides=('ethoscope-device')
install="ethoscope-device.install"
source=("$pkgname::git+https://github.com/gilestrolab/ethoscope.git")
@@ -38,9 +38,13 @@ package() {
cd "${pkgdir}/opt/${pkgname}"
git remote set-url origin git://node/ethoscope.git
+ #install the ethoclient file
+ ln -s /opt/ethoscope-device/src/scripts/ethoclient.py /usr/bin/ethoclient
+
#install service files
cd "${srcdir}"/"${pkgname}"/scripts/
- install -D --mode=0755 ethoscope_device.service ethoscope_listener.service "${pkgdir}/usr/lib/systemd/system/"
+ install -D --mode=0755 ethoscope_device.service ethoscope_listener.service ethoscope_GPIO_listener.service "${pkgdir}/usr/lib/systemd/system/"
+
cd "${srcdir}"/"${pkgname}"/scripts/ethoscope_updater/
install -D --mode=0755 ethoscope_update.service "${pkgdir}/usr/lib/systemd/system/"
diff --git a/ethoscope-device.install b/ethoscope-device.install
index f3a0495d7e03..84ebde38137f 100644
--- a/ethoscope-device.install
+++ b/ethoscope-device.install
@@ -63,7 +63,7 @@ post_install() {
echo 'driftfile /var/lib/ntp/ntp.drift' >> /etc/ntp.conf
echo "enabling DEVICE specific systemd service files"
- systemctl enable ethoscope_device.service ethoscope_listener.service ethoscope_update.service
+ systemctl enable ethoscope_device.service ethoscope_listener.service ethoscope_update.service ethoscope_GPIO_listener.service
systemctl enable ntpd.service mysqld.service sshd.service mysqld.service avahi-daemon.service
#systemctl enable fake-hwclock fake-hwclock-save.timer
@@ -109,7 +109,16 @@ post_install() {
echo "disable bluetooth"
echo 'dtoverlay=pi3-disable-bt' >> /boot/config.txt
+
+ #https://madflex.de/use-i2c-on-raspberry-pi-with-archlinux-arm/
+ echo "adding support to I2C"
+ echo 'dtparam=i2c_arm=on' >> /boot/config.txt
+ echo 'i2c-dev' >> /etc/modules-load.d/raspberrypi.conf
+ #make ethoclient an executable command
+ chmod +x /opt/ethoscope-device/src/scritpts/ethoclient.py
+ ln -s /usr/bin/ethoclient /opt/ethoscope-device/src/scritpts/ethoclient.py
+
echo "Please reboot this PI now."
}
@@ -134,7 +143,7 @@ post_upgrade() {
# arg 1: the old package version
pre_remove() {
echo "disabling systemd service files"
- systemctl disable ethoscope_device.service ethoscope_listener.service ethoscope_update.service
+ systemctl disable ethoscope_device.service ethoscope_listener.service ethoscope_update.service ethoscope_GPIO_listener.service
}
## arg 1: the old package version