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.

167 lines
4.0 KiB

  1. #
  2. # Copyright (C) 2006-2014 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.8
  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:=6972a626be6150db8cfbd0b63d8719e7
  14. PKG_LICENSE:=Unique
  15. PKG_LICENSE_FILES:=COPYRIGHT html/copyright.html
  16. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  17. PKG_FIXUP:=autoreconf
  18. PKG_LIBTOOL_PATHS:=. sntp
  19. PKG_CHECK_FORMAT_SECURITY:=0
  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:=+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. TITLE+= server
  38. USERID:=ntp=123:ntp=123
  39. DEPENDS+= +libopenssl +libpthread
  40. USERID:=ntp=123:ntp=123
  41. endef
  42. define Package/ntpd/description
  43. $(call Package/ntpd/Default/description)
  44. .
  45. This package contains the ntpd server.
  46. endef
  47. define Package/ntpdate
  48. $(call Package/ntpd/Default)
  49. TITLE+=date
  50. endef
  51. define Package/ntpdate/description
  52. $(call Package/ntpd/Default/description)
  53. .
  54. This package contains ntpdate.
  55. endef
  56. define Package/ntp-utils
  57. $(call Package/ntpd/Default)
  58. TITLE+= utilities
  59. DEPENDS+= +libpthread +libopenssl
  60. endef
  61. define Package/ntp-utils/description
  62. $(call Package/ntpd/Default/description)
  63. .
  64. This package contains ntpdc, ntpq and ntptime.
  65. endef
  66. define Package/ntp-keygen
  67. $(call Package/ntpd/Default)
  68. TITLE+=keygen
  69. DEPENDS+= +libopenssl +libpthread
  70. endef
  71. define Package/ntp-keygen/description
  72. $(call Package/ntpd/Default/description)
  73. .
  74. This package contains the ntp-keygen.
  75. endef
  76. define Package/ntpd/conffiles
  77. /etc/ntp.conf
  78. endef
  79. CONFIGURE_VARS += \
  80. ac_cv_header_md5_h=no \
  81. ac_cv_lib_rt_sched_setscheduler=no \
  82. ac_cv_header_dns_sd_h=no
  83. CONFIGURE_ARGS += \
  84. --disable-all-clocks \
  85. --disable-parse-clocks \
  86. --without-ntpsnmpd \
  87. --without-lineeditlibs \
  88. --enable-NMEA \
  89. --enable-LOCAL-CLOCK \
  90. --enable-SHM \
  91. --enable-linuxcaps \
  92. --with-yielding-select=yes \
  93. --with-crypto \
  94. --with-openssl-incdir="$(STAGING_DIR)/usr/include" \
  95. --with-openssl-libdir="$(STAGING_DIR)/usr/lib"
  96. define Package/ntpd/install
  97. $(INSTALL_DIR) $(1)/sbin
  98. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd/ntpd $(1)/sbin/
  99. $(INSTALL_DIR) $(1)/etc
  100. $(INSTALL_CONF) ./files/ntp.conf $(1)/etc/
  101. $(INSTALL_DIR) $(1)/etc/init.d
  102. $(INSTALL_BIN) ./files/ntpd.init $(1)/etc/init.d/ntpd
  103. $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
  104. $(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd
  105. endef
  106. define Package/ntpd/postinst
  107. #!/bin/sh
  108. [ -L "$${IPKG_INSTROOT}/usr/sbin/ntpd" ] && rm -f "$${IPKG_INSTROOT}/usr/sbin/ntpd"
  109. exit 0
  110. endef
  111. define Package/ntpd/postrm
  112. #!/bin/sh
  113. /bin/busybox ntpd -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/sbin/ntpd
  114. exit 0
  115. endef
  116. Package/ntpd-ssl/conffiles = $(Package/ntpd/conffiles)
  117. Package/ntpd-ssl/install = $(Package/ntpd/install)
  118. define Package/ntpdate/install
  119. $(INSTALL_DIR) $(1)/usr/sbin
  120. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdate/ntpdate $(1)/usr/sbin/
  121. $(INSTALL_DIR) $(1)/etc/init.d
  122. $(INSTALL_BIN) ./files/ntpdate.init $(1)/etc/init.d/ntpdate
  123. endef
  124. define Package/ntp-utils/install
  125. $(INSTALL_DIR) $(1)/usr/sbin
  126. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdc/ntpdc $(1)/usr/sbin/
  127. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpq/ntpq $(1)/usr/sbin/
  128. $(INSTALL_BIN) $(PKG_BUILD_DIR)/util/ntptime $(1)/usr/sbin/
  129. endef
  130. define Package/ntp-keygen/install
  131. $(INSTALL_DIR) $(1)/usr/sbin
  132. $(INSTALL_BIN) $(PKG_BUILD_DIR)/util/ntp-keygen $(1)/usr/sbin/
  133. endef
  134. Package/ntp-keygen-ssl/install = $(Package/ntp-keygen/install)
  135. $(eval $(call BuildPackage,ntpd))
  136. $(eval $(call BuildPackage,ntpdate))
  137. $(eval $(call BuildPackage,ntp-utils))
  138. $(eval $(call BuildPackage,ntp-keygen))