# 
# Copyright (C) 2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
:# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=linuxptp
PKG_VERSION:=1.8
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://sourceforge.net/projects/linuxptp/files/latest/download
PKG_BUILD_DIR:=$(BUILD_DIR)/linuxptp-$(PKG_VERSION)


include $(INCLUDE_DIR)/package.mk

define Package/linuxptp
  SECTION:=base
  CATEGORY:=base
  DEFAULT:=y
  TITLE:=PTP tooling for linux
  DEPENDS:=
endef

define Package/linuxptp/description
Tooling for linux ptp
endef


define Build/Configure
echo "configure"
endef

define Package/linuxptp/install
echo "install"
	# creates /usr/sbin directory
	$(INSTALL_DIR) $(1)/usr/sbin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ptp4l $(1)/usr/sbin/
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/pmc $(1)/usr/sbin/
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/phc2sys $(1)/usr/sbin/
endef


$(eval $(call BuildPackage,linuxptp))

