/[gentoo-x86]/net-analyzer/driftnet/driftnet-0.1.6_p20090401.ebuild
Gentoo

Contents of /net-analyzer/driftnet/driftnet-0.1.6_p20090401.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Wed Sep 17 15:51:34 2014 UTC (2 hours, 10 minutes ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +2 -2 lines
Stable for ppc, wrt bug #515876

(Portage version: 2.2.8-r1/cvs/Linux x86_64, RepoMan options: --include-arches="ppc", signed Manifest commit with key 7194459F)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/driftnet/driftnet-0.1.6_p20090401.ebuild,v 1.11 2014/07/27 11:18:47 phajdan.jr Exp $
4
5 EAPI=5
6 inherit eutils flag-o-matic toolchain-funcs
7
8 DESCRIPTION="A program which listens to network traffic and picks out images from TCP streams it observes"
9 HOMEPAGE="http://www.ex-parrot.com/~chris/driftnet/"
10 SRC_URI="mirror://github/rbu/${PN}/${P}.tar.gz"
11
12 LICENSE="GPL-2"
13 KEYWORDS="~amd64 ppc -sparc x86"
14 SLOT="0"
15 IUSE="gtk mp3 suid"
16
17 CDEPEND="net-libs/libpcap
18 gtk? ( x11-libs/gtk+:2
19 virtual/jpeg
20 media-libs/giflib
21 media-libs/libpng )"
22
23 DEPEND="${CDEPEND}
24 virtual/pkgconfig"
25 RDEPEND="${CDEPEND}
26 mp3? ( media-sound/mpg123 )"
27
28 src_prepare() {
29 sed -i \
30 -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:' \
31 png.c || die
32 # With newer libpng, --cflags causes build failures.
33 sed -i \
34 -e 's:pkg-config --cflags libpng:pkg-config --libs libpng:' \
35 Makefile || die
36 }
37
38 src_compile() {
39 export CC=$(tc-getCC)
40 if use gtk; then
41 emake
42 mv driftnet driftnet-gtk || die
43 emake clean
44 fi
45
46 # build a non-gtk version for all users
47 sed -i 's:^\(.*gtk.*\)$:#\1:g' Makefile || die "sed disable gtk failed"
48 append-flags -DNO_DISPLAY_WINDOW
49 emake
50 }
51
52 src_install () {
53 dosbin driftnet
54 doman driftnet.1
55
56 use gtk && dosbin driftnet-gtk
57
58 dodoc CHANGES CREDITS README TODO
59
60 if use suid ; then
61 elog "marking the no-display driftnet as setuid root."
62 fowners root:wheel "/usr/sbin/driftnet"
63 fperms 710 "/usr/sbin/driftnet"
64 fperms u+s "/usr/sbin/driftnet"
65 fi
66 }

  ViewVC Help
Powered by ViewVC 1.1.20