mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-08 08:30:47 -09:00
package/nqptp: new package
This is the Not Quite PTP timing library necessary for AirPlay2 support with shairport-sync. Signed-off-by: Trammell Hudson <hudson@trmm.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
bde2b2adaf
commit
8df8272281
@@ -3317,6 +3317,9 @@ F: package/kmemd/
|
||||
N: Torben Voltmer <mail@t-voltmer.net>
|
||||
F: package/espflash/
|
||||
|
||||
N: Trammell Hudson <hudson@trmm.net>
|
||||
F: package/nqptp/
|
||||
|
||||
N: Tudor Holton <buildroot@tudorholton.com>
|
||||
F: package/openjdk/
|
||||
|
||||
|
||||
@@ -2593,6 +2593,7 @@ endif
|
||||
source "package/nload/Config.in"
|
||||
source "package/nmap/Config.in"
|
||||
source "package/noip/Config.in"
|
||||
source "package/nqptp/Config.in"
|
||||
source "package/ntp/Config.in"
|
||||
source "package/ntpsec/Config.in"
|
||||
source "package/nuttcp/Config.in"
|
||||
|
||||
13
package/nqptp/Config.in
Normal file
13
package/nqptp/Config.in
Normal file
@@ -0,0 +1,13 @@
|
||||
config BR2_PACKAGE_NQPTP
|
||||
bool "nqptp"
|
||||
depends on BR2_USE_MMU
|
||||
select BR2_PACKAGE_LIBCONFIG
|
||||
help
|
||||
nqptp is a daemon that monitors timing data from PTP clocks
|
||||
it sees on ports 319 and 320. It maintains records for one
|
||||
clock, identified by its Clock ID.
|
||||
|
||||
It is a companion application to Shairport Sync and provides
|
||||
timing information for AirPlay 2 operation.
|
||||
|
||||
https://github.com/mikebrady/nqptp
|
||||
58
package/nqptp/S90nqptp
Normal file
58
package/nqptp/S90nqptp
Normal file
@@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
|
||||
DAEMON="nqptp"
|
||||
PIDFILE="/var/run/$DAEMON.pid"
|
||||
|
||||
NQPTP_ARGS=""
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
|
||||
|
||||
start() {
|
||||
printf 'Starting %s: ' "$DAEMON"
|
||||
# shellcheck disable=SC2086 # we need the word splitting
|
||||
start-stop-daemon --start --background --make-pidfile \
|
||||
--pidfile "$PIDFILE" --exec "/usr/bin/$DAEMON" \
|
||||
-- $NQPTP_ARGS
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf 'Stopping %s: ' "$DAEMON"
|
||||
start-stop-daemon --stop --pidfile "$PIDFILE" --exec "/usr/bin/$DAEMON"
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
return "$status"
|
||||
fi
|
||||
while start-stop-daemon --stop --test --quiet --pidfile "$PIDFILE" \
|
||||
--exec "/sbin/$DAEMON"; do
|
||||
sleep 0.1
|
||||
done
|
||||
rm -f "$PIDFILE"
|
||||
return "$status"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start|stop|restart)
|
||||
"$1";;
|
||||
reload)
|
||||
# Restart, since there is no true "reload" feature.
|
||||
restart;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}"
|
||||
exit 1
|
||||
esac
|
||||
3
package/nqptp/nqptp.hash
Normal file
3
package/nqptp/nqptp.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 1df1d5edd5b713010d6495b3abca4c1cf4ad8fa6029df0abeb9e4de8e0eb707a nqptp-1.2.4.tar.gz
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSE
|
||||
24
package/nqptp/nqptp.mk
Normal file
24
package/nqptp/nqptp.mk
Normal file
@@ -0,0 +1,24 @@
|
||||
################################################################################
|
||||
#
|
||||
# nqptp
|
||||
#
|
||||
################################################################################
|
||||
|
||||
NQPTP_VERSION = 1.2.4
|
||||
NQPTP_SITE = $(call github,mikebrady,nqptp,$(NQPTP_VERSION))
|
||||
NQPTP_LICENSE = GPL-2.0
|
||||
NQPTP_LICENSE_FILES = LICENSE
|
||||
NQPTP_DEPENDENCIES = libconfig host-pkgconf
|
||||
# git clone, no configure
|
||||
NQPTP_AUTORECONF = YES
|
||||
|
||||
define NQPTP_INSTALL_TARGET_CMDS
|
||||
$(INSTALL) -D -m 0755 $(@D)/nqptp $(TARGET_DIR)/usr/bin/nqptp
|
||||
endef
|
||||
|
||||
define NQPTP_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 0755 package/nqptp/S90nqptp \
|
||||
$(TARGET_DIR)/etc/init.d/S90nqptp
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user