3ca2d7446e510c7b25b205c772cd815403fe618e
[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: Makefile 5624 2006-11-23 00:29:07Z nbd $
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 SECTION:=net
26 CATEGORY:=Network
27 TITLE:=full featured NTP server
28 DEPENDS:=+libreadline
29 DESCRIPTION:=\
30 The full featured original ntpd
31 URL:=http://www.ntp.org/
32 endef
33
34 define Package/ntpd/conffiles
35 /etc/ntp.conf
36 endef
37
38 define Build/Configure
39 $(call Build/Configure/Default, \
40 --disable-all-clocks \
41 --disable-parse-clocks \
42 --enable-NMEA \
43 --enable-LOCAL-CLOCK \
44 --enable-SHM \
45 --enable-linuxcaps \
46 )
47 endef
48
49 define Build/Compile
50 $(MAKE) -C $(PKG_BUILD_DIR) \
51 CFLAGS="$(TARGET_CFLAGS)"
52 endef
53
54 define Package/ntpd/install
55 $(INSTALL_DIR) $(1)/usr/sbin/
56 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd/ntpd $(1)/usr/sbin/
57 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdate/ntpdate $(1)/usr/sbin/
58 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdc/ntpdc $(1)/usr/sbin/
59 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpq/ntpq $(1)/usr/sbin/
60 $(INSTALL_DIR) $(1)/etc
61 $(INSTALL_DATA) ./files/ntp.conf $(1)/etc/
62 $(INSTALL_DIR) $(1)/etc/init.d
63 $(INSTALL_DATA) ./files/ntpd.init $(1)/etc/init.d/ntpd
64 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
65 $(INSTALL_DATA) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd
66 endef
67
68 $(eval $(call BuildPackage,ntpd))