# $Id$ PNAME="ebtables" PVER="2.0.10.4" PBUILD="r5" PCAT="net-misc" DESCRIPTION="Utility that enables basic Ethernet frame filtering on a Linux bridge, MAC NAT and routing." HOMEPAGE="http://ebtables.sourceforge.net/" DEPEND=">= net-misc/iptables-1.6" SDEPEND=">= virtual/kernel-headers" SRCFILE="${PNAME}-v${PVER%.*}-${PVER##*.}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-v${PVER%.*}-${PVER##*.}" sminclude mtools SRC_URI=( sourceforge://${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-2.0.8.2-ebt-save.patch mirror://${PNAME}/ebtables.sh mirror://${PNAME}/ebtables.confd ) UP2DATE="updatecmd_sourceforge ${PNAME} gz | sed 's:^v::;s:-:.:g'" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # ebtables should save table names as parameters mpatch ${PNAME}-2.0.8.2-ebt-save.patch || die # fix install locations sed -i -e "s,^MANDIR:=.*,MANDIR:=/usr/share/man," \ -e "s,^BINDIR:=.*,BINDIR:=/usr/sbin," \ -e "s,^INITDIR:=.*,INITDIR:=/usr/share/doc/${PNAME}-${PVER}," \ -e "s,^SYSCONFIGDIR:=.*,SYSCONFIGDIR:=/usr/share/doc/${PNAME}-${PVER}," \ -e "s,^LIBDIR:=.*,LIBDIR:=/usr/$(mlibdir)/\$(PROGNAME)," \ Makefile || die } src_compile() { cd ${SRCDIR} # no as-needed supported -> segfaults local _myldflags="${LDFLAGS//-Wl,--as-needed}" local _mycflags="-Wunused -Wall -Werror -Wno-error=unused-but-set-variable" mmake CFLAGS="${_mycflags}" LDFLAGS="${_myldflags}" || die } src_install() { cd ${SRCDIR} # missing directory minstalldir /usr/share/doc/${PNAME}-${PVER}/ebtables || die make DESTDIR=${BINDIR} install || die mkeepdir /var/lib/ebtables || die minstallconf ebtables.confd ebtables || die minstalldir /usr/lib/systemd || die minstallexec -s ebtables.sh /usr/lib/systemd/magellan-ebtables || die # provided by iptables mdelete /etc/ethertypes || die # docs minstalldocs COMMIT_NOTES COPYING INCOMPATIBILITIES || die }