# Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # initial attempt of release ;-) by Simon Keimer At="puresecure-1.6-personal.tar.gz" P="puresecure-1.6" S=${WORKDIR}/${P} SRC_URI="" DESCRIPTION="PureSecure, a Total Intrusion Detection System from Demarc" HOMEPAGE="http://www.demarc.com/downloads/" LICENSE="Demarc Proprietary" KEYWORDS="x86 ppc sparc alpha" DEPEND=">=dev-db/mysql-3.23.54a >=dev-perl/perl-5.8.0-r8 >=dev-perl/DBI-1.30-r1 >=dev-perl/Mail-Sendmail-0.78 >=dev-perl/mod_perl-1.27-r1 >=dev-perl/Msql-Mysql-modules-1.2219-r1 >=net-analyzer/snort-1.9.0 >=net-www/apache-1.3.27-r1 >=net-www/mod_ssl-2.8.12" RDEPEND="$DEPEND" src_unpack() { if [ ! -f ${DISTDIR}/${At} ] ; then die "Please download ${At} from ${HOMEPAGE} and move it to ${DISTDIR}. Note: For commercial use you'll have to obtain a license!" fi tar -xvfz ${At} } src_install () { cp -rp ${WORKDIR}/${P} ${D}/usr/local/ ln -s ${D}/usr/local/${P} ${D}/usr/local/puresecure } pkg_postinst () { einfo "Make sure you started Apache, MySQL and Snort before you configure PureSecure!" einfo "Also verify that MySQL has set a \"root\" password." einfo "To configure PureSecure run /usr/local/puresecure/install/configure and answer" einfo "no whenever the script wants to install any software or restart a local service." einfo "" einfo "Finally run ebuild /var/db/pkg/net-analyzer/${P}/${P}.ebuild config" einfo "and restart apache" } pkg_config() { cat >> ${ROOT}/etc/apache/conf/apache.conf << "EOF" #-------------------------------------------------------- # PureSecure Console Configuration # BOTH MOD/REGULAR: Redirect /ps https://${HOSTNAME}/Demarc/PureSecure Redirect /demarc https://${HOSTNAME}/Demarc/PureSecure Alias /dm_images /usr/local/puresecure/console/images AllowOverride all DirectoryIndex PureSecure # FOR REGULAR PERL: # ScriptAlias /Demarc "/usr/local/puresecure/console/cgi" # FOR MOD_PERL: Comment the "ScriptAlias" line # above and Uncomment all lines below: PerlModule Apache::Registry KeepAlive Off Alias /dm_images /usr/local/puresecure/console/images allow from all Alias /Demarc /usr/local/puresecure/console/cgi SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI allow from all PerlSendHeader On DirectoryIndex PureSecure #________________________________________________________ EOF }