From 3e75dc1e373bfcdb9112f57104d881c33727c032 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Tue, 4 Sep 2018 15:53:06 +0200 Subject: [PATCH] Add ntp package Signed-off-by: David Oberhollenzer --- pkg/ntp/build | 39 +++++++++++++++++++++++++++++++++++++++ pkg/ntp/rootfs_files.txt | 10 ++++++++++ product/router/ROOTFS | 1 + 3 files changed, 50 insertions(+) create mode 100644 pkg/ntp/build create mode 100644 pkg/ntp/rootfs_files.txt diff --git a/pkg/ntp/build b/pkg/ntp/build new file mode 100644 index 0000000..e369240 --- /dev/null +++ b/pkg/ntp/build @@ -0,0 +1,39 @@ +VERSION="4.2.8p12" +SRCDIR="ntp-${VERSION}" +TARBALL="${SRCDIR}.tar.gz" +URL="https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2" +SHA256SUM="709b222b5013d77d26bfff532b5ea470a8039497ef29d09363931c036cb30454" +DEPENDS="openssl zlib readline" + +prepare() { + return +} + +build() { + CFLAGS=-fno-stack-protector \ + run_configure "$1" --with-openssl-libdir="$TCDIR/$TARGET/lib" \ + --with-openssl-incdir="$TCDIR/$TARGET/include" \ + --with-yielding-select=yes --enable-ipv6 \ + --with-lineeditlibs=readline --without-rpath \ + --without-sntp --with-ntpsnmpd + + CFLAGS=-fno-stack-protector \ + make -j $NUMJOBS +} + +deploy() { + local SOURCE="$1" + local DEPLOY="$2" + + make DESTDIR="$DEPLOY" install + cp "$SCRIPTDIR/pkg/$PKGNAME/rootfs_files.txt" "$DEPLOY" +} + +check_update() { + local version=$(echo $VERSION | sed 's/p/./g') + + curl --silent -L "http://support.ntp.org/rss/releases.xml" | \ + grep -o "ntp-[0-9.p]*tar.gz" | \ + sed 's/ntp-//g' | sed 's/.tar.gz//g' | sed 's/p/./g' | \ + verson_find_greatest "$version" +} diff --git a/pkg/ntp/rootfs_files.txt b/pkg/ntp/rootfs_files.txt new file mode 100644 index 0000000..a942af3 --- /dev/null +++ b/pkg/ntp/rootfs_files.txt @@ -0,0 +1,10 @@ +bin/calc_tickadj m 555 0 0 +bin/ntpd m 555 0 0 +bin/ntpdate m 555 0 0 +bin/ntpdc m 555 0 0 +bin/ntp-keygen m 555 0 0 +bin/ntpq m 555 0 0 +bin/ntptrace m 555 0 0 +bin/ntp-wait m 555 0 0 +bin/tickadj m 555 0 0 +bin/update-leap m 555 0 0 diff --git a/product/router/ROOTFS b/product/router/ROOTFS index ce92ec0..09531f4 100644 --- a/product/router/ROOTFS +++ b/product/router/ROOTFS @@ -23,3 +23,4 @@ dnsmasq openssh ldns tcpdump +ntp