udptunnel: new package
[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.8p12
12 PKG_RELEASE:=2
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:=709b222b5013d77d26bfff532b5ea470a8039497ef29d09363931c036cb30454
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 PKG_BUILD_PARALLEL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/ntpd/Default
29 SUBMENU:=Time Synchronization
30 SECTION:=net
31 CATEGORY:=Network
32 TITLE:=ISC ntp
33 MAINTAINER:=Peter Wagner <tripolar@gmx.at>
34 URL:=http://www.ntp.org/
35 DEPENDS:=+libopenssl +libpthread +libcap
36 endef
37
38 define Package/ntpd/Default/description
39 The ISC ntp suite is a collection of tools used to synchronize the
40 system clock with remote NTP time servers and run/monitor local NTP
41 servers.
42 endef
43
44 define Package/ntpd
45 $(call Package/ntpd/Default)
46 DEPENDS+= +ntp-utils
47 TITLE+= server
48 USERID:=ntp=123:ntp=123
49 endef
50
51 define Package/ntpd/description
52 $(call Package/ntpd/Default/description)
53 .
54 This package contains the ntpd server.
55 endef
56
57 define Package/ntpdate
58 $(call Package/ntpd/Default)
59 TITLE+=date
60 endef
61
62 define Package/ntpdate/description
63 $(call Package/ntpd/Default/description)
64 .
65 This package contains ntpdate.
66 endef
67
68 define Package/ntp-utils
69 $(call Package/ntpd/Default)
70 TITLE+= utilities
71 endef
72
73 define Package/ntp-utils/description
74 $(call Package/ntpd/Default/description)
75 .
76 This package contains ntpdc, ntpq and ntptime.
77 endef
78
79 define Package/ntp-keygen
80 $(call Package/ntpd/Default)
81 TITLE+=keygen
82 DEPENDS+= +libevent2-core
83 endef
84
85 define Package/ntp-keygen/description
86 $(call Package/ntpd/Default/description)
87 .
88 This package contains the ntp-keygen.
89 endef
90
91 CONFIGURE_VARS += \
92 ac_cv_header_md5_h=no \
93 ac_cv_lib_rt_sched_setscheduler=no \
94 ac_cv_header_dns_sd_h=no \
95 hw_cv_func_snprintf_c99=yes \
96 hw_cv_func_vsnprintf_c99=yes \
97
98 CONFIGURE_ARGS += \
99 --disable-all-clocks \
100 --disable-parse-clocks \
101 --without-ntpsnmpd \
102 --without-lineeditlibs \
103 --enable-NMEA \
104 --enable-LOCAL-CLOCK \
105 --enable-SHM \
106 --enable-ATOM \
107 --enable-linuxcaps \
108 --with-yielding-select=yes \
109 --with-crypto \
110 --with-openssl-incdir="$(STAGING_DIR)/usr/include" \
111 --with-openssl-libdir="$(STAGING_DIR)/usr/lib"
112
113 define Package/ntpd/install
114 $(INSTALL_DIR) $(1)/sbin
115 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd/ntpd $(1)/sbin/
116 $(INSTALL_DIR) $(1)/usr/sbin
117 $(INSTALL_BIN) ./files/ntpd.hotplug-helper $(1)/usr/sbin/
118 $(INSTALL_DIR) $(1)/etc/init.d
119 $(INSTALL_BIN) ./files/ntpd.init $(1)/etc/init.d/ntpd
120 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
121 $(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd
122 endef
123
124 define Package/ntpd/postinst
125 #!/bin/sh
126 [ -L "$${IPKG_INSTROOT}/usr/sbin/ntpd" ] && rm -f "$${IPKG_INSTROOT}/usr/sbin/ntpd"
127 exit 0
128 endef
129
130 define Package/ntpd/postrm
131 #!/bin/sh
132 /bin/busybox ntpd -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/sbin/ntpd
133 exit 0
134 endef
135
136 define Package/ntpdate/install
137 $(INSTALL_DIR) $(1)/usr/sbin
138 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdate/ntpdate $(1)/usr/sbin/
139 $(INSTALL_DIR) $(1)/etc/init.d
140 $(INSTALL_BIN) ./files/ntpdate.init $(1)/etc/init.d/ntpdate
141 endef
142
143 define Package/ntp-utils/install
144 $(INSTALL_DIR) $(1)/usr/sbin
145 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdc/ntpdc $(1)/usr/sbin/
146 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpq/ntpq $(1)/usr/sbin/
147 $(INSTALL_BIN) $(PKG_BUILD_DIR)/util/ntptime $(1)/usr/sbin/
148 endef
149
150 define Package/ntp-keygen/install
151 $(INSTALL_DIR) $(1)/usr/sbin
152 $(INSTALL_BIN) $(PKG_BUILD_DIR)/util/ntp-keygen $(1)/usr/sbin/
153 endef
154
155 $(eval $(call BuildPackage,ntpd))
156 $(eval $(call BuildPackage,ntpdate))
157 $(eval $(call BuildPackage,ntp-utils))
158 $(eval $(call BuildPackage,ntp-keygen))