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.

54 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:=2.0
  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:=0a24d9401e87d4af023d201e234d91127d82c350daad93432106284aa9459c7d
  14. PKG_MAINTAINER:=Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
  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. endef
  25. define Package/linuxptp/description
  26. The PTP daemon (PTPd) implements version 2 of the Precision Time Protocol (PTP)
  27. as defined by the IEEE 1588-2008 standard.
  28. PTP was developed to provide very precise time coordination of LAN connected
  29. computers.
  30. endef
  31. EXTRA_CFLAGS += -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC
  32. MAKE_VARS += \
  33. EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CFLAGS)"
  34. define Package/linuxptp/install
  35. $(INSTALL_DIR) $(1)/usr/sbin
  36. $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwstamp_ctl $(1)/usr/sbin/
  37. $(INSTALL_BIN) $(PKG_BUILD_DIR)/phc2sys $(1)/usr/sbin/
  38. $(INSTALL_BIN) $(PKG_BUILD_DIR)/phc_ctl $(1)/usr/sbin/
  39. $(INSTALL_BIN) $(PKG_BUILD_DIR)/pmc $(1)/usr/sbin/
  40. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ptp4l $(1)/usr/sbin/
  41. $(INSTALL_BIN) $(PKG_BUILD_DIR)/timemaster $(1)/usr/sbin/
  42. endef
  43. $(eval $(call BuildPackage,linuxptp))