net-misc/portfwd: use #!/sbin/openrc-run instead of #!/sbin/runscript
authorAustin English <wizardedit@gentoo.org>
Wed, 4 May 2016 00:31:15 +0000 (19:31 -0500)
committerAustin English <wizardedit@gentoo.org>
Wed, 4 May 2016 00:31:15 +0000 (19:31 -0500)
Gentoo-Bug: https://bugs.gentoo.org/573846

Package-Manager: portage-2.2.26

net-misc/portfwd/files/portfwd.init
net-misc/portfwd/portfwd-0.29-r1.ebuild [new file with mode: 0644]

index a73b7961c48a9dc8189643c306456da84e7a9242..81452bac5b99702fc4f564c7c639557f935eec4d 100644 (file)
@@ -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 (file)
index 0000000..747d392
--- /dev/null
@@ -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
+}