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.

157 lines
3.7 KiB

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