www-client/vivaldi: Old.
[gentoo.git] / net-firewall / pftop / pftop-0.7.ebuild
1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 PATCH_PV=1
6
7 inherit bsdmk flag-o-matic eutils
8
9 DESCRIPTION="Pftop: curses-based utility for real-time display of active states and rule statistics for pf"
10 HOMEPAGE="http://www.eee.metu.edu.tr/~canacar/pftop/"
11 SRC_URI="http://www.eee.metu.edu.tr/~canacar/${P}.tar.gz
12         mirror://gentoo/${P}-patches-${PATCH_PV}.tar.bz2"
13
14 LICENSE="BSD"
15 SLOT="0"
16 KEYWORDS="~x86-fbsd"
17 IUSE=""
18
19 RDEPEND="sys-libs/ncurses"
20
21 src_unpack() {
22         unpack ${A}
23         cd "${S}"
24         epatch "${WORKDIR}"/patches/*
25 }
26
27 src_compile() {
28         # OS_LEVEL variable refers to the version of pf shipped with OpenBSD.
29         # On FreeBSD we have to know it.
30         local OSLEVEL
31
32         case ${CHOST} in
33                 *-openbsd*)
34                         local obsdver=${CHOST/*-openbsd/}
35                         OSLEVEL=${obsdver//.}
36                         ;;
37                 *-freebsd5.[34])        OSLEVEL=35 ;;
38                 *-freebsd6.[012])       OSLEVEL=37 ;;
39                 *-freebsd*)             OSLEVEL=41 ;;
40                 *)
41                         die "Your OS/Version is not supported (${CHOST}), please report."
42                         ;;
43         esac
44         append-flags "-DHAVE_SNPRINTF -DHAVE_VSNPRINTF -DOS_LEVEL=${OSLEVEL}"
45         mkmake LOCALBASE="/usr" CFLAGS="${CFLAGS}" || die "pmake failed"
46 }
47
48 src_install() {
49         mkinstall DESTDIR="${D}" LOCALBASE="/usr" MANDIR="/usr/share/man/man" \
50                 NO_MANCOMPRESS= install || die
51 }