aboutsummaryrefslogtreecommitdiffstats
path: root/security/portaudit-db/Makefile
blob: db754b90df5764c931d303374ca5ab8c6be22c23 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# New ports collection makefile for:    portaudit-db
# Date created:             12 Jun 2004
# Whom:                 Oliver Eikemeier
#
# $FreeBSD$
#

PORTNAME=   portaudit-db
PORTVERSION=    0.2.3
CATEGORIES= security
DISTFILES=

MAINTAINER= secteam@FreeBSD.org
COMMENT=    Creates a portaudit database from a current ports tree

RUN_DEPENDS=    xsltproc:${PORTSDIR}/textproc/libxslt

DEPENDS_ARGS+=  WITHOUT_PYTHON=yes

DATABASEDIR?=   ${AUDITFILE:H}

PLIST_SUB+= DATABASEDIR="${DATABASEDIR}"

SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \
        -e "s|%%DATADIR%%|${DATADIR}|g" \
        -e "s|%%LOCALBASE%%|${LOCALBASE}|g" \
        -e "s|%%PORTSDIR%%|${PORTSDIR}|g" \
        -e "s|%%PORTVERSION%%|${PORTVERSION}|g" \
        -e "s|%%DATABASEDIR%%|${DATABASEDIR}|g"

do-build:
    @for f in packaudit.sh packaudit.conf; do \
        ${SED} ${SED_SCRIPT} "${FILESDIR}/$$f" > "${WRKDIR}/$$f"; \
    done

do-install:
    @${INSTALL_SCRIPT} ${WRKDIR}/packaudit.sh ${PREFIX}/bin/packaudit
    @${INSTALL_DATA} ${WRKDIR}/packaudit.conf ${PREFIX}/etc/packaudit.conf.sample
    @${MKDIR} ${DATADIR}
    @${INSTALL_SCRIPT} ${FILESDIR}/portaudit2vuxml.awk ${DATADIR}
    @${INSTALL_DATA} ${FILESDIR}/vuxml2html.xslt ${FILESDIR}/vuxml2portaudit.xslt ${DATADIR}
    @${MKDIR} ${DATABASEDIR}

.include <bsd.port.mk>