# $Id$ PNAME="tcp-wrappers" PVER="7.6" PBUILD="r12" PCATEGORIE="sys-apps" DESCRIPTION="The TCP/IP daemon wrapper package." HOMEPAGE="ftp://ftp.porcupine.org/pub/security/index.html" DEPEND=">= virtual/glibc" SRCFILE="${PNAME/-/_}_${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME/-/_}_${PVER}" sminclude mtools multilib SRC_URI=( ftp://ftp.porcupine.org/pub/security/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/tcp_wrappers-7.6-shared-lib-plus-plus.patch mirror://${PNAME}/${PNAME}-${PVER}-libdir.patch ) UP2DATE="updatecmd ftp://ftp.porcupine.org/pub/security/ | grep ${PNAME/-/_}.*.tar | sed -n 's/.*_\(.*\)\.tar.*/\1/;s/eta//;$ p'" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # builds tcp-wrappers with shared libraries mpatch tcp_wrappers-7.6-shared-lib-plus-plus.patch || die # allow variable libdir mpatch ${PNAME}-${PVER}-libdir.patch || die all-abis "chmod ug+w Makefile" || die # fix gcc-34 compile issues all-abis 'sed -i "s,^extern char \*malloc();,/* & */," scaffold.c' || die # fixes CFLAGS all-abis 'sed -i -e "s:-O2:${CFLAGS}:" -e "s:AUX_OBJ=.*:AUX_OBJ= \\\:" Makefile' || die } src_compile() { cd ${SRCDIR} mmake CC='$CC' REAL_DAEMON_DIR=/usr/sbin STYLE=-DPROCESS_OPTIONS linux || die } src_install() { cd ${SRCDIR} # needed directories minstalldir /usr/{include,sbin} || die all-abis 'minstalldir /usr/$(mlibdir)' || die minstalldir /usr/share/man/man{3,5,8} || die mmake DESTDIR=${BINDIR} LIBDIR='$(mlibdir)' install || die minstalldocs BLURB CHANGES DISCLAIMER README* || die }