Skip to contentSkip to conversation

ptpd: new package

PATCH New Gustavo Zacarias 3 participants 5 messages May 7, 2013 – May 11, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ptpd: new package

Add the new ptpd package, loosely based on the one from bug #2305. This one handles the IEEE 1588-2002 spec.

---
 package/Config.in      |  1 +
 package/ptpd/Config.in |  7 +++++++
 package/ptpd/S65ptpd   | 29 +++++++++++++++++++++++++++++
 package/ptpd/ptpd.mk   | 25 +++++++++++++++++++++++++
 4 files changed, 62 insertions(+)
 create mode 100644 package/ptpd/Config.in
 create mode 100644 package/ptpd/S65ptpd
 create mode 100644 package/ptpd/ptpd.mk
package/Config.in +1 -0
index 2cf2443..7546d51 100644
@@ -753,6 +753,7 @@ source "package/pppd/Config.in"
 source "package/pptp-linux/Config.in"
 source "package/proftpd/Config.in"
 source "package/proxychains-ng/Config.in"
+source "package/ptpd/Config.in"
 source "package/quagga/Config.in"
 source "package/radvd/Config.in"
 source "package/rp-pppoe/Config.in"
package/ptpd/Config.in new file +7 -0
new file mode 100644
index 0000000..2d87ca3
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_PTPD
+	bool "ptpd"
+	help
+	  The PTP daemon (PTPd) implements the Precision Time protocol
+	  (PTP) as defined by the IEEE-1588-2002.
+
+	  http://ptpd.sourceforge.net/
package/ptpd/S65ptpd new file +29 -0
new file mode 100644
index 0000000..4206c5e
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# Start ptpd
+#
+
+case "$1" in
+  start)
+	echo -n "Starting ptpd: "
+	start-stop-daemon -S -q -x /usr/sbin/ptpd -- -S
+	if [ $? != 0 ]; then
+		echo "FAILED"
+		exit 1
+	else
+		echo "OK"
+	fi
+	;;
+  stop)
+	echo -n "Stopping ptpd: "
+	start-stop-daemon -K -q -x /usr/sbin/ptpd
+	echo "OK"
+	;;
+  restart|reload)
+	;;
+  *)
+	echo "Usage: $0 {start|stop|restart}"
+	exit 1
+esac
+
+exit $?
package/ptpd/ptpd.mk new file +25 -0
new file mode 100644
index 0000000..481a64e
@@ -0,0 +1,25 @@
+#############################################################
+#
+# ptpd
+#
+#############################################################
+
+PTPD_VERSION = 1.1.0
+PTPD_SITE = http://downloads.sourceforge.net/project/ptpd/ptpd/$(PTPD_VERSION)
+PTPD_LICENSE = BSD
+PTPD_LICENSE_FILES = COPYRIGHT
+
+define PTPD_BUILD_CMDS
+	$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/src
+endef
+
+define PTPD_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 755 -D $(@D)/src/ptpd $(TARGET_DIR)/usr/sbin/ptpd
+endef
+
+define PTPD_INSTALL_INIT_SYSV
+	$(INSTALL) -m 755 -D package/ptpd/S65ptpd \
+		$(TARGET_DIR)/etc/init.d/S65ptpd
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.8.1.5
#1 lore raw

PATCH 2/2 ptpd2: new package

Add the ptpd2 package, handles the IEEE 1588-2008 spec which is not backward compatible to IEEE 1588-2002.

---
 package/Config.in       |  1 +
 package/ptpd2/Config.in |  7 +++++++
 package/ptpd2/S65ptpd2  | 29 +++++++++++++++++++++++++++++
 package/ptpd2/ptpd2.mk  | 26 ++++++++++++++++++++++++++
 4 files changed, 63 insertions(+)
 create mode 100644 package/ptpd2/Config.in
 create mode 100644 package/ptpd2/S65ptpd2
 create mode 100644 package/ptpd2/ptpd2.mk
package/Config.in +1 -0
index 7546d51..ca50349 100644
@@ -754,6 +754,7 @@ source "package/pptp-linux/Config.in"
 source "package/proftpd/Config.in"
 source "package/proxychains-ng/Config.in"
 source "package/ptpd/Config.in"
+source "package/ptpd2/Config.in"
 source "package/quagga/Config.in"
 source "package/radvd/Config.in"
 source "package/rp-pppoe/Config.in"
package/ptpd2/Config.in new file +7 -0
new file mode 100644
index 0000000..bf26453
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_PTPD2
+	bool "ptpd2"
+	help
+	  The PTP daemon (PTPd) implements the Precision Time protocol
+	  (PTP) as defined by the IEEE-1588-2008.
+
+	  http://ptpd.sourceforge.net/
package/ptpd2/S65ptpd2 new file +29 -0
new file mode 100644
index 0000000..7d4ee7f
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# Start ptpd2
+#
+
+case "$1" in
+  start)
+	echo -n "Starting ptpd2: "
+	start-stop-daemon -S -q -x /usr/sbin/ptpd2 -- -g
+	if [ $? != 0 ]; then
+		echo "FAILED"
+		exit 1
+	else
+		echo "OK"
+	fi
+	;;
+  stop)
+	echo -n "Stopping ptpd2: "
+	start-stop-daemon -K -q -x /usr/sbin/ptpd2
+	echo "OK"
+	;;
+  restart|reload)
+	;;
+  *)
+	echo "Usage: $0 {start|stop|restart}"
+	exit 1
+esac
+
+exit $?
package/ptpd2/ptpd2.mk new file +26 -0
new file mode 100644
index 0000000..04a0070
@@ -0,0 +1,26 @@
+#############################################################
+#
+# ptpd2
+#
+#############################################################
+
+PTPD2_VERSION = 2.2.2
+PTPD2_SITE = http://downloads.sourceforge.net/project/ptpd/ptpd/$(PTPD2_VERSION)
+PTPD2_SOURCE = ptpd-$(PTPD2_VERSION).tar.gz
+PTPD2_LICENSE = BSD-2c
+PTPD2_LICENSE_FILES = COPYRIGHT
+
+define PTPD2_BUILD_CMDS
+	$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/src
+endef
+
+define PTPD2_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 755 -D $(@D)/src/ptpd2 $(TARGET_DIR)/usr/sbin/ptpd2
+endef
+
+define PTPD2_INSTALL_INIT_SYSV
+	$(INSTALL) -m 755 -D package/ptpd2/S65ptpd2 \
+		$(TARGET_DIR)/etc/init.d/S65ptpd2
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.8.1.5
#2 lore raw

PATCH 2/2 ptpd2: new package

Hi Gustavo,

Quoted 4 lines · Gustavo Zacarias

Add the ptpd2 package, handles the IEEE 1588-2008 spec which is not backward compatible to IEEE 1588-2002.

[snip]

package/ptpd2/Config.in line 5

Quoted 5 lines
package/ptpd2/Config.in new file +5 -0
+config BR2_PACKAGE_PTPD2
+	bool "ptpd2"
+	help
+	  The PTP daemon (PTPd) implements the Precision Time protocol
+	  (PTP) as defined by the IEEE-1588-2008.

Please mention here also that this package is not compatible with IEEE 1588-2002, and that the ptpd should be used instead.

baurch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#3 lore raw

PATCH 2/2 ptpd2: new package

Quoted 8 lines · Baruch Siach

package/ptpd2/Config.in line 5

Quoted 5 lines
package/ptpd2/Config.in new file +5 -0
+config BR2_PACKAGE_PTPD2
+	bool "ptpd2"
+	help
+	  The PTP daemon (PTPd) implements the Precision Time protocol
+	  (PTP) as defined by the IEEE-1588-2008.

Please mention here also that this package is not compatible with IEEE 1588-2002, and that the ptpd should be used instead.

One would assume people know which standard they're targetting, the incompatibility is inherent in the protocol, not the daemon. I just made it clear in the commit so that people wouldn't think i'm crazy by doing two versions of the (presumably) same package. I'm crazy for other reasons though :)
Regards.

#4 lore raw

PATCH 1/2 ptpd: new package

In reply to Gustavo Zacarias
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Gustavo> Add the new ptpd package, loosely based on the one from bug #2305. Gustavo> This one handles the IEEE 1588-2002 spec.

Gustavo> Signed-off-by: Gustavo Zacarias <[email protected]> Gustavo> ---

 Gustavo>  package/Config.in      |  1 +
 Gustavo>  package/ptpd/Config.in |  7 +++++++
 Gustavo>  package/ptpd/S65ptpd   | 29 +++++++++++++++++++++++++++++
 Gustavo>  package/ptpd/ptpd.mk   | 25 +++++++++++++++++++++++++
 Gustavo>  4 files changed, 62 insertions(+)
 Gustavo>  create mode 100644 package/ptpd/Config.in
 Gustavo>  create mode 100644 package/ptpd/S65ptpd

We normally (but not always it seems) mark the init scripts executable under package/ as well, so I've fixed that and committed both to next, thanks.

Signature · 1 line
Bye, Peter Korsgaard