# $Header: /magellan-cvs/smage/traceroute/traceroute-1.4.a.12-r6.smage2,v 1.1 2008/04/20 23:11:07 niro Exp $ PNAME="traceroute" PVER="1.4.a.12" PBUILD="r6" PCATEGORIE="net-misc" STATE="unstable" DESCRIPTION="traceroute prints the route which packets take to a network host." HOMEPAGE="http://ee.lbl.gov/" DEPEND=">= virtual/glibc" SDEPEND=">= sys-dev/autoconf-4 >= sys-apps/sed-4" SRCFILE="${PNAME}-${PVER/.a.12/a12}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER/.a.12/a12}" sminclude gnuconfig mtools SRC_URI=( ftp://ftp.ee.lbl.gov/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-1.4-target-resolv.patch mirror://${PNAME}/${PNAME}-${PVER}-secfix.patch mirror://${PNAME}/${PNAME}-${PVER}-configure-lang.patch ) # sed line 1.4a12 -> 1.4.a.12 UP2DATE="updatecmd ftp://ftp.ee.lbl.gov/ | grep ${PNAME}- | lasttarball gz | sed 's:\([a-Z]\):\.\1\.:'" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} mpatch ${PNAME}-1.4-target-resolv.patch || die # security fixes from redhat mpatch ${PNAME}-${PVER}-secfix.patch || die # fixes LANG error with newer autotools mpatch ${PNAME}-${PVER}-configure-lang.patch || die # support more arches gnuconfig-update || die # fix to use linux as compile target by default sed -i 's/t="generic"/t="linux"/g' configure.in || die # rebuild makefiles WANT_AUTOCONF=2.1 autoreconf || die } src_compile() { cd ${SRCDIR} # use non-lazy bindings for this suid app export LDFLAGS="${LDFLAGS} -Wl,-z,now" mconfigure || die mmake LIBS="${LDFLAGS}" || die } src_install() { cd ${SRCDIR} # needed directories minstalldir /usr/sbin || die make DESTDIR=${BINDIR} install || die # set suid mchmod 4710 /usr/sbin/traceroute || die # install man page minstallman traceroute.8 || die # docs minstalldocs CHANGES FILES README VERSION || die }