1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 #PERL_EXPORT_PHASE_FUNCTIONS=no
6 inherit eutils perl-module toolchain-funcs
8 DESCRIPTION="Port Scanning Attack Detection daemon"
9 SRC_URI="https://www.cipherdyne.org/psad/download/${P}.tar.bz2"
10 HOMEPAGE="https://www.cipherdyne.org/psad/"
14 KEYWORDS="~alpha amd64 ppc ~sparc x86"
16 DEPEND="virtual/perl-ExtUtils-MakeMaker"
30 epatch "${FILESDIR}"/${PN}-2.2.4-var-run.patch
33 -e 's|/usr/bin/gcc|$(CC)|g' \
34 -e 's|-O|$(CFLAGS) $(LDFLAGS)|g' \
36 # Fix up default paths
38 -e "s:/usr/bin/whois_psad:/usr/bin/whois:g" \
46 for deps_subdir in IPTables-Parse IPTables-ChainMgr; do
47 cd "${S}"/deps/${deps_subdir} || die
48 SRC_PREP="no" perl-module_src_configure
57 for deps_subdir in IPTables-Parse IPTables-ChainMgr; do
58 cd "${S}"/deps/${deps_subdir} || die
59 perl-module_src_compile
64 newbin pscan psad-pscan
67 dosbin kmsgsd psad psadwatchd
68 newsbin fwcheck_psad.pl fwcheck_psad
72 *.conf auto_dl icmp{,6}_types ip_options psad_* pf.os posf \
75 newinitd init-scripts/psad-init.gentoo psad
79 dodoc BENCHMARK CREDITS Change* FW_EXAMPLE_RULES README SCAN_LOG
81 insinto /etc/psad/snort_rules
82 doins deps/snort_rules/*
85 for deps_subdir in IPTables-Parse IPTables-ChainMgr; do
86 cd "${S}"/deps/${deps_subdir} || die
87 perl-module_src_install