[uClibc-cvs] svn commit: trunk/buildroot/package: openntpd

andersen at uclibc.org andersen at uclibc.org
Mon May 16 17:36:47 UTC 2005


Author: andersen
Date: 2005-05-16 11:36:46 -0600 (Mon, 16 May 2005)
New Revision: 10338

Log:
Add support for the openntpd package to buildroot. OpenNTPD is a free, easy to
use implementation of the Network Time Protocol with a small footprint. It
provides the ability to sync the local clock to remote NTP servers and can act
as NTP server itself, redistributing the local clock.

http://bugs.uclibc.org/view.php?id=257


Added:
   trunk/buildroot/package/openntpd/
   trunk/buildroot/package/openntpd/Config.in
   trunk/buildroot/package/openntpd/openntpd.mk

Modified:
   trunk/buildroot/package/Config.in


Changeset:
Modified: trunk/buildroot/package/Config.in
===================================================================
--- trunk/buildroot/package/Config.in	2005-05-16 17:30:25 UTC (rev 10337)
+++ trunk/buildroot/package/Config.in	2005-05-16 17:36:46 UTC (rev 10338)
@@ -76,6 +76,7 @@
 source "package/netsnmp/Config.in"
 source "package/newt/Config.in"
 source "package/ntp/Config.in"
+source "package/openntpd/Config.in"
 source "package/openssh/Config.in"
 source "package/openssl/Config.in"
 source "package/openvpn/Config.in"

Added: trunk/buildroot/package/openntpd/Config.in
===================================================================
--- trunk/buildroot/package/openntpd/Config.in	2005-05-16 17:30:25 UTC (rev 10337)
+++ trunk/buildroot/package/openntpd/Config.in	2005-05-16 17:36:46 UTC (rev 10338)
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_OPENNTPD
+        bool "OpenNTPD"
+        default n
+        help
+	     OpenNTPD is an easy to use implementation of the Network Time
+	     Protocol. It provides the ability to sync the local clock
+	     to remote NTP servers and can act as NTP server itself,
+	     redistributing the local clock. It just works.

Added: trunk/buildroot/package/openntpd/openntpd.mk
===================================================================
--- trunk/buildroot/package/openntpd/openntpd.mk	2005-05-16 17:30:25 UTC (rev 10337)
+++ trunk/buildroot/package/openntpd/openntpd.mk	2005-05-16 17:36:46 UTC (rev 10338)
@@ -0,0 +1,63 @@
+#############################################################
+#
+# OpenNTPD
+#
+#############################################################
+OPENNTPD_VERSION:=3.6.1p1
+OPENNTPD_SOURCE:=openntpd-$(OPENNTPD_VERSION).tar.gz
+OPENNTPD_SITE:=ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD
+OPENNTPD_DIR:=$(BUILD_DIR)/openntpd-$(OPENNTPD_VERSION)
+OPENNTPD_CAT:=zcat
+OPENNTPD_BINARY:=ntpd
+OPENNTPD_TARGET_BINARY:=usr/sbin/foo
+
+$(DL_DIR)/$(OPENNTPD_SOURCE):
+	$(WGET) -P $(DL_DIR) $(OPENNTPD_SITE)/$(OPENNTPD_SOURCE)
+
+$(OPENNTPD_DIR)/.source: $(DL_DIR)/$(OPENNTPD_SOURCE)
+	zcat $(DL_DIR)/$(OPENNTPD_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+	touch $(OPENNTPD_DIR)/.source
+
+$(OPENNTPD_DIR)/.configured: $(OPENNTPD_DIR)/.source
+	(cd $(OPENNTPD_DIR); \
+		$(TARGET_CONFIGURE_OPTS) \
+		CFLAGS="$(TARGET_CFLAGS)" \
+		./configure \
+		--target=$(GNU_TARGET_NAME) \
+		--host=$(GNU_TARGET_NAME) \
+		--build=$(GNU_HOST_NAME) \
+		--prefix=/usr \
+		--sysconfdir=/etc \
+		--with-builtin-arc4random \
+	);
+	touch $(OPENNTPD_DIR)/.configured;
+
+$(OPENNTPD_DIR)/$(OPENNTPD_BINARY): $(OPENNTPD_DIR)/.configured
+	$(MAKE) CC=$(TARGET_CC) -C $(OPENNTPD_DIR)
+
+$(TARGET_DIR)/$(OPENNTPD_TARGET_BINARY): $(OPENNTPD_DIR)/$(OPENNTPD_BINARY)
+	$(MAKE) DESTDIR=$(TARGET_DIR)/usr -C $(OPENNTPD_DIR) install
+	cp $(OPENNTPD_DIR)/ntpd.conf $(TARGET_DIR)/etc
+	rm -Rf $(TARGET_DIR)/usr/man
+
+ntpd: uclibc $(TARGET_DIR)/$(OPENNTPD_TARGET_BINARY)
+
+ntpd-source: $(DL_DIR)/$(OPENNTPD_SOURCE)
+
+ntpd-clean:
+	$(MAKE) DESTDIR=$(TARGET_DIR)/usr -C $(OPENNTPD_DIR) uninstall
+	rm -f $(TARGET_DIR)/etc/ntpd.conf
+	-$(MAKE) -C $(OPENNTPD_DIR) clean
+
+ntpd-dirclean:
+	rm -rf $(OPENNTPD_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_OPENNTPD)),y)
+TARGETS+=ntpd
+endif
+




More information about the uClibc-cvs mailing list