summaryrefslogtreecommitdiff
path: root/net-misc/portfwd
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/portfwd
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
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/portfwd')
-rw-r--r--net-misc/portfwd/Manifest1
-rw-r--r--net-misc/portfwd/files/portfwd-0.28-64bit.patch30
-rw-r--r--net-misc/portfwd/files/portfwd.confd3
-rw-r--r--net-misc/portfwd/files/portfwd.init39
-rw-r--r--net-misc/portfwd/files/portfwd.service8
-rw-r--r--net-misc/portfwd/metadata.xml16
-rw-r--r--net-misc/portfwd/portfwd-0.29.ebuild48
7 files changed, 145 insertions, 0 deletions
diff --git a/net-misc/portfwd/Manifest b/net-misc/portfwd/Manifest
new file mode 100644
index 00000000000..f048c43fe58
--- /dev/null
+++ b/net-misc/portfwd/Manifest
@@ -0,0 +1 @@
+DIST portfwd-0.29.tar.gz 168318 SHA256 a880cf57ae00224c470c387cf2de8abbb53c4d761b4d67be5b0c9e15c3484066 SHA512 790d30afb42eb5e03846534e5098c7d1cb4241758df77fd56fc3f4fdbb05dae88ef84e16b27434035dd39a7c82beb77d490f64741181c38efc3b3928face51d1 WHIRLPOOL a83de6db3feab5fc03f3115013eebd650bb795be91e0b674ae102c9c59d260fd7faa5b8a738e5eb9ad891103bac0c91e3626b7ac6cabf6f565e936403d8dbc17
diff --git a/net-misc/portfwd/files/portfwd-0.28-64bit.patch b/net-misc/portfwd/files/portfwd-0.28-64bit.patch
new file mode 100644
index 00000000000..8bd1494642a
--- /dev/null
+++ b/net-misc/portfwd/files/portfwd-0.28-64bit.patch
@@ -0,0 +1,30 @@
+--- src/proto_map.cc 28 Jan 2004 19:14:10 -0000 1.4
++++ src/proto_map.cc 1 Feb 2007 06:21:03 -0000
+@@ -16,11 +16,11 @@
+ map_list = map_l;
+ fragile = 0; /* false */
+
+- ftp_actv = (int) actv;
++ ftp_actv = actv != NULL;
+ if (ftp_actv)
+ actv_ip = *actv;
+
+- ftp_pasv = (int) pasv;
++ ftp_pasv = pasv != NULL;
+ if (ftp_pasv)
+ pasv_ip = *pasv;
+
+--- src/proto_map.hpp 28 Jan 2004 19:14:10 -0000 1.3
++++ src/proto_map.hpp 1 Feb 2007 06:21:03 -0000
+@@ -16,8 +16,8 @@
+ private:
+ vector<int> *port_list;
+ vector<host_map*> *map_list;
+- int ftp_actv;
+- int ftp_pasv;
++ bool ftp_actv;
++ bool ftp_pasv;
+ struct ip_addr actv_ip;
+ struct ip_addr pasv_ip;
+ int uid;
+
diff --git a/net-misc/portfwd/files/portfwd.confd b/net-misc/portfwd/files/portfwd.confd
new file mode 100644
index 00000000000..7e1ac3b3fb4
--- /dev/null
+++ b/net-misc/portfwd/files/portfwd.confd
@@ -0,0 +1,3 @@
+# See `man portfwd` for options.
+
+PORTFWD_OPTS="-f -t"
diff --git a/net-misc/portfwd/files/portfwd.init b/net-misc/portfwd/files/portfwd.init
new file mode 100644
index 00000000000..a73b7961c48
--- /dev/null
+++ b/net-misc/portfwd/files/portfwd.init
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# $Id$
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /etc/portfwd.cfg ] ; then
+ eerror "You need an /etc/portfwd.cfg file first"
+ eerror "There are samples in the documentation directory"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting portfwd"
+ start-stop-daemon --start --quiet --pidfile /var/run/portfwd.pid --exec /usr/sbin/portfwd -- ${PORTFWD_OPTS}
+
+ _pid="`ps -C portfwd -o pid= | head -n 1`"
+ if [ -n "$_pid" ] ; then
+ echo "${_pid/ /}" > /var/run/portfwd.pid
+ eend 0
+ else
+ eend 1
+ fi
+}
+
+stop() {
+ ebegin "Stopping portfwd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/portfwd.pid
+
+ if [ $? -eq 0 ]; then
+ rm -f /var/run/portfwd.pid
+ fi
+
+ eend $?
+}
diff --git a/net-misc/portfwd/files/portfwd.service b/net-misc/portfwd/files/portfwd.service
new file mode 100644
index 00000000000..77f6cd3663b
--- /dev/null
+++ b/net-misc/portfwd/files/portfwd.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Port Forwarding Daemon
+
+[Service]
+ExecStart=/usr/sbin/portfwd -g -f -t
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/portfwd/metadata.xml b/net-misc/portfwd/metadata.xml
new file mode 100644
index 00000000000..ff96ba5a06b
--- /dev/null
+++ b/net-misc/portfwd/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+ <longdescription lang="en">
+ Portfwd stands for port forwarding daemon. It's a small C++ utility
+ which forwards incoming TCP connections and/or UDP packets to remote
+ hosts.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">portfwd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/portfwd/portfwd-0.29.ebuild b/net-misc/portfwd/portfwd-0.29.ebuild
new file mode 100644
index 00000000000..155dc8686e2
--- /dev/null
+++ b/net-misc/portfwd/portfwd-0.29.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils systemd
+
+DESCRIPTION="Port Forwarding Daemon"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+HOMEPAGE="http://portfwd.sourceforge.net"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="amd64 ia64 ~ppc ~sparc x86"
+IUSE=""
+
+DEPEND=">=sys-apps/sed-4"
+RDEPEND=""
+
+src_prepare() {
+ cd src
+ sed -iorig \
+ -e "s:^CFLAGS =.*:CFLAGS = @CFLAGS@ -Wall -DPORTFWD_CONF=\\\\\"\$(sysconfdir)/portfwd.cfg\\\\\":" \
+ -e "s:^CXXFLAGS =.*:CPPFLAGS = @CXXFLAGS@ -Wall -DPORTFWD_CONF=\\\\\"\$(sysconfdir)/portfwd.cfg\\\\\":" \
+ Makefile.am || die
+ cd ../tools
+ sed -iorig \
+ -e "s:^CXXFLAGS =.*:CPPFLAGS = @CXXFLAGS@ -Wall -DPORTFWD_CONF=\\\\\"\$(sysconfdir)/portfwd.cfg\\\\\":" \
+ Makefile.am || die
+ cd ../getopt
+ sed -iorig -e "s:$.CC.:\$(CC) @CFLAGS@:g" Makefile.am || die
+ cd ../doc
+ sed -iorig -e "s:/doc/portfwd:/share/doc/$P:" Makefile.am || die
+ cd ..
+ sed -iorig -e "s:/doc/portfwd:/share/doc/$P:" Makefile.am || die
+
+ eautoreconf
+}
+
+src_install() {
+ default
+
+ dodoc cfg/*
+
+ newinitd "${FILESDIR}"/${PN}.init ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}