Category reorganization
[openwrt/svn-archive/archive.git] / net / ntpd / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=ntp
12 PKG_VERSION:=4.2.4
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/
17 PKG_MD5SUM:=eb9147d26cbe18bd8fbec07f1df55aef
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/ntpd
25 SUBMENU:=Time Synchronization
26 SECTION:=net
27 CATEGORY:=Network
28 TITLE:=full featured NTP server
29 DEPENDS:=+libreadline
30 DESCRIPTION:=\
31 The full featured original ntpd
32 URL:=http://www.ntp.org/
33 endef
34
35 define Package/ntpd/conffiles
36 /etc/ntp.conf
37 endef
38
39 define Package/ntpd/postinst
40 #!/bin/sh
41 echo "ntp 123/udp # Network Time Protocol
42 ntp 123/tcp # Network Time Protocol" >> $${IPKG_INSTROOT}/etc/services
43 endef
44
45 define Build/Configure
46 $(call Build/Configure/Default, \
47 --disable-all-clocks \
48 --disable-parse-clocks \
49 --enable-NMEA \
50 --enable-LOCAL-CLOCK \
51 --enable-SHM \
52 --enable-linuxcaps \
53 )
54 endef
55
56 define Build/Compile
57 $(MAKE) -C $(PKG_BUILD_DIR) \
58 CFLAGS="$(TARGET_CFLAGS)"
59 endef
60
61 define Package/ntpd/install
62 $(INSTALL_DIR) $(1)/usr/sbin/
63 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd/ntpd $(1)/usr/sbin/
64 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdate/ntpdate $(1)/usr/sbin/
65 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdc/ntpdc $(1)/usr/sbin/
66 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpq/ntpq $(1)/usr/sbin/
67 $(INSTALL_DIR) $(1)/etc
68 $(INSTALL_DATA) ./files/ntp.conf $(1)/etc/
69 $(INSTALL_DIR) $(1)/etc/init.d
70 $(INSTALL_BIN) ./files/ntpd.init $(1)/etc/init.d/ntpd
71 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
72 $(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd
73 endef
74
75 $(eval $(call BuildPackage,ntpd))