X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=net%2Fntpd%2FMakefile;h=1c1b01b0ccb6c95f742fbf2ece7062cd4c20e3ab;hp=980b54c41c01a9d83b91ca529fa89de5e9b08abe;hb=7eb1fb4453b1662f6a10329207438fd0b73cbcae;hpb=fedc0bee8f2e28272a674ca43c80b281b6e96f0b diff --git a/net/ntpd/Makefile b/net/ntpd/Makefile index 980b54c41c..1c1b01b0cc 100644 --- a/net/ntpd/Makefile +++ b/net/ntpd/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2008 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ntp PKG_VERSION:=4.2.4p4 -PKG_RELEASE:=1 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ @@ -21,38 +21,84 @@ PKG_BUILD_DEPENDS:=libelf include $(INCLUDE_DIR)/package.mk -define Package/ntpd +define Package/ntpd/Default SUBMENU:=Time Synchronization SECTION:=net CATEGORY:=Network - TITLE:=full featured NTP server - DEPENDS:=+libreadline + TITLE:=ISC ntp URL:=http://www.ntp.org/ endef +define Package/ntpd/Default/description + The ISC ntp suite is a collection of tools used to synchronize + the system clock with remote NTP time servers and run/montior + local NTP servers. +endef + +define Package/ntpd + $(call Package/ntpd/Default) + TITLE+= server +endef + define Package/ntpd/description - The full featured original ntpd + $(call Package/ntpd/Default/description) + This package contains the ntpd server. +endef + +define Package/ntpdate + $(call Package/ntpd/Default) + TITLE+=date +endef + +define Package/ntpdate/description + $(call Package/ntpd/Default/description) + This package contains ntpdate. +endef + +define Package/ntp-utils + $(call Package/ntpd/Default) + DEPENDS:=+libreadline +libncurses + TITLE+= utilities +endef + +define Package/ntp-utils/description + $(call Package/ntpd/Default/description) + This package contains ntpdc and ntpq. endef define Package/ntpd/conffiles /etc/ntp.conf endef -define Package/ntpd/postinst +define Package/ntpd/Default/postinst #!/bin/sh -echo "ntp 123/udp # Network Time Protocol -ntp 123/tcp # Network Time Protocol" >> $${IPKG_INSTROOT}/etc/services +grep -q '^ntp[[:space:]]*123/udp' $${IPKG_INSTROOT}/etc/services 2>/dev/null +[ $$? -ne 0 ] && echo "ntp 123/udp # Network Time Protocol" >>$${IPKG_INSTROOT}/etc/services || exit 0 +grep -q '^ntp[[:space:]]*123/tcp' $${IPKG_INSTROOT}/etc/services 2>/dev/null +[ $$? -ne 0 ] && echo "ntp 123/tcp # Network Time Protocol" >>$${IPKG_INSTROOT}/etc/services || exit 0 +endef + +define Package/ntpdate/postinst + $(call Package/ntpd/Default/postinst) +endef + +define Package/ntpd/postinst + $(call Package/ntpd/Default/postinst) +endef + +define Package/ntp-utils/postinst + $(call Package/ntpd/Default/postinst) endef TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/libelf define Build/Configure $(call Build/Configure/Default, \ - --disable-all-clocks \ + --disable-all-clocks \ --disable-parse-clocks \ - --enable-NMEA \ + --enable-NMEA \ --enable-LOCAL-CLOCK \ - --enable-SHM \ + --enable-SHM \ --enable-linuxcaps \ ) endef @@ -62,12 +108,9 @@ define Build/Compile CFLAGS="$(TARGET_CFLAGS)" endef -define Package/ntpd/install +define Package/ntpd/install $(INSTALL_DIR) $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd/ntpd $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdate/ntpdate $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdc/ntpdc $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpq/ntpq $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc $(INSTALL_DATA) ./files/ntp.conf $(1)/etc/ $(INSTALL_DIR) $(1)/etc/init.d @@ -76,4 +119,19 @@ define Package/ntpd/install $(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd endef +define Package/ntpdate/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdate/ntpdate $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/ntpdate.init $(1)/etc/init.d/ntpdate +endef + +define Package/ntp-utils/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdc/ntpdc $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpq/ntpq $(1)/usr/sbin/ +endef + $(eval $(call BuildPackage,ntpd)) +$(eval $(call BuildPackage,ntpdate)) +$(eval $(call BuildPackage,ntp-utils))