summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Portnoy <avenj@gentoo.org>2003-12-03 21:22:21 +0000
committerJon Portnoy <avenj@gentoo.org>2003-12-03 21:22:21 +0000
commitc5baf71cce1611391f2aae9e9a035b7077e6cd80 (patch)
treeab48a0d09c4faf88bf072431d20833a6291a2988 /net-misc/portfwd
parentLots of updates from bug 33994 - thanks Alessandro Pisani (diff)
downloadhistorical-c5baf71cce1611391f2aae9e9a035b7077e6cd80.tar.gz
historical-c5baf71cce1611391f2aae9e9a035b7077e6cd80.tar.bz2
historical-c5baf71cce1611391f2aae9e9a035b7077e6cd80.zip
Lots of updates from bug 33994 - thanks Alessandro Pisani
Diffstat (limited to 'net-misc/portfwd')
-rw-r--r--net-misc/portfwd/Manifest8
-rw-r--r--net-misc/portfwd/files/digest-portfwd-0.26_rc6-r11
-rw-r--r--net-misc/portfwd/files/portfwd.confd3
-rw-r--r--net-misc/portfwd/files/portfwd.init32
-rw-r--r--net-misc/portfwd/portfwd-0.26_rc6-r1.ebuild64
-rw-r--r--net-misc/portfwd/portfwd-0.26_rc6.ebuild12
6 files changed, 101 insertions, 19 deletions
diff --git a/net-misc/portfwd/Manifest b/net-misc/portfwd/Manifest
index 08aaaa6fa549..5157e5c2f54c 100644
--- a/net-misc/portfwd/Manifest
+++ b/net-misc/portfwd/Manifest
@@ -1,7 +1,7 @@
-MD5 be6a23c69a379e49bcdab3eae0803ad5 portfwd-0.26_rc6.ebuild 1548
-MD5 7f0feee26bccc4cd559f639489d606bd ChangeLog 800
-MD5 d813348dc14d75bd75de403603a03827 portfwd-0.26_rc6-r1.ebuild 1542
-MD5 0fb157d40336e3a61afb1ece6644fc35 files/portfwd.init 896
+MD5 9da84ecbe70e49ec92b26196c23c5143 portfwd-0.26_rc6.ebuild 1548
+MD5 51f79312774e281d1eafa34fba5a8e71 ChangeLog 800
+MD5 0fe8ca65a96b8d81ae11da21d271bee5 portfwd-0.26_rc6-r1.ebuild 1544
+MD5 c830fd70af9bf03fed1479a0a03ceb52 files/portfwd.init 896
MD5 3e26912825dccefb4a4474400d2c7eb6 files/digest-portfwd-0.26_rc6 67
MD5 2e5d079e07d2511ef3695aa36140dc2f files/portfwd.confd 55
MD5 3e26912825dccefb4a4474400d2c7eb6 files/digest-portfwd-0.26_rc6-r1 67
diff --git a/net-misc/portfwd/files/digest-portfwd-0.26_rc6-r1 b/net-misc/portfwd/files/digest-portfwd-0.26_rc6-r1
new file mode 100644
index 000000000000..c7fcf062a2fa
--- /dev/null
+++ b/net-misc/portfwd/files/digest-portfwd-0.26_rc6-r1
@@ -0,0 +1 @@
+MD5 9706c8c4c4551c079f3e76abf985b64d portfwd-0.26rc6.tar.gz 135300
diff --git a/net-misc/portfwd/files/portfwd.confd b/net-misc/portfwd/files/portfwd.confd
new file mode 100644
index 000000000000..7e1ac3b3fb4f
--- /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
index 3fc7de2452e2..f9c4bd7922f0 100644
--- a/net-misc/portfwd/files/portfwd.init
+++ b/net-misc/portfwd/files/portfwd.init
@@ -1,27 +1,39 @@
#!/sbin/runscript
-# $Header: /var/cvsroot/gentoo-x86/net-misc/portfwd/files/portfwd.init,v 1.2 2003/11/20 19:20:06 avenj Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/portfwd/files/portfwd.init,v 1.3 2003/12/03 21:22:18 avenj Exp $
depend() {
need net
}
checkconfig() {
- if [ ! -e /etc/portfwd.cnf ] ; then
- eerror "You need an /etc/portfwd.cnf file first"
+ 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 --exec /usr/sbin/portfwd -- -t -f
- eend $?
+ checkconfig || return 1
+ ebegin "Starting portfwd"
+ start-stop-daemon --start --quiet --pidfile /var/run/portfwd.pid --exec /usr/sbin/portfwd -- ${PORTFWD_OPTS}
+
+ _pid="`ps --no-heading -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
- eend $?
+ 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/portfwd-0.26_rc6-r1.ebuild b/net-misc/portfwd/portfwd-0.26_rc6-r1.ebuild
new file mode 100644
index 000000000000..e785d7b81cd8
--- /dev/null
+++ b/net-misc/portfwd/portfwd-0.26_rc6-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/portfwd/portfwd-0.26_rc6-r1.ebuild,v 1.1 2003/12/03 21:22:18 avenj Exp $
+
+DESCRIPTION="Port Forwarding Daemon"
+SRC_URI="mirror://sourceforge/${PN}/${P/_/}.tar.gz"
+HOMEPAGE="http://portfwd.sourceforge.net"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~x86 ~ia64 ~amd64"
+
+DEPEND=">=sys-apps/sed-4"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd ${WORKDIR}/${P/_/}
+
+ 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
+ cd ../tools
+ sed -iorig \
+ -e "s:^CXXFLAGS =.*:CPPFLAGS = @CXXFLAGS@ -Wall -DPORTFWD_CONF=\\\\\"\$(sysconfdir)/portfwd.cfg\\\\\":" \
+ Makefile.am
+ cd ../getopt
+ sed -iorig -e "s:$.CC.:\$(CC) @CFLAGS@:g" Makefile.am
+ cd ../doc
+ sed -iorig -e "s:/doc/portfwd:/share/doc/$P:" Makefile.am
+ cd ..
+ sed -iorig -e "s:/doc/portfwd:/share/doc/$P:" Makefile.am
+}
+
+src_compile() {
+ cd ${WORKDIR}/${P/_/}
+
+ ./bootstrap
+ econf
+ emake
+}
+
+src_install() {
+ cd ${WORKDIR}/${P/_/}
+
+ einstall
+ prepalldocs
+
+ dodoc cfg/*
+
+ insinto /etc/init.d
+ insopts -m0755
+ newins ${FILESDIR}/${PN}.init ${PN}
+
+ insinto /etc/conf.d
+ insopts -m0644
+ newins ${FILESDIR}/${PN}.confd ${PN}
+}
+
+pkg_postinst() {
+ einfo "Many configuration file (/etc/portfwd.cfg) samples are available in /usr/share/doc/${P}"
+}
diff --git a/net-misc/portfwd/portfwd-0.26_rc6.ebuild b/net-misc/portfwd/portfwd-0.26_rc6.ebuild
index d98acaa64138..67f9f5f1b975 100644
--- a/net-misc/portfwd/portfwd-0.26_rc6.ebuild
+++ b/net-misc/portfwd/portfwd-0.26_rc6.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/portfwd/portfwd-0.26_rc6.ebuild,v 1.2 2003/11/20 19:20:06 avenj Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/portfwd/portfwd-0.26_rc6.ebuild,v 1.3 2003/12/03 21:22:18 avenj Exp $
DESCRIPTION="Port Forwarding Daemon"
SRC_URI="mirror://sourceforge/${PN}/${P/_/}.tar.gz"
@@ -10,9 +10,8 @@ LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86 ~ia64 ~amd64"
-DEPEND="virtual/glibc"
-RDEPEND="${DEPEND}
- >=sys-apps/sed-4"
+DEPEND=">=sys-apps/sed-4*"
+RDEPEND="${DEPEND}"
src_unpack() {
unpack ${A}
@@ -54,10 +53,13 @@ src_install() {
insinto /etc/init.d
insopts -m0755
newins ${FILESDIR}/${PN}.init ${PN}
+
+ insinto /etc/conf.d
+ insopts -m0644
+ newins ${FILESDIR}/${PN}.confd ${PN}
}
pkg_postinst() {
einfo "Many configuration file (/etc/portfwd.cfg) samples are available in /usr/share/doc/${P}"
einfo
}
-