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.

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