summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-misc/ptpd
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-misc/ptpd')
-rw-r--r--net-misc/ptpd/Manifest1
-rw-r--r--net-misc/ptpd/files/ptpd2.confd4
-rw-r--r--net-misc/ptpd/files/ptpd2.rc57
-rw-r--r--net-misc/ptpd/files/ptpd2.service11
-rw-r--r--net-misc/ptpd/metadata.xml21
-rw-r--r--net-misc/ptpd/ptpd-2.3.1.ebuild56
6 files changed, 150 insertions, 0 deletions
diff --git a/net-misc/ptpd/Manifest b/net-misc/ptpd/Manifest
new file mode 100644
index 000000000000..cc9ef1e47828
--- /dev/null
+++ b/net-misc/ptpd/Manifest
@@ -0,0 +1 @@
+DIST ptpd-2.3.1.tar.gz 1196180 SHA256 0dbf54dd2c178bd9fe62481d2c37513ee36636d8bf137cfdad96891490cdbf93 SHA512 c0e9eecfd87769b8cdbac624bf40f28634911e92d2169f4b91d59b76466eb4bf2143037dab3c601190ceaa13c8ab857c7875789448a46ab560bf0d0b8d321963 WHIRLPOOL e81b43eded2891a8eec2e880a837e6da5d94b64f363979af64eabdc341b75aae79605c00a7790a842e77b9d00ec69cf9bf97d7ff92498549db31825835cd6128
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..604672966a72
--- /dev/null
+++ b/net-misc/ptpd/files/ptpd2.rc
@@ -0,0 +1,57 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..a07e1da46b1a
--- /dev/null
+++ b/net-misc/ptpd/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>jan.breuer@jaybee.cz</email>
+ <name>Jan Breuer</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="sourceforge">ptpd</remote-id>
+ </upstream>
+</pkgmetadata>
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..ce4ef8fdc487
--- /dev/null
+++ b/net-misc/ptpd/ptpd-2.3.1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic systemd
+
+DESCRIPTION="Precision Time Protocol daemon"
+HOMEPAGE="http://ptpd.sf.net"
+
+SRC_URI="mirror://sourceforge/ptpd/${PV}/${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 )"
+
+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."
+}