diff options
Diffstat (limited to 'net-nds/portmap/portmap-5b-r9.ebuild')
-rw-r--r-- | net-nds/portmap/portmap-5b-r9.ebuild | 89 |
1 files changed, 36 insertions, 53 deletions
diff --git a/net-nds/portmap/portmap-5b-r9.ebuild b/net-nds/portmap/portmap-5b-r9.ebuild index 4cb5380131c4..eac0fb60d7c0 100644 --- a/net-nds/portmap/portmap-5b-r9.ebuild +++ b/net-nds/portmap/portmap-5b-r9.ebuild @@ -1,24 +1,29 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-nds/portmap/portmap-5b-r9.ebuild,v 1.4 2004/08/02 04:21:21 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-nds/portmap/portmap-5b-r9.ebuild,v 1.5 2004/10/31 05:58:05 vapier Exp $ -inherit eutils +inherit eutils flag-o-matic toolchain-funcs MY_P="${PN}_${PV}eta" S="${WORKDIR}/${MY_P}" DESCRIPTION="Netkit - portmapper" -SRC_URI="ftp://ftp.porcupine.org/pub/security/${MY_P}.tar.gz" HOMEPAGE="ftp://ftp.porcupine.org/pub/security/index.html" +SRC_URI="ftp://ftp.porcupine.org/pub/security/${MY_P}.tar.gz" -SLOT="0" LICENSE="as-is" -KEYWORDS="-*" -#KEYWORDS="~x86 ~ppc ~sparc ~mips ~alpha ~hppa ~amd64 ~ia64 ~ppc64" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="selinux tcpd" DEPEND="virtual/libc - tcpd? ( >=sys-apps/tcp-wrappers-7.6-r7 )" + tcpd? ( >=sys-apps/tcp-wrappers-7.6-r7 ) + >=sys-apps/portage-2.0.51" RDEPEND="selinux? ( sec-policy/selinux-portmap )" -IUSE="tcpd selinux" + +pkg_setup() { + enewgroup rpc 111 + enewuser rpc 111 /bin/false /dev/null rpc +} src_unpack() { unpack ${A} @@ -37,58 +42,36 @@ src_unpack() { # <azarah@gentoo.org> (31 Dec 2002). epatch ${FILESDIR}/${P}-include-errno_h.patch - # Get portmap to use our CFLAGS ... - sed -e "s:-O2:${CFLAGS}:" -i Makefile || die + # Path to listen on loopback only #65199 + epatch ${FILESDIR}/${P}-loopback-only.patch + + # Make tcp wrapper checks easier + cp Makefile Makefile.orig + epatch ${FILESDIR}/${P}-optional-tcpd.patch } src_compile() { - local LIBS - local WRAP_DIR - local HOSTS_ACCESS - # libutil static as per -r8 - #LIBS="-Wl,-Bstatic -lutil -Wl,-Bdynamic -lnsl" - # libutil dynamic - LIBS="-Wl,-Bdynamic -lutil -Wl,-Bdynamic -lnsl" - WRAP_DIR="" - HOSTS_ACCESS="" - if use tcpd; then - WRAP_DIR="${ROOT}/usr/lib" - [ -f "${ROOT}/lib/libwrap.a" ] && WRAP_DIR="${ROOT}/lib" - # static libwrap as per -r8 - #LIBS="-Wl,-Bstatic -lwrap ${LIBS}" - # libwrap dynamic - LIBS="-Wl,-Bdynamic -lwrap ${LIBS}" - HOSTS_ACCESS="-DHOSTS_ACCESS" - else - sed -i -e "s:^WRAP_LIB:\#WRAP_LIB:" \ - -e "s:^HOSTS_ACCESS:\#HOSTS_ACCESS:" \ - -e 's:$(WRAP_DIR)/libwrap.a::g' \ - Makefile - fi - - make FACILITY=LOG_AUTH \ - ZOMBIES='-DIGNORE_SIGCHLD' \ - HOSTS_ACCESS="${HOSTS_ACCESS}" \ - WRAP_DIR="${WRAP_DIR}" \ - LIBS="${LIBS}" \ - AUX= || die + local tcpd="" + use tcpd \ + && tcpd="-lwrap" \ + && append-flags -DHOSTS_ACCESS + + emake \ + CC="$(tc-getCC)" \ + O="${CFLAGS}" \ + WRAP_LIB="${tcpd}" \ + || die } src_install() { - into / ; dosbin portmap - into /usr ; dosbin pmap_dump pmap_set - doman portmap.8 pmap_dump.8 pmap_set.8 - - exeinto /etc/init.d - newexe ${FILESDIR}/portmap.rc6 portmap - - # Is this really the sort of thing we wanna be doing? :) - # ln -s ../../init.d/portmap ${D}/etc/runlevels/default/portmap + into / + dosbin portmap || die "portmap" + into /usr + dosbin pmap_dump pmap_set || die "pmap" + doman portmap.8 pmap_dump.8 pmap_set.8 dodoc BLURB CHANGES README -} -pkg_postinst() { - enewgroup rpc 111 - enewuser rpc 111 /bin/false /dev/null rpc + newinitd ${FILESDIR}/portmap.rc6 portmap + newconfd ${FILESDIR}/portmap.confd portmap } |