[Packages] net/wifidog:
[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.4p4
13 PKG_RELEASE:=3
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:=fcb32a01e1ae3f9ed5bac86b12c7a1cc
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_BUILD_DEPENDS:=libelf
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 URL:=http://www.ntp.org/
31 endef
32
33 define Package/ntpd/description
34 The full featured original ntpd
35 endef
36
37 define Package/ntpd/conffiles
38 /etc/ntp.conf
39 endef
40
41 define Package/ntpd/postinst
42 #!/bin/sh
43 echo "ntp 123/udp # Network Time Protocol
44 ntp 123/tcp # Network Time Protocol" >> $${IPKG_INSTROOT}/etc/services
45 endef
46
47 TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/libelf
48
49 define Build/Configure
50 $(call Build/Configure/Default, \
51 --disable-all-clocks \
52 --disable-parse-clocks \
53 --enable-NMEA \
54 --enable-LOCAL-CLOCK \
55 --enable-SHM \
56 --enable-linuxcaps \
57 )
58 endef
59
60 define Build/Compile
61 $(MAKE) -C $(PKG_BUILD_DIR) \
62 CFLAGS="$(TARGET_CFLAGS)"
63 endef
64
65 define Package/ntpd/install
66 $(INSTALL_DIR) $(1)/usr/sbin/
67 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd/ntpd $(1)/usr/sbin/
68 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdate/ntpdate $(1)/usr/sbin/
69 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdc/ntpdc $(1)/usr/sbin/
70 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpq/ntpq $(1)/usr/sbin/
71 $(INSTALL_DIR) $(1)/etc
72 $(INSTALL_DATA) ./files/ntp.conf $(1)/etc/
73 $(INSTALL_DIR) $(1)/etc/init.d
74 $(INSTALL_BIN) ./files/ntpd.init $(1)/etc/init.d/ntpd
75 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
76 $(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd
77 endef
78
79 $(eval $(call BuildPackage,ntpd))