portfwd-0.29-r1.ebuild 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit autotools eutils systemd
  5. DESCRIPTION="Port Forwarding Daemon"
  6. SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
  7. HOMEPAGE="http://portfwd.sourceforge.net"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="amd64 ia64 ~ppc ~sparc x86"
  11. IUSE=""
  12. DEPEND=">=sys-apps/sed-4"
  13. RDEPEND=""
  14. src_prepare() {
  15. default
  16. cd src
  17. sed -iorig \
  18. -e "s:^CFLAGS =.*:CFLAGS = @CFLAGS@ -Wall -DPORTFWD_CONF=\\\\\"\$(sysconfdir)/portfwd.cfg\\\\\":" \
  19. -e "s:^CXXFLAGS =.*:CPPFLAGS = @CXXFLAGS@ -Wall -DPORTFWD_CONF=\\\\\"\$(sysconfdir)/portfwd.cfg\\\\\":" \
  20. Makefile.am || die
  21. cd ../tools
  22. sed -iorig \
  23. -e "s:^CXXFLAGS =.*:CPPFLAGS = @CXXFLAGS@ -Wall -DPORTFWD_CONF=\\\\\"\$(sysconfdir)/portfwd.cfg\\\\\":" \
  24. Makefile.am || die
  25. cd ../getopt
  26. sed -iorig -e "s:$.CC.:\$(CC) @CFLAGS@:g" Makefile.am || die
  27. cd ../doc
  28. sed -iorig -e "s:/doc/portfwd:/share/doc/$P:" Makefile.am || die
  29. cd ..
  30. sed -iorig -e "s:/doc/portfwd:/share/doc/$P:" Makefile.am || die
  31. eautoreconf
  32. }
  33. src_install() {
  34. default
  35. dodoc cfg/*
  36. newinitd "${FILESDIR}"/${PN}.init ${PN}
  37. newconfd "${FILESDIR}"/${PN}.confd ${PN}
  38. systemd_dounit "${FILESDIR}"/${PN}.service
  39. }