Fix postinstallation script errors
[openwrt/svn-archive/archive.git] / net / ntpd / Makefile
index 2acd6a7..70c37d3 100644 (file)
@@ -4,17 +4,17 @@
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $
+# $Id$
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ntp
-PKG_VERSION:=4.2.2p4
+PKG_VERSION:=4.2.4
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/
-PKG_MD5SUM:=916fe57525f8327f340b203f129088fa
+PKG_MD5SUM:=eb9147d26cbe18bd8fbec07f1df55aef
 PKG_CAT:=zcat
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
@@ -35,6 +35,12 @@ define Package/ntpd/conffiles
 /etc/ntp.conf
 endef
 
+define Package/ntpd/postinst
+#!/bin/sh
+echo "ntp             123/udp     # Network Time Protocol
+ntp             123/tcp     # Network Time Protocol" >> $${IPKG_INSTROOT}/etc/services
+endef
+
 define Build/Configure
        $(call Build/Configure/Default, \
                 --disable-all-clocks \
@@ -60,9 +66,9 @@ define Package/ntpd/install
        $(INSTALL_DIR) $(1)/etc
        $(INSTALL_DATA) ./files/ntp.conf $(1)/etc/
        $(INSTALL_DIR) $(1)/etc/init.d
-       $(INSTALL_DATA) ./files/ntpd.init $(1)/etc/init.d/ntpd
+       $(INSTALL_BIN) ./files/ntpd.init $(1)/etc/init.d/ntpd
        $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
-       $(INSTALL_DATA) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd
+       $(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd
 endef
 
 $(eval $(call BuildPackage,ntpd))