IFStatus was developed for Linux users that are usually in console mode. It is a simple, easy to use program for displaying commonly needed / wanted statistics in real time about ingoing and outgoing traffic of multiple network interfaces that is usually hard to find, with a simple and effecient view. It is the substitute for PPPStatus and EthStatus projects.
Created attachment 93019 [details] net-analyzer/ifstatus-1.1.0.ebuild Give this a try. I've tested it on both ~x86 and ~amd64, and it seems to build and run fine. Any devs reading this, I would appreciate if you could look at the pathname munging due to the tarball file name. Is this the proper way to handle it?
Thanks for the ebuild. I cleaned-it up a bit and submitted it to the Gentoo Sunrise Overlay. You can get the ebuild directly from here (might take a couple of hours until available): http://gentoo-sunrise.org/svn/reviewed/net-analyzers/ifstatus What I changed: 1) -MY_PN="${PN}-v" -MY_P="${MY_PN}${PV}" This can be simplified since MY_P is only needed in the URL. 2) +inherit toolchain-funcs This is needed for $(tc-getCXX) to work, which is needed to make cross-compilation possible. 3) -RESTRICT="test" Is not needed. 4) +DEPEND=">=sys-libs/ncurses-4.2" +RDEPEND="${DEPEND}" This is written in the README and can be verified with 'ldd /usr/sbin/ifstatus' 5) +src_unpack() { unpack ${A} cd "${S}" - # Eliminate custom CFLAGS - sed -i -e "6d" Makefile || die "sed failed" - - # Use CXXFLAGS instead of CFLAGS - sed -i -e "s:CFLAGS:CXXFLAGS:g" Makefile || die "sed failed" + sed -i \ + -e '/^GCC/d' \ + -e '/^CFLAGS/d' \ + -e 's/GCC/CXX/g' \ + -e 's/CFLAGS/CXXFLAGS/g' \ + Makefile || die "sed failed" } GCC should not be set explicitly in the ebuild to make cross-compilation work. 6) src_compile() { - emake || die "Build failed" + emake -j1 CXX=$(tc-getCXX) || die "Build failed" } The -j1 is needed because the Makefile isn't thread-safe. CXX has to be set explicitly here for an eventual cross-compilation. 7) src_install() { - dobin ifstatus - dodoc AUTHORS COPYING README + dosbin ifstatus + dodoc AUTHORS README } Never install COPYING since we already have the license in /usr/portage/licenses. 'ifstatus' should rather be in /usr/sbin because ifconfig and ip are also there.
1 - I suspected this could be simplified, which is why I asked. 2, 5, - cool, now I know. 3 - left over from trying to figure out a problem with the ebuild, I should have eliminated it. 4 - I saw that, but thought it was part of the implicit system deps, and since that version was not available in Portage it didn't need to be here. I stand corrected. 6 - Is there a simple way of determining that, or is it a judgment call based on experience? 7 - Right, missed the COPYING issue. But as for /usr/sbin, this program doesn't require root privileges to run. Should such a program be in a place that is only in root's PATH?
6. Well, the -j1 can sometimes be hard to tell (see mDNSResponder :-). In this case it was clear: I got the error-message about compilation failure but it still compiled. And when I retried it again, it really failed. After adding -j1 it compiled cleanly everytime. The CXX=... thingy is something you have to know, I figured that one out today myself when I tried to cross-compile one of my ebuilds which has the same situation (no ./configure, just a Makefile). ./configure can figure out if you do cross-compilation. 7. You're right. It would be nice to have it in /usr/bin. I corrected that together with re-adding the ~amd64 keyword.
Thanks for all the feedback!
Added to main tree.