Makefile (4000B)
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:=1 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 TITLE+= server 46 USERID:=ntp=123:ntp=123 47 endef 48 49 define Package/ntpd/description 50 $(call Package/ntpd/Default/description) 51 . 52 This package contains the ntpd server. 53 endef 54 55 define Package/ntpdate 56 $(call Package/ntpd/Default) 57 TITLE+=date 58 endef 59 60 define Package/ntpdate/description 61 $(call Package/ntpd/Default/description) 62 . 63 This package contains ntpdate. 64 endef 65 66 define Package/ntp-utils 67 $(call Package/ntpd/Default) 68 TITLE+= utilities 69 endef 70 71 define Package/ntp-utils/description 72 $(call Package/ntpd/Default/description) 73 . 74 This package contains ntpdc, ntpq and ntptime. 75 endef 76 77 define Package/ntp-keygen 78 $(call Package/ntpd/Default) 79 TITLE+=keygen 80 DEPENDS+= +libevent2-core 81 endef 82 83 define Package/ntp-keygen/description 84 $(call Package/ntpd/Default/description) 85 . 86 This package contains the ntp-keygen. 87 endef 88 89 define Package/ntpd/conffiles 90 /etc/ntp.conf 91 endef 92 93 CONFIGURE_VARS += \ 94 ac_cv_header_md5_h=no \ 95 ac_cv_lib_rt_sched_setscheduler=no \ 96 ac_cv_header_dns_sd_h=no \ 97 hw_cv_func_snprintf_c99=yes \ 98 hw_cv_func_vsnprintf_c99=yes \ 99 100 CONFIGURE_ARGS += \ 101 --disable-all-clocks \ 102 --disable-parse-clocks \ 103 --without-ntpsnmpd \ 104 --without-lineeditlibs \ 105 --enable-NMEA \ 106 --enable-LOCAL-CLOCK \ 107 --enable-SHM \ 108 --enable-ATOM \ 109 --enable-linuxcaps \ 110 --with-yielding-select=yes \ 111 --with-crypto \ 112 --with-openssl-incdir="$(STAGING_DIR)/usr/include" \ 113 --with-openssl-libdir="$(STAGING_DIR)/usr/lib" 114 115 define Package/ntpd/install 116 $(INSTALL_DIR) $(1)/sbin 117 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd/ntpd $(1)/sbin/ 118 $(INSTALL_DIR) $(1)/usr/sbin 119 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpq/ntpq $(1)/usr/sbin/ 120 $(INSTALL_BIN) ./files/ntpd.hotplug-helper $(1)/usr/sbin/ 121 $(INSTALL_DIR) $(1)/etc 122 $(INSTALL_CONF) ./files/ntp.conf $(1)/etc/ 123 $(INSTALL_DIR) $(1)/etc/init.d 124 $(INSTALL_BIN) ./files/ntpd.init $(1)/etc/init.d/ntpd 125 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface 126 $(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd 127 endef 128 129 define Package/ntpd/postinst 130 #!/bin/sh 131 [ -L "$${IPKG_INSTROOT}/usr/sbin/ntpd" ] && rm -f "$${IPKG_INSTROOT}/usr/sbin/ntpd" 132 exit 0 133 endef 134 135 define Package/ntpd/postrm 136 #!/bin/sh 137 /bin/busybox ntpd -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/sbin/ntpd 138 exit 0 139 endef 140 141 define Package/ntpdate/install 142 $(INSTALL_DIR) $(1)/usr/sbin 143 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdate/ntpdate $(1)/usr/sbin/ 144 $(INSTALL_DIR) $(1)/etc/init.d 145 $(INSTALL_BIN) ./files/ntpdate.init $(1)/etc/init.d/ntpdate 146 endef 147 148 define Package/ntp-utils/install 149 $(INSTALL_DIR) $(1)/usr/sbin 150 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdc/ntpdc $(1)/usr/sbin/ 151 $(INSTALL_BIN) $(PKG_BUILD_DIR)/util/ntptime $(1)/usr/sbin/ 152 endef 153 154 define Package/ntp-keygen/install 155 $(INSTALL_DIR) $(1)/usr/sbin 156 $(INSTALL_BIN) $(PKG_BUILD_DIR)/util/ntp-keygen $(1)/usr/sbin/ 157 endef 158 159 $(eval $(call BuildPackage,ntpd)) 160 $(eval $(call BuildPackage,ntpdate)) 161 $(eval $(call BuildPackage,ntp-utils)) 162 $(eval $(call BuildPackage,ntp-keygen))