summaryrefslogtreecommitdiff
path: root/net-misc/ptpd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/ptpd
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/ptpd')
-rw-r--r--net-misc/ptpd/Manifest9
-rw-r--r--net-misc/ptpd/files/ptpd2.confd4
-rw-r--r--net-misc/ptpd/files/ptpd2.rc56
-rw-r--r--net-misc/ptpd/files/ptpd2.service11
-rw-r--r--net-misc/ptpd/metadata.xml24
-rw-r--r--net-misc/ptpd/ptpd-2.3.1-r1.ebuild59
-rw-r--r--net-misc/ptpd/ptpd-2.3.1.ebuild57
7 files changed, 220 insertions, 0 deletions
diff --git a/net-misc/ptpd/Manifest b/net-misc/ptpd/Manifest
new file mode 100644
index 000000000000..99459e14a83d
--- /dev/null
+++ b/net-misc/ptpd/Manifest
@@ -0,0 +1,9 @@
+AUX ptpd2.confd 61 SHA256 0c0c1a6e6260b90c8420066ab64acd1c0f70ac7cf6af5dddd64a627d4dcf628f SHA512 40ea56a92222eb10dc429343a23bdcc0e75f626e34fea139a09ca545a50aee0550253965de036218889554a2c0c7928c0051e3e71d9b9cd0a9d44d334e0bac47 WHIRLPOOL 61155a827f264ae2e2a1763722fb561f2446b6d50f344d79f3423989d5de30a837cf92b0edd0561c40a910380e04a7ed5d2a6d7bbbbf8f62df10adc86f5f8f3b
+AUX ptpd2.rc 1372 SHA256 186237698e46fcc073dcd2f628fe5e4b1f7acb49f5ea4d2946daeae5b26bf681 SHA512 37af776a265fbabdabed381d98cf50d78a512634fd84ce07466a47a0e96a6b2cccfb762732a043139b6c136eefdc6443ab9a5cba1c30234b6c66acc23e98a5b2 WHIRLPOOL c17e33bd0917725f3e3c1a4a8f9e94053a02bf5620eefd5fc07263ee78843dda6fda3f85ab33a5d9bc5f9c176d7b156cf15454885f660083724805e6672efc28
+AUX ptpd2.service 228 SHA256 3cda793010dbcc4be0f032f249fa8235d444846fa97a610a7a00fbf30c1ce29b SHA512 72d609c9b803921b55cc0528aafa5cbbff0b7ed2f1267fa5f06e410ec640295642717928bbf38c849f632d157132f01f60a8bad826428b846d8248bac27e932a WHIRLPOOL e5fd83c5ef4e060b7c72e339ba2ec378ad198deb6fbb7da3bda2d3f5b2355f6a52d58d9d80d1dad4234dc06b88e9ef6db1a79e075c1fc23175a66c5664d98d7e
+DIST ptpd-2.3.1.tar.gz 884161 SHA256 267ad61d09d97069acec5d4878dceda20d0ddbebd27557d80230847848cee6c2 SHA512 25c128ce1920ae2c1469e986bfa5d5b8ebca04ec14b838fb8232b36e0a1ef94646507e1b25034846d11cf0f71d7e2da983b9f6408f8fcfc608904ecfec2a15c4 WHIRLPOOL dfc107c0011db56b1e943bf9ac794c51631e0320e8ae19c5db2d67af55cd15a73e2e71117abca0db787896ea0366987eee29d91f15eea336c96be7093accfd6b
+EBUILD ptpd-2.3.1-r1.ebuild 1358 SHA256 34eda559d8640329822e633c4e7f1f33953af73652319188f3773fcbc075d1d6 SHA512 157ebd631b8066ce73f1d1bc8133e23dea20fcf34585e219c59a792ff90d0b80be4fd74bed2d30e0f256c99e5f24ac2a861fba14f69904ad899330b32dcafc97 WHIRLPOOL 2035ed9e25bfda51fad4b51f42a3622c85a26f53881cbbe4dd084a8cdc076072f4008a3a391194540aba09a2d6421e09293e7dfbe7ea176a3e244cb2336151dd
+EBUILD ptpd-2.3.1.ebuild 1273 SHA256 9fc01d296df030342d4ada8b166af4e55004db6ffb68636c9efc7b3df848e24b SHA512 d4fd3b4a44e0fd2462ede9035968c18787771fcc9ef80093a42f43da13bc7757ca00aaae02016efb79d0f63aa7293af5ebc29563d154b92d5e51cc6dd01a91f2 WHIRLPOOL 1fa3974887c5d081ef2119aebfec51bbec9f27e6a4301d92c46ae033eb4a1b55bce670804b19a0461f60cc99312c07967c6d604e9cfaa49e4f13ac1771b688b5
+MISC ChangeLog 3729 SHA256 b75f161221cb7948acb2e0dbce3ffaf09de93bcbb27a8ddf5c16a1e4ab6f0d88 SHA512 e371d3ed8799e27696c42a3af668687e6c730ff53848af15aa599172d62bf5e00118b5cb54580af923b9e7a2fc1038ac7856394f6eb25aba89881a2919cbca61 WHIRLPOOL 3595107e7fa82104343337d3a16ec5ec58e3e92ada8dbdc252725a42acb5f5886b9afdd29ebd360acd90cd39515f402fce86ca3426e5d14f10714038eb6a7c96
+MISC ChangeLog-2015 1091 SHA256 b08d875b305af3c91274a6c6b73c9553f551f8dac9d6cf94d8da20ccc6504cf3 SHA512 ec50a766a69dfb2f5f0d47dff5caa8fdc0083520bd007367e0130b6751efa97e3381154a7c147e2eff796eab7fa497b5134a144ec08d2dd746250d9c32e62b7f WHIRLPOOL b3d74ff6c7c0e278a47f667ad766c1e419feb76b06b19a2e29f80603257e99eca7deb4ee498faa634e89754d685f57a0dad219853f18f055d26a2104ed9c0c9c
+MISC metadata.xml 988 SHA256 d894cf97f2c8bb0d5df28c72fdf244cba210b33deccaf538c1cdf1cfd21d0f01 SHA512 a96ee23e21b8230c4756022e5678df1f72c61576b0aae1de04c10328417f64535129ed4a10beb7545c7316e36b9fe658e8c5ced5f28177ff84b106caf525ec06 WHIRLPOOL fefe3bba682208ad3fcc4db3735a4f9ec49ed50ea65c154f09fc20f5c42e8090d034ba4aa271479bb7a7c8a34d8cb562891bccd4235297f68c611ff1e4cd9ad9
diff --git a/net-misc/ptpd/files/ptpd2.confd b/net-misc/ptpd/files/ptpd2.confd
new file mode 100644
index 000000000000..22fe2d49285f
--- /dev/null
+++ b/net-misc/ptpd/files/ptpd2.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/ptpd2
+
+# Options to pass to ptpd2
+PTPD_OPTS=""
diff --git a/net-misc/ptpd/files/ptpd2.rc b/net-misc/ptpd/files/ptpd2.rc
new file mode 100644
index 000000000000..bf8e14332298
--- /dev/null
+++ b/net-misc/ptpd/files/ptpd2.rc
@@ -0,0 +1,56 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+PTPD_CONFIGFILE=${PTPD_CONFIGFILE:-/etc/${RC_SVCNAME}.conf}
+PTPD_STATEFILE_DIR=${PTPD_STATEFILE_DIR:-/var/run}
+PTPD_STATEFILE=${PTPD_STATEFILE:-${PTPD_STATEFILE_DIR}/${RC_SVCNAME}.status}
+PTPD_PIDFILE_DIR=${PTPD_PIDFILE_DIR:-/var/run}
+PTPD_PIDFILE=${PTPD_PIDFILE:-${PTPD_PIDFILE_DIR}/${RC_SVCNAME}.pid}
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+command="/usr/sbin/ptpd2"
+command_args="--global:lock_file=$PTPD_PIDFILE --global:status_file=$PTPD_STATEFILE -c $PTPD_CONFIGFILE $PTPD_OPTS"
+pidfile="${PTPD_PIDFILE}"
+description="Precise Time Protocol daemon"
+
+
+depend() {
+ use net dns logger
+}
+
+checkconfig() {
+ ebegin "Checking ${SVCNAME} configuration"
+ msgout="$($command -k $command_args 2>&1)"
+ RETVAL=$?
+
+ # colorize output
+ echo "$msgout" | while read ln; do
+ if [[ "$ln" == *ignored* ]]; then
+ ewarn "$ln"
+ elif [[ "$ln" != "Configuration OK" ]]; then
+ eerror "$ln"
+ fi
+ done
+
+ eend $RETVAL
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec ${command} \
+ --pidfile ${pidfile} \
+ -- ${command_args}
+ eend $?
+}
+
+reload() {
+ checkconfig || return 1
+
+ ebegin "Reloading ${SVCNAME} configuration"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+}
diff --git a/net-misc/ptpd/files/ptpd2.service b/net-misc/ptpd/files/ptpd2.service
new file mode 100644
index 000000000000..35fb34fd6897
--- /dev/null
+++ b/net-misc/ptpd/files/ptpd2.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Precise Time Protocol daemon
+Documentation=man:ptpd2(8)
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/ptpd2 -C -c /etc/ptpd2.conf
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/ptpd/metadata.xml b/net-misc/ptpd/metadata.xml
new file mode 100644
index 000000000000..6633371ca920
--- /dev/null
+++ b/net-misc/ptpd/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>honza.breuer@gmail.com</email>
+ <name>Jan Breuer</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="debug">Enable debugging informations</flag>
+ <flag name="experimental">Enable experimental features</flag>
+ <flag name="ntp">Enable NTPD cooperation</flag>
+ <flag name="snmp">Require <pkg>net-analyzer/net-snmp</pkg> to enable SNMP configuration</flag>
+ <flag name="statistics">Enable compution of statistics</flag>
+ <flag name="pcap">Require <pkg>net-libs/libpcap</pkg> to allow layer 2 (raw Ethernet) transport</flag>
+ <flag name="slave-only">Enable slave only operation (remove master mode functionality)</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">ptpd/ptpd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/ptpd/ptpd-2.3.1-r1.ebuild b/net-misc/ptpd/ptpd-2.3.1-r1.ebuild
new file mode 100644
index 000000000000..9c358e02c8f6
--- /dev/null
+++ b/net-misc/ptpd/ptpd-2.3.1-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic systemd
+
+DESCRIPTION="Precision Time Protocol daemon"
+HOMEPAGE="https://github.com/ptpd/ptpd"
+
+SRC_URI="https://github.com/ptpd/ptpd/archive/${P}.tar.gz"
+KEYWORDS="~amd64 ~arm ~x86"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="debug experimental ntp +pcap snmp slave-only +statistics"
+RDEPEND="
+ pcap? ( net-libs/libpcap )
+ snmp? ( net-analyzer/net-snmp )"
+DEPEND="${RDEPEND}"
+RDEPEND="${RDEPEND}
+ ntp? ( net-misc/ntp )"
+
+S=${WORKDIR}/ptpd-${P}
+
+src_prepare() {
+ eapply_user
+ sed -i -e 's/U64/struct counter64/' src/dep/snmp.c || die "sed failed"
+ eautoreconf
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ econf \
+ --enable-daemon \
+ $(use_enable snmp) \
+ $(use_enable experimental experimental-options) \
+ $(use_enable statistics) \
+ $(use_enable debug runtime-debug) \
+ $(use_enable pcap) \
+ $(use_enable slave-only)
+}
+
+src_install() {
+ emake install DESTDIR="${D}"
+
+ insinto /etc
+ newins "src/ptpd2.conf.minimal" ptpd2.conf
+
+ newinitd "${FILESDIR}/ptpd2.rc" ptpd2
+ newconfd "${FILESDIR}/ptpd2.confd" ptpd2
+
+ systemd_dounit "${FILESDIR}/ptpd2.service"
+}
+
+pkg_postinst() {
+ elog "Do not forget to setup correct network interface."
+ elog "Change the config file ${EROOT}etc/ptpd2.conf to suit your needs."
+}
diff --git a/net-misc/ptpd/ptpd-2.3.1.ebuild b/net-misc/ptpd/ptpd-2.3.1.ebuild
new file mode 100644
index 000000000000..3fcbbbc2a23e
--- /dev/null
+++ b/net-misc/ptpd/ptpd-2.3.1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic systemd
+
+DESCRIPTION="Precision Time Protocol daemon"
+HOMEPAGE="https://github.com/ptpd/ptpd"
+
+SRC_URI="https://github.com/ptpd/ptpd/archive/${P}.tar.gz"
+KEYWORDS="~amd64 ~arm ~x86"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="debug experimental ntp +pcap snmp slave-only +statistics"
+RDEPEND="
+ pcap? ( net-libs/libpcap )
+ snmp? ( net-analyzer/net-snmp )"
+DEPEND="${RDEPEND}"
+RDEPEND="${RDEPEND}
+ ntp? ( net-misc/ntp )"
+
+S=${WORKDIR}/ptpd-${P}
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ econf \
+ --enable-daemon \
+ $(use_enable snmp) \
+ $(use_enable experimental experimental-options) \
+ $(use_enable statistics) \
+ $(use_enable debug runtime-debug) \
+ $(use_enable pcap) \
+ $(use_enable slave-only)
+}
+
+src_install() {
+ emake install DESTDIR="${D}"
+
+ insinto /etc
+ newins "src/ptpd2.conf.minimal" ptpd2.conf
+
+ newinitd "${FILESDIR}/ptpd2.rc" ptpd2
+ newconfd "${FILESDIR}/ptpd2.confd" ptpd2
+
+ systemd_dounit "${FILESDIR}/ptpd2.service"
+}
+
+pkg_postinst() {
+ elog "Do not forget to setup correct network interface."
+ elog "Change the config file /etc/ptpd2.conf to suit your needs."
+}