diff options
Diffstat (limited to 'net-analyzer/scanlogd')
-rw-r--r-- | net-analyzer/scanlogd/Manifest | 1 | ||||
-rw-r--r-- | net-analyzer/scanlogd/files/scanlogd-2.2.7-gentoo.patch | 21 | ||||
-rw-r--r-- | net-analyzer/scanlogd/files/scanlogd.rc | 21 | ||||
-rw-r--r-- | net-analyzer/scanlogd/metadata.xml | 9 | ||||
-rw-r--r-- | net-analyzer/scanlogd/scanlogd-2.2.7.ebuild | 47 |
5 files changed, 99 insertions, 0 deletions
diff --git a/net-analyzer/scanlogd/Manifest b/net-analyzer/scanlogd/Manifest new file mode 100644 index 000000000000..eb692e408ac5 --- /dev/null +++ b/net-analyzer/scanlogd/Manifest @@ -0,0 +1 @@ +DIST scanlogd-2.2.7.tar.gz 11352 SHA256 556a1c82b3561ea796d2ce8dfd20f578717903fd2c6557ebe27775d8ef8771da SHA512 56238cb91a33524a9512914568984ed0d066eb84bea1c08551fbc4e02c9643a3f9535d59b364db00d538e4d9bcd9650ac24f2042584d3a9c639f99eb77ba1a7b WHIRLPOOL a909801802f3caac1811e0432d83359bff39c05aee8e5fe802441eeeb85fb9b4f870e698ba501bbd2c335c4041b3182313247f7e1d699cd460745c5ef5a85de7 diff --git a/net-analyzer/scanlogd/files/scanlogd-2.2.7-gentoo.patch b/net-analyzer/scanlogd/files/scanlogd-2.2.7-gentoo.patch new file mode 100644 index 000000000000..4d1d2f01c643 --- /dev/null +++ b/net-analyzer/scanlogd/files/scanlogd-2.2.7-gentoo.patch @@ -0,0 +1,21 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,14 +1,11 @@ +-CC = gcc + LD = $(CC) + RM = rm -f +-CFLAGS = -Wall -O2 -fomit-frame-pointer +-LDFLAGS = -s + +-PCAP_H = -I/usr/include/pcap +-PCAP_L = -lpcap ++PCAP_H = $(shell pcap-config --cflags) ++PCAP_L = $(shell pcap-config --libs) + +-NIDS_H = -I/usr/local/include +-NIDS_L = -L/usr/local/lib -lnids -lnet -lpcap ++NIDS_H = -I/usr/include ++NIDS_L = -lnids + + PROJ = scanlogd + diff --git a/net-analyzer/scanlogd/files/scanlogd.rc b/net-analyzer/scanlogd/files/scanlogd.rc new file mode 100644 index 000000000000..8f3ff9f38534 --- /dev/null +++ b/net-analyzer/scanlogd/files/scanlogd.rc @@ -0,0 +1,21 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need net + use logger +} + +start() { + ebegin "Starting scanlogd" + start-stop-daemon --start --quiet --exec /usr/sbin/scanlogd + eend $? +} + +stop() { + ebegin "Stopping scanlogd" + start-stop-daemon --stop --quiet --exec /usr/sbin/scanlogd + eend $? +} diff --git a/net-analyzer/scanlogd/metadata.xml b/net-analyzer/scanlogd/metadata.xml new file mode 100644 index 000000000000..f0cc2f6cce94 --- /dev/null +++ b/net-analyzer/scanlogd/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>netmon</herd> +<use> +<flag name='nids'>Use <pkg>net-libs/libnids</pkg> for packet capturing</flag> +<flag name='pcap'>Use <pkg>net-libs/libpcap</pkg> for packet capturing</flag> +</use> +</pkgmetadata> diff --git a/net-analyzer/scanlogd/scanlogd-2.2.7.ebuild b/net-analyzer/scanlogd/scanlogd-2.2.7.ebuild new file mode 100644 index 000000000000..db871d3d03b3 --- /dev/null +++ b/net-analyzer/scanlogd/scanlogd-2.2.7.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils savedconfig toolchain-funcs user + +DESCRIPTION="a port scan detection tool" +SRC_URI="http://www.openwall.com/scanlogd/${P}.tar.gz" +HOMEPAGE="http://www.openwall.com/scanlogd/" + +LICENSE="scanlogd GPL-2" # GPL-2 for initscript +SLOT="0" +KEYWORDS="~amd64 ppc x86" +IUSE="+nids pcap" +REQUIRED_USE="?? ( nids pcap )" + +DEPEND=" + nids? ( net-libs/libnids ) + pcap? ( net-libs/libpcap ) +" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-gentoo.patch + restore_config params.h + tc-export CC +} + +src_compile() { + local target=linux + use nids && target=libnids + use pcap && target=libpcap + emake ${target} +} + +src_install() { + dosbin scanlogd + doman scanlogd.8 + newinitd "${FILESDIR}"/scanlogd.rc scanlogd + save_config params.h +} + +pkg_preinst() { + enewgroup scanlogd + enewuser scanlogd -1 -1 /dev/null scanlogd +} |