2002-03-24 15:32:45 +00:00
|
|
|
# New ports collection makefile for: audit
|
|
|
|
# Date created: 24 March 2002
|
|
|
|
# Whom: anders
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= audit
|
|
|
|
PORTVERSION= 1.0
|
2007-10-17 07:04:29 +00:00
|
|
|
PORTREVISION= 3
|
2002-03-24 15:32:45 +00:00
|
|
|
CATEGORIES= security
|
2004-05-28 11:48:29 +00:00
|
|
|
MASTER_SITES= http://www1.corest.com/download/audit/ \
|
2007-10-17 08:35:03 +00:00
|
|
|
ftp://ftp.stack.nl/pub/users/johans/audit/
|
2002-03-24 15:32:45 +00:00
|
|
|
DISTNAME= ${PORTNAME}-v${PORTVERSION}beta-src
|
|
|
|
|
2004-05-28 11:25:00 +00:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2003-03-07 06:14:21 +00:00
|
|
|
COMMENT= Tools for remote and centralized audit data collection
|
2002-03-24 15:32:45 +00:00
|
|
|
|
2004-11-03 23:51:15 +00:00
|
|
|
OPTIONS= MYSQL "With MySQL support" off \
|
|
|
|
PGSQL "With PostGreSQL support" off
|
2004-09-17 22:48:49 +00:00
|
|
|
|
2005-02-10 10:53:00 +00:00
|
|
|
MAKE_ARGS= CFLAGS+="-fPIC -DPIC"
|
|
|
|
|
2007-10-17 08:35:03 +00:00
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-v${PORTVERSION}
|
2007-10-17 07:04:29 +00:00
|
|
|
|
|
|
|
USE_GMAKE= yes
|
|
|
|
USE_LDCONFIG= ${PREFIX}/lib/alat
|
|
|
|
|
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
CONFIGURE_ARGS+= --with-audit-libdir=${PREFIX}/lib/alat
|
|
|
|
MANCOMPRESSED= yes
|
|
|
|
MAN1= audit.1
|
|
|
|
MAN8= auditd.8
|
|
|
|
|
|
|
|
PORTDOCS= COPYING README TODO
|
|
|
|
FIXPREFIX_CONF= src/include/audconf.h src/auditd/auditd.8
|
|
|
|
LIBVERSION= 1
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2002-03-24 15:32:45 +00:00
|
|
|
.if defined(WITH_MYSQL)
|
2004-11-03 23:51:15 +00:00
|
|
|
USE_MYSQL= yes
|
2002-03-24 15:32:45 +00:00
|
|
|
.endif
|
|
|
|
.if defined(WITH_PGSQL)
|
2005-01-31 00:35:55 +00:00
|
|
|
USE_PGSQL= yes
|
2002-03-24 15:32:45 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_MYSQL)
|
|
|
|
CONFIGURE_ARGS+= --with-mysql \
|
|
|
|
--with-mysql-libdir=${LOCALBASE}/lib/mysql \
|
|
|
|
--with-mysql-incdir=${LOCALBASE}/include
|
|
|
|
PLIST_SUB+= MYSQL=''
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= MYSQL='@comment '
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_PGSQL)
|
|
|
|
CONFIGURE_ARGS+= --with-pgsql \
|
|
|
|
--with-pgsql-libdir=${LOCALBASE}/lib \
|
|
|
|
--with-pgsql-incdir=${LOCALBASE}/include
|
|
|
|
PLIST_SUB+= PGSQL=''
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= PGSQL='@comment '
|
|
|
|
.endif
|
2004-03-05 12:20:58 +00:00
|
|
|
|
2002-03-24 15:32:45 +00:00
|
|
|
post-patch:
|
2002-11-04 01:30:04 +00:00
|
|
|
${REINPLACE_CMD} -e "s@Linux@FreeBSD@g" ${WRKSRC}/configure
|
|
|
|
(${FIND} ${WRKSRC}/src/modules -name Makefile.in -exec \
|
|
|
|
${REINPLACE_CMD} -e \
|
2002-11-24 09:03:29 +00:00
|
|
|
"s!^LIB=\(.*\).{VERSION}!LIB=\1${LIBVERSION}!" {} \;)
|
2002-11-04 01:30:04 +00:00
|
|
|
${REINPLACE_CMD} -e "s@AUDIT_VERSION@\"${LIBVERSION}\"@g" \
|
2002-03-24 15:32:45 +00:00
|
|
|
${WRKSRC}/src/lib/modules.c
|
|
|
|
.for f in ${FIXPREFIX_CONF}
|
2002-11-04 01:30:04 +00:00
|
|
|
${REINPLACE_CMD} -e "s@/etc/auditd.conf@${PREFIX}/etc/auditd.conf@g" \
|
2002-03-24 15:32:45 +00:00
|
|
|
${WRKSRC}/${f}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
post-install:
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/auditd.conf ${PREFIX}/etc/auditd.conf.sample
|
|
|
|
.if !defined(NOPORTDOCS)
|
2002-10-07 00:06:12 +00:00
|
|
|
${INSTALL} -d -o root -g wheel -m 0755 ${DOCSDIR}
|
2004-11-03 23:51:15 +00:00
|
|
|
.for f in ${PORTDOCS}
|
2002-03-24 15:32:45 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
|
|
|
|
.endfor
|
|
|
|
.endif
|
|
|
|
|
2004-03-05 12:20:58 +00:00
|
|
|
.include <bsd.port.post.mk>
|