linuxptp: Add package
[openwrt.git] / net / linuxptp / Makefile
1 #
2 # Copyright (C) 2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=linuxptp
11 PKG_VERSION:=20151118
12 PKG_RELEASE:=1
13 PKG_REV:=999c86f4a9da4bf4508b3a69289f58166ed18a55
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=git://git.code.sf.net/p/linuxptp/code
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE_VERSION:=$(PKG_REV)
19 PKG_SOURCE_PROTO:=git
20 PKG_MD5SUM:=
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/linuxptp
25   SECTION:=net
26   CATEGORY:=Network
27   SUBMENU:=Time Synchronization
28   TITLE:=Linux Precision Time Protocol (PTP) daemon
29   URL:=http://linuxptp.sourceforge.net/
30   DEPENDS:=@!USE_UCLIBC +librt
31 endef
32
33 define Package/linuxptp/description
34  The PTP daemon (PTPd) implements version 2 of the Precision Time Protocol (PTP)
35  as defined by the IEEE 1588-2008 standard.
36  PTP was developed to provide very precise time coordination of LAN connected
37  computers.
38 endef
39
40 define Package/linuxptp/install
41         $(INSTALL_DIR) $(1)/usr/sbin
42         $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwstamp_ctl $(1)/usr/sbin/
43         $(INSTALL_BIN) $(PKG_BUILD_DIR)/phc2sys $(1)/usr/sbin/
44         $(INSTALL_BIN) $(PKG_BUILD_DIR)/phc_ctl $(1)/usr/sbin/
45         $(INSTALL_BIN) $(PKG_BUILD_DIR)/pmc $(1)/usr/sbin/
46         $(INSTALL_BIN) $(PKG_BUILD_DIR)/ptp4l $(1)/usr/sbin/
47         $(INSTALL_BIN) $(PKG_BUILD_DIR)/timemaster $(1)/usr/sbin/
48 endef
49
50 $(eval $(call BuildPackage,linuxptp))