portmap-6.0.ebuild 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. inherit eutils toolchain-funcs user
  4. DESCRIPTION="daemon for implementing remote procedure calls between computer programs"
  5. HOMEPAGE="http://neil.brown.name/portmap/"
  6. SRC_URI="http://neil.brown.name/portmap/${P}.tgz"
  7. LICENSE="BSD GPL-2" # GPL-2 only for init script
  8. SLOT="0"
  9. KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
  10. IUSE="selinux tcpd"
  11. DEPEND="
  12. tcpd? ( >=sys-apps/tcp-wrappers-7.6-r7 )
  13. "
  14. RDEPEND="
  15. selinux? ( sec-policy/selinux-portmap )
  16. "
  17. S=${WORKDIR}/${PN}_${PV}
  18. pkg_setup() {
  19. enewgroup rpc 111
  20. enewuser rpc 111 -1 /dev/null rpc
  21. }
  22. src_unpack() {
  23. unpack ${A}
  24. cd "${S}"
  25. epatch "${FILESDIR}"/${P}-tcpd.patch #178242
  26. # Once HPPA gets PIE's fixed, this can go away
  27. use hppa && sed -e '/LDFLAGS/s/^/#/' -i "${S}/Makefile" #190458
  28. }
  29. src_compile() {
  30. tc-export CC
  31. emake NO_TCP_WRAPPER="$(use tcpd || echo NO)" || die
  32. }
  33. src_install() {
  34. into /
  35. dosbin portmap || die "portmap"
  36. into /usr
  37. dosbin pmap_dump pmap_set || die "pmap"
  38. doman *.8
  39. dodoc BLURBv5 CHANGES README*
  40. newinitd "${FILESDIR}"/portmap.rc6 portmap
  41. newconfd "${FILESDIR}"/portmap.confd portmap
  42. }