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.

55 lines
1.6 KiB

  1. #
  2. # Copyright (C) 2015-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:=linuxptp
  9. PKG_VERSION:=1.9.2
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
  13. PKG_SOURCE_URL:=@SF/$(PKG_NAME)/v$(PKG_VERSION)
  14. PKG_HASH:=7f662e65c66c37ff211dc525476626875c2b74162ded05c8a25d036fb963b8d0
  15. PKG_LICENSE:=GPL-2.0
  16. PKG_LICENSE_FILES:=COPYING
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/linuxptp
  19. SECTION:=net
  20. CATEGORY:=Network
  21. SUBMENU:=Time Synchronization
  22. TITLE:=Linux Precision Time Protocol (PTP) daemon
  23. URL:=http://linuxptp.sourceforge.net/
  24. DEPENDS:=@!USE_UCLIBC +librt
  25. endef
  26. define Package/linuxptp/description
  27. The PTP daemon (PTPd) implements version 2 of the Precision Time Protocol (PTP)
  28. as defined by the IEEE 1588-2008 standard.
  29. PTP was developed to provide very precise time coordination of LAN connected
  30. computers.
  31. endef
  32. EXTRA_CFLAGS += -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC
  33. MAKE_VARS += \
  34. EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CFLAGS)"
  35. define Package/linuxptp/install
  36. $(INSTALL_DIR) $(1)/usr/sbin
  37. $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwstamp_ctl $(1)/usr/sbin/
  38. $(INSTALL_BIN) $(PKG_BUILD_DIR)/phc2sys $(1)/usr/sbin/
  39. $(INSTALL_BIN) $(PKG_BUILD_DIR)/phc_ctl $(1)/usr/sbin/
  40. $(INSTALL_BIN) $(PKG_BUILD_DIR)/pmc $(1)/usr/sbin/
  41. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ptp4l $(1)/usr/sbin/
  42. $(INSTALL_BIN) $(PKG_BUILD_DIR)/timemaster $(1)/usr/sbin/
  43. endef
  44. $(eval $(call BuildPackage,linuxptp))