aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2016-01-19 10:16:45 +0000
committerJohn Crispin <john@openwrt.org>2016-01-19 10:16:45 +0000
commit29ec3811c0d045355f71136ef9ee216191f8eab5 (patch)
tree9a3e2e7a9ead77c772a968cbd3a68a8030b4c8a0 /net
parent78a6a9aec306f3fa53b3eaffb35a2344c26a43c7 (diff)
downloadupstream-29ec3811c0d045355f71136ef9ee216191f8eab5.tar.gz
upstream-29ec3811c0d045355f71136ef9ee216191f8eab5.tar.bz2
upstream-29ec3811c0d045355f71136ef9ee216191f8eab5.zip
linuxptp: Add package
Linuxptp is a user space software implementation of IEEE 1588 Precision Time Protocol standard. v4: Don't compile on uclibc Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com> SVN-Revision: 48361
Diffstat (limited to 'net')
-rw-r--r--net/linuxptp/Makefile50
-rw-r--r--net/linuxptp/patches/001-musl-fix.patch12
2 files changed, 62 insertions, 0 deletions
diff --git a/net/linuxptp/Makefile b/net/linuxptp/Makefile
new file mode 100644
index 0000000000..2d9d3a8967
--- /dev/null
+++ b/net/linuxptp/Makefile
@@ -0,0 +1,50 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=linuxptp
+PKG_VERSION:=20151118
+PKG_RELEASE:=1
+PKG_REV:=999c86f4a9da4bf4508b3a69289f58166ed18a55
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=git://git.code.sf.net/p/linuxptp/code
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_SOURCE_PROTO:=git
+PKG_MD5SUM:=
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/linuxptp
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=Time Synchronization
+ TITLE:=Linux Precision Time Protocol (PTP) daemon
+ URL:=http://linuxptp.sourceforge.net/
+ DEPENDS:=@!USE_UCLIBC +librt
+endef
+
+define Package/linuxptp/description
+ The PTP daemon (PTPd) implements version 2 of the Precision Time Protocol (PTP)
+ as defined by the IEEE 1588-2008 standard.
+ PTP was developed to provide very precise time coordination of LAN connected
+ computers.
+endef
+
+define Package/linuxptp/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwstamp_ctl $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/phc2sys $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/phc_ctl $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/pmc $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/ptp4l $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/timemaster $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,linuxptp))
diff --git a/net/linuxptp/patches/001-musl-fix.patch b/net/linuxptp/patches/001-musl-fix.patch
new file mode 100644
index 0000000000..41302c7b3b
--- /dev/null
+++ b/net/linuxptp/patches/001-musl-fix.patch
@@ -0,0 +1,12 @@
+Index: linuxptp-20151118/raw.c
+===================================================================
+--- linuxptp-20151118.orig/raw.c 2016-01-08 13:39:56.000000000 +0100
++++ linuxptp-20151118/raw.c 2016-01-13 09:16:51.951784148 +0100
+@@ -20,7 +20,6 @@
+ #include <fcntl.h>
+ #include <linux/filter.h>
+ #include <linux/if_ether.h>
+-#include <net/ethernet.h>
+ #include <net/if.h>
+ #include <netinet/in.h>
+ #include <netpacket/packet.h>