You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

158 lines
3.8 KiB

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