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:=3.1.1
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
  12. PKG_SOURCE_URL:=@SF/$(PKG_NAME)/v$(PKG_VERSION)
  13. PKG_HASH:=94d6855f9b7f2d8e9b0ca6d384e3fae6226ce6fc012dbad02608bdef3be1c0d9
  14. PKG_MAINTAINER:=Wojciech Dubowik <Wojciech.Dubowik@westermo.com>
  15. PKG_LICENSE:=GPL-2.0
  16. PKG_LICENSE_FILES:=COPYING
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/kernel.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. 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. KBUILD_OUTPUT="$(LINUX_DIR)"
  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))