# New ports collection makefile for: audit # Date created: 24 March 2002 # Whom: anders # # $FreeBSD$ # PORTNAME= audit PORTVERSION= 1.0 CATEGORIES= security MASTER_SITES= http://community.corest.com/pub/audit/ \ ftp://ftp.nuug.no/pub/anders/distfiles/ DISTNAME= ${PORTNAME}-v${PORTVERSION}beta-src MAINTAINER= anders@FreeBSD.org .if defined(WITH_MYSQL) LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client .endif .if defined(WITH_PGSQL) LIB_DEPENDS+= pq.2:${PORTSDIR}/databases/postgresql7 .endif WRKSRC= ${WRKDIR}/${PORTNAME}-v${PORTVERSION}beta GNU_CONFIGURE= yes CONFIGURE_ARGS+= --with-audit-libdir=${PREFIX}/lib/alat .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 INSTALLS_SHLIB= yes LDCONFIG_DIRS= %%PREFIX%%/lib/alat MANCOMPRESSED= yes MAN1= audit.1 MAN8= auditd.8 DOCS= COPYING README TODO FIXPREFIX_CONF= src/include/audconf.h src/auditd/auditd.8 LIBVERSION= 1 post-patch: ${PERL} -pi -e "s@Linux@FreeBSD@g" ${WRKSRC}/configure (${FIND} ${WRKSRC}/src/modules -name Makefile.in -exec ${PERL} -pi -e \ "s@^LIB=(.*){VERSION}@SOVERSION=\t${LIBVERSION}\nLIB=\1\{SOVERSION\}@" {} \;) ${PERL} -pi -e "s@AUDIT_VERSION@\"${LIBVERSION}\"@g" \ ${WRKSRC}/src/lib/modules.c .for f in ${FIXPREFIX_CONF} ${PERL} -pi -e "s@/etc/auditd.conf@${PREFIX}/etc/auditd.conf@g" \ ${WRKSRC}/${f} .endfor post-install: ${INSTALL_DATA} ${WRKSRC}/auditd.conf ${PREFIX}/etc/auditd.conf.sample .if !defined(NOPORTDOCS) ${INSTALL} -d -o root -g wheel -m 0775 ${DOCSDIR} .for f in ${DOCS} ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR} .endfor .endif .include