# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ MY_P="${PF/-r1/_1}" DESCRIPTION="A network monitoring tool designed to help paranoid users and \ network administrators that want to monitor their iptables settings live." HOMEPAGE="http://svearike.sytes.net/natstat" SRC_URI="http://svearike.sytes.net/${PN}/${MY_P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="qt network" DEPEND="qt? (x11-libs/qt) sys-libs/ncurses" S="${WORKDIR}/${PN}" src_unpack() { unpack ${A} cd "${S}" sed -i -e 's#2>> log##' -e 's#FLAGS=-Wall#FLAGS=${GENTOO_CFLAGS}#' CompileNotes sed -i 's#/usr/local/lib/iptables#/lib/iptables#' config.h if use qt; then sed -i 's://#define QT_GUI:#define QT_GUI:' config.h; fi if use network; then sed -i 's:#define NO_NETWORK_CODE://#define NO_NETWORK_CODE:' config.h else sed -i -e 's://#define DO_NOT_BIND:#define DO_NOT_BIND:' -e 's:#define BIND_PORT 5559://#define BIND_PORT 5559:' config.h fi } src_compile() { make GENTOO_CFLAGS="${CFLAGS}" || die "make failed." } src_install() { insinto /usr dosbin natstat natdaemon natdump if use qt; then newsbin qt_gui/qt_gui natstatqt fi dolib.a libiptcnt.a fperms 755 /usr/lib/libiptcnt.a insinto /usr/include doins nat_save.h local libs="natstat_logger.so natstat_information.so natstat_help.so" insinto /usr for i in $libs; do dolib.so $i; done insinto /usr/share/${PN} doins -r skins }