commit:     44138a2354da9231ac8ac4c918a7d4656f9532af
Author:     Austin English <wizardedit <AT> gentoo <DOT> org>
AuthorDate: Wed May  4 00:31:15 2016 +0000
Commit:     Austin English <wizardedit <AT> gentoo <DOT> org>
CommitDate: Wed May  4 00:31:15 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44138a23

net-misc/portfwd: use #!/sbin/openrc-run instead of #!/sbin/runscript

Gentoo-Bug: https://bugs.gentoo.org/573846

Package-Manager: portage-2.2.26

 net-misc/portfwd/files/portfwd.init     |  2 +-
 net-misc/portfwd/portfwd-0.29-r1.ebuild | 50 +++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+), 1 deletion(-)

diff --git a/net-misc/portfwd/files/portfwd.init 
b/net-misc/portfwd/files/portfwd.init
index a73b796..81452ba 100644
--- a/net-misc/portfwd/files/portfwd.init
+++ b/net-misc/portfwd/files/portfwd.init
@@ -1,4 +1,4 @@
-#!/sbin/runscript
+#!/sbin/openrc-run
 # $Id$
 
 depend() {

diff --git a/net-misc/portfwd/portfwd-0.29-r1.ebuild 
b/net-misc/portfwd/portfwd-0.29-r1.ebuild
new file mode 100644
index 0000000..747d392
--- /dev/null
+++ b/net-misc/portfwd/portfwd-0.29-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+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() {
+       default
+
+       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
+}

Reply via email to