/[gentoo-x86]/net-analyzer/nepenthes/nepenthes-0.2.2.ebuild
Gentoo

Contents of /net-analyzer/nepenthes/nepenthes-0.2.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Tue Oct 2 13:26:00 2012 UTC (21 months, 3 weeks ago) by pinkbyte
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +5 -1 lines
Fix for building with newer curl wrt bug #426482

(Portage version: 2.2.0_alpha132/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/nepenthes/nepenthes-0.2.2.ebuild,v 1.8 2012/06/12 02:53:49 zmedico Exp $
4
5 EAPI="2"
6 inherit autotools eutils user
7
8 DESCRIPTION="Nepenthes is a low interaction honeypot that captures worms by emulating known vulnerabilities"
9 HOMEPAGE="http://nepenthes.sourceforge.net"
10 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
11 mirror://gentoo/${P}-gcc44.patch.bz2"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~ppc ~x86"
16 IUSE=""
17 # selinux
18
19 DEPEND="net-misc/curl
20 sys-apps/file
21 dev-libs/libpcre
22 net-libs/adns"
23
24 RDEPEND=""
25 #RDEPEND=" selinux? ( sec-policy/selinux-nepenthes )"
26
27 pkg_setup() {
28 enewgroup nepenthes
29 enewuser nepenthes -1 -1 /dev/null nepenthes
30 }
31
32 src_prepare() {
33 epatch "${FILESDIR}"/${P}-gcc4.patch
34 epatch "${WORKDIR}"/${P}-gcc44.patch
35 sed -i modules/shellcode-signatures/shellcode-signatures.cpp \
36 -e 's|var/cache|/var/lib/cache|' || die
37 sed -i configure.ac \
38 -e 's|-R/usr/local/lib||g' || die
39 find . -name Makefile.am -exec sed 's: -Werror::' -i '{}' \;
40
41 # fix for bug #426482
42 has_version ">=net-misc/curl-7.22.0" && find . -type f -exec sed '/#include <curl\/types.h>/d' -i '{}' \;
43
44 eautoreconf
45 }
46
47 src_configure() {
48 econf --sysconfdir=/etc \
49 --localstatedir=/var/lib/nepenthes \
50 --enable-capabilities
51 }
52
53 src_install() {
54 einstall || die "make install failed"
55
56 for i in "${D}"/etc/nepenthes/*; do
57 sed -i \
58 -e 's|"var/binaries|"/var/lib/nepenthes/binaries|' \
59 -e 's|"var/hexdumps|"/var/lib/nepenthes/hexdumps|' \
60 -e 's|"var/cache/nepenthes|"/var/lib/nepenthes/cache|' \
61 -e 's|"var/log|"/var/log/nepenthes|' \
62 -e 's|"lib/nepenthes|"/usr/lib/nepenthes|' \
63 -e 's|"etc|"/etc|' $i
64 done
65
66 dodoc doc/README.VFS AUTHORS
67 dosbin nepenthes-core/src/nepenthes || die "dosbin failed"
68 rm "${D}"/usr/bin/nepenthes
69 rm "${D}"/usr/share/doc/README.VFS
70 rm "${D}"/usr/share/doc/logo-shaded.svg
71
72 newinitd "${FILESDIR}/${PN}.initd" "${PN}"
73 newconfd "${FILESDIR}/${PN}.confd" "${PN}"
74
75 diropts -m 755 -o nepenthes -g nepenthes
76 keepdir /var/log/nepenthes
77 keepdir /var/lib/nepenthes
78 keepdir /var/lib/nepenthes/binaries
79 keepdir /var/lib/nepenthes/hexdumps
80 keepdir /var/lib/nepenthes/cache
81 keepdir /var/lib/nepenthes/cache/geolocation
82 }

  ViewVC Help
Powered by ViewVC 1.1.20