# $Id$ PNAME="pciutils" PVER="3.5.6" PBUILD="r1" PCAT="sys-apps" DESCRIPTION="Various utilities dealing with the PCI bus." HOMEPAGE="http://atrey.karlin.mff.cuni.cz/~mj/pciutils.html" DEPEND=">= net-misc/wget-1.12 >= sys-apps/which-2.20 >= virtual/glibc" SDEPEND=">= virtual/sed" PROVIDE="virtual/pciutils" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mtools SRC_URI=( http://www.kernel.org/pub/software/utils/${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-2.2.0-scan.patch ) UP2DATE="updatecmd http://www.kernel.org/pub/software/utils/${PNAME}/ | highesttarball gz" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # fix segfaults mpatch ${PNAME}-2.2.0-scan.patch || die # fix pathes sed -i -e '/^PREFIX=/s:=.*:=/usr:' \ -e '/^IDSDIR=/s:=.*:=$(PREFIX)/share/misc:' \ -e "/^LIBDIR=/s:/lib:/$(mlibdir):" \ Makefile || die # update pci-ids via internet (needs wget) ./update-pciids.sh || die } src_compile() { cd ${SRCDIR} # disable zlib support, or it breaks hal-0.5.10 pci support mmake ZLIB=no DNS=yes OPT="${CFLAGS} -fPIC" SHARED=yes || die } src_install() { cd ${SRCDIR} # needed directories minstalldir /usr/$(mlibdir) || die minstalldir /usr/{include/pci,share/man} || die mmake PREFIX=${BINDIR}/usr install install-lib || die # docs minstalldocs ChangeLog README TODO || die }