aboutsummaryrefslogtreecommitdiffstats
path: root/security/rkhunter/Makefile
blob: 0d1a249c50674970a5c62c14acaf260602392dc2 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Created by: Radim Kolar
# $FreeBSD$

PORTNAME=   rkhunter
PORTVERSION=    1.4.0
CATEGORIES= security
MASTER_SITES=   SF

MAINTAINER= sbz@FreeBSD.org
COMMENT=    Rootkit detection tool

LICENSE=    GPLv2

OPTIONS_DEFINE= LSOF NMAP DOCS
OPTIONS_DEFAULT=LSOF

RUN_DEPENDS+=   p5-Digest-SHA1>=0:${PORTSDIR}/security/p5-Digest-SHA1 \
        ${LOCALBASE}/bin/wget:${PORTSDIR}/ftp/wget

USE_PERL5=  yes
NO_BUILD=   yes
SUB_FILES=  415.${PORTNAME}

MAN8=       ${PORTNAME}.8
MANCOMPRESSED=  no

PORTDOCS=   ACKNOWLEDGMENTS CHANGELOG FAQ LICENSE README

.include <bsd.port.pre.mk>

.if ${PORT_OPTIONS:MLSOF}
RUN_DEPENDS+=   lsof:${PORTSDIR}/sysutils/lsof
.endif

.if ${PORT_OPTIONS:MNMAP}
RUN_DEPENDS+=   nmap:${PORTSDIR}/security/nmap
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|{SHAREDIR}/man/man8|{PREFIX}/man/man8|g' \
        ${WRKSRC}/installer.sh

do-install:
    cd ${WRKSRC} && ./installer.sh --layout custom ${PREFIX} --install
    ${INSTALL_MAN} ${WRKSRC}/files/${PORTNAME}.8 \
        ${MAN8PREFIX}/man/man8
    @${MKDIR} ${PREFIX}/etc/periodic/security
    ${INSTALL_SCRIPT} ${WRKDIR}/415.${PORTNAME} ${PREFIX}/etc/periodic/security
.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/files/|} ${DOCSDIR}
.endif

post-install:
    ${INSTALL_DATA} ${WRKSRC}/files/${PORTNAME}.conf ${PREFIX}/etc/${PORTNAME}.conf.sample
    @if [ ! -f ${PREFIX}/etc/${PORTNAME}.conf ]; then \
        ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf ${PREFIX}/etc; \
    fi
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>