ntpd: remove ntp.conf
[feed/packages.git] / net / ntpd / Makefile
1 #
2 # Copyright (C) 2006-2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=ntp
11 PKG_VERSION:=4.2.8p10
12 PKG_RELEASE:=4
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
16 PKG_HASH:=ddd2366e64219b9efa0f7438e06800d0db394ac5c88e13c17b70d0dcdf99b99f
17
18 PKG_LICENSE:=Unique
19 PKG_LICENSE_FILES:=COPYRIGHT html/copyright.html
20
21 PKG_FIXUP:=autoreconf
22 PKG_LIBTOOL_PATHS:=. sntp
23 PKG_CHECK_FORMAT_SECURITY:=0
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/ntpd/Default
28 SUBMENU:=Time Synchronization
29 SECTION:=net
30 CATEGORY:=Network
31 TITLE:=ISC ntp
32 MAINTAINER:=Peter Wagner <tripolar@gmx.at>
33 URL:=http://www.ntp.org/
34 DEPENDS:=+libopenssl +libpthread +libcap
35 endef
36
37 define Package/ntpd/Default/description
38 The ISC ntp suite is a collection of tools used to synchronize the
39 system clock with remote NTP time servers and run/monitor local NTP
40 servers.
41 endef
42
43 define Package/ntpd
44 $(call Package/ntpd/Default)
45 DEPENDS+= +ntp-utils
46 TITLE+= server
47 USERID:=ntp=123:ntp=123
48 endef
49
50 define Package/ntpd/description
51 $(call Package/ntpd/Default/description)
52 .
53 This package contains the ntpd server.
54 endef
55
56 define Package/ntpdate
57 $(call Package/ntpd/Default)
58 TITLE+=date
59 endef
60
61 define Package/ntpdate/description
62 $(call Package/ntpd/Default/description)
63 .
64 This package contains ntpdate.
65 endef
66
67 define Package/ntp-utils
68 $(call Package/ntpd/Default)
69 TITLE+= utilities
70 endef
71
72 define Package/ntp-utils/description
73 $(call Package/ntpd/Default/description)
74 .
75 This package contains ntpdc, ntpq and ntptime.
76 endef
77
78 define Package/ntp-keygen
79 $(call Package/ntpd/Default)
80 TITLE+=keygen
81 DEPENDS+= +libevent2-core
82 endef
83
84 define Package/ntp-keygen/description
85 $(call Package/ntpd/Default/description)
86 .
87 This package contains the ntp-keygen.
88 endef
89
90 CONFIGURE_VARS += \
91 ac_cv_header_md5_h=no \
92 ac_cv_lib_rt_sched_setscheduler=no \
93 ac_cv_header_dns_sd_h=no \
94 hw_cv_func_snprintf_c99=yes \
95 hw_cv_func_vsnprintf_c99=yes \
96
97 CONFIGURE_ARGS += \
98 --disable-all-clocks \
99 --disable-parse-clocks \
100 --without-ntpsnmpd \
101 --without-lineeditlibs \
102 --enable-NMEA \
103 --enable-LOCAL-CLOCK \
104 --enable-SHM \
105 --enable-ATOM \
106 --enable-linuxcaps \
107 --with-yielding-select=yes \
108 --with-crypto \
109 --with-openssl-incdir="$(STAGING_DIR)/usr/include" \
110 --with-openssl-libdir="$(STAGING_DIR)/usr/lib"
111
112 define Package/ntpd/install
113 $(INSTALL_DIR) $(1)/sbin
114 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd/ntpd $(1)/sbin/
115 $(INSTALL_DIR) $(1)/usr/sbin
116 $(INSTALL_BIN) ./files/ntpd.hotplug-helper $(1)/usr/sbin/
117 $(INSTALL_DIR) $(1)/etc/init.d
118 $(INSTALL_BIN) ./files/ntpd.init $(1)/etc/init.d/ntpd
119 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
120 $(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd
121 endef
122
123 define Package/ntpd/postinst
124 #!/bin/sh
125 [ -L "$${IPKG_INSTROOT}/usr/sbin/ntpd" ] && rm -f "$${IPKG_INSTROOT}/usr/sbin/ntpd"
126 exit 0
127 endef
128
129 define Package/ntpd/postrm
130 #!/bin/sh
131 /bin/busybox ntpd -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/sbin/ntpd
132 exit 0
133 endef
134
135 define Package/ntpdate/install
136 $(INSTALL_DIR) $(1)/usr/sbin
137 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdate/ntpdate $(1)/usr/sbin/
138 $(INSTALL_DIR) $(1)/etc/init.d
139 $(INSTALL_BIN) ./files/ntpdate.init $(1)/etc/init.d/ntpdate
140 endef
141
142 define Package/ntp-utils/install
143 $(INSTALL_DIR) $(1)/usr/sbin
144 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdc/ntpdc $(1)/usr/sbin/
145 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpq/ntpq $(1)/usr/sbin/
146 $(INSTALL_BIN) $(PKG_BUILD_DIR)/util/ntptime $(1)/usr/sbin/
147 endef
148
149 define Package/ntp-keygen/install
150 $(INSTALL_DIR) $(1)/usr/sbin
151 $(INSTALL_BIN) $(PKG_BUILD_DIR)/util/ntp-keygen $(1)/usr/sbin/
152 endef
153
154 $(eval $(call BuildPackage,ntpd))
155 $(eval $(call BuildPackage,ntpdate))
156 $(eval $(call BuildPackage,ntp-utils))
157 $(eval $(call BuildPackage,ntp-keygen))