aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Alex2015-06-10 13:48:54 +1000
committerBen Alex2015-06-10 13:48:54 +1000
commit39552a12806c1a6e7354f0ca42daf24eff10b111 (patch)
treee49b0743211f59b8041736f0ebc5a3fce71ef77d
downloadaur-39552a12806c1a6e7354f0ca42daf24eff10b111.tar.gz
Initial import
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD31
-rw-r--r--rpi-gpio-ntp.conf6
-rw-r--r--rpi-gpio-ntp.service10
4 files changed, 66 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..bca5d98e0217
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = rpi-gpio-ntp
+ pkgdesc = Raspberry Pi GPIO PPS NTP Receiver
+ pkgver = 1.5
+ pkgrel = 2
+ url = http://vanheusden.com/time/rpi_gpio_ntp/
+ arch = any
+ license = GPL2
+ makedepends = make
+ makedepends = gcc
+ backup = etc/rpi-gpio-ntp.conf
+ source = http://vanheusden.com/time/rpi_gpio_ntp/rpi_gpio_ntp-1.5.tgz
+ source = rpi-gpio-ntp.conf
+ source = rpi-gpio-ntp.service
+ md5sums = fbb99cd1481121b216bb0e6f7c6ba1b9
+ md5sums = a44541e3253bc112ba55a76646ae7c0b
+ md5sums = df78058ea1378fe400f4b47b4e06cae2
+
+pkgname = rpi-gpio-ntp
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d9c79b9cf8de
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Contributor: Ben Alex <ben.alex@acegi.com.au>
+# https://github.com/benalexau/rpi-gpio-ntp-aur
+
+pkgname=rpi-gpio-ntp
+pkgver=1.5
+pkgrel=2
+pkgdesc="Raspberry Pi GPIO PPS NTP Receiver"
+arch=('any')
+url="http://vanheusden.com/time/rpi_gpio_ntp/"
+license=GPL2
+depends=()
+makedepends=('make' 'gcc')
+backup=('etc/rpi-gpio-ntp.conf')
+source=('http://vanheusden.com/time/rpi_gpio_ntp/rpi_gpio_ntp-1.5.tgz'
+ 'rpi-gpio-ntp.conf'
+ 'rpi-gpio-ntp.service')
+md5sums=('fbb99cd1481121b216bb0e6f7c6ba1b9'
+ 'a44541e3253bc112ba55a76646ae7c0b'
+ 'df78058ea1378fe400f4b47b4e06cae2')
+
+build() {
+ cd ${srcdir}/rpi_gpio_ntp-${pkgver}
+ sed -i 's/\tset_prio/\t\/\/set_prio/' main.c
+ make
+}
+
+package() {
+ install -Dm755 ${srcdir}/rpi_gpio_ntp-${pkgver}/rpi_gpio_ntp ${pkgdir}/usr/bin/rpi_gpio_ntp
+ install -Dm644 ${srcdir}/rpi-gpio-ntp.conf ${pkgdir}/etc/rpi-gpio-ntp.conf
+ install -Dm644 ${srcdir}/rpi-gpio-ntp.service ${pkgdir}/usr/lib/systemd/system/rpi-gpio-ntp.service
+}
diff --git a/rpi-gpio-ntp.conf b/rpi-gpio-ntp.conf
new file mode 100644
index 000000000000..8e1147bf7a20
--- /dev/null
+++ b/rpi-gpio-ntp.conf
@@ -0,0 +1,6 @@
+# The -g int relates to the GPIO pin name. eg:
+#
+# -g 8 = GPIO 8 = pin number 24
+# -g 23 = GPIO 23 = pin number 16
+# -g 24 = GPIO 24 = pin number 18
+OPTS="-N 1 -g 23"
diff --git a/rpi-gpio-ntp.service b/rpi-gpio-ntp.service
new file mode 100644
index 000000000000..bca4ad9fb3b5
--- /dev/null
+++ b/rpi-gpio-ntp.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Raspberry Pi GPIO PPS NTP Receiver
+
+[Service]
+Type=forking
+EnvironmentFile=/etc/rpi-gpio-ntp.conf
+ExecStart=/usr/bin/rpi_gpio_ntp $OPTS
+
+[Install]
+WantedBy=multi-user.target