# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/mwcollect/mwcollect-2.1.1.ebuild,v 1.1 2005/07/09 09:09:13 chriswhite Exp $ inherit eutils multilib DESCRIPTION="mwcollect collects worms and other autonomous spreading malware" HOMEPAGE="http://www.mwcollect.org/" SRC_URI="http://download.mwcollect.org/${P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~ppc ~x86" IUSE="" DEPEND="dev-libs/libpcre sys-libs/libcap net-misc/curl" RDEPEND="" src_unpack() { unpack ${A} cd ${S} # minimal patch to mwcollect.conf epatch ${FILESDIR}/3.0.0.mwcollect-conf.patch epatch ${FILESDIR}/daemonize.patch sed -i \ -e "s:CXXFLAGS = .*:CXXFLAGS = ${CXXFLAGS} -D LINUX -D_GNU_SOURCE -g -Wall:" \ Makefile || die "CFLAGS patching failed" } src_compile() { emake || die "emake failed" } src_install() { dodoc doc/core-design.txt README mv doc/mwcollectd.1.man doc/mwcollectd.1 doman doc/mwcollectd.1 dosbin bin/mwcollectd insinto /usr/$(get_libdir)/mwcollect doins bin/modules/* # multilib support sed -e "s/%%LIBDIR%%/$(get_libdir)/g" \ conf/mwcollect.conf > conf/mwcollect.conf.gentoo \ || die "sed failed" insinto /etc/mwcollect newins conf/mwcollect.conf.gentoo mwcollect.conf.dist \ || die "newins mwcollect.conf failed" rm conf/mwcollect.conf* insinto /etc/mwcollect doins conf/* # directories for unknown shellcodes and fetched data # BUG: # enewuser and fperms keepdir /var/lib/${PN}/data/binaries keepdir /var/lib/${PN}/data/shellcodes # BUG: # should I create /var/log/${PN}? I don't think so # keepdir /var/log/${PN} # 3.x.initd would be okay, but just in case... # BUG: # should be mwcollect or mwcollectd? newinitd ${FILESDIR}/3.0.0.initd mwcollectd insinto /etc/conf.d newins ${FILESDIR}/3.0.0.confd mwcollectd } pkg_postinst() { ewarn "the main config file is renamed." ewarn "you probably need to rewrite every config file." }