blob: 29c5331041a43afb860e20df7ff789d56bf71999 (
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
|
# Ports collection makefile for: logcheck
# Date created: 9 December 1999
# Whom: Dan Langille <dan@freebsddiary.org>
#
# $FreeBSD$
#
PORTNAME= logcheck
PORTVERSION= 1.1.1
PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= ftp://sensimilia.eu.org/pub/software/sys/ \
http://www.ukc.mirror.ac.uk/sites/ftp.freebsd.org/pub/FreeBSD/ports/distfiles/ \
http://people.FreeBSD.org/~foxfair/distfiles/
DISTNAME= logsentry-${PORTVERSION}
MAINTAINER= sergei@kolobov.com
COMMENT= Auditing tool for system logs on Unix boxes
USE_REINPLACE= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
# Install binaries and config files readable to root only
BINMODE= 700
SHAREMODE= 600
LOGCHECK_TMP?= /var/run/logcheck
PLIST_SUB+= LOGCHECK_TMP=${LOGCHECK_TMP}
CONFIG_FILES= logcheck.hacking logcheck.ignore \
logcheck.violations logcheck.violations.ignore
DOCS= CREDITS INSTALL README README.how.to.interpret README.keywords
do-build:
cd ${WRKSRC}/src && ${CC} ${CFLAGS} -o logtail logtail.c
${REINPLACE_CMD} -e 's!/usr/local/bin/logtail!${PREFIX}/bin/logtail!' \
-e 's!/usr/local/etc/tmp!${LOGCHECK_TMP}!' \
-e 's!/usr/local/etc/logcheck!${PREFIX}/etc/logcheck!' \
${WRKSRC}/systems/freebsd/logcheck.sh
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/logtail ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/systems/freebsd/logcheck.sh ${PREFIX}/etc
@${MKDIR} ${EXAMPLESDIR}
.for file in ${CONFIG_FILES}
@${INSTALL_DATA} ${WRKSRC}/systems/freebsd/${file} ${EXAMPLESDIR}
@${TEST} -f ${PREFIX}/etc/${file} || \
${INSTALL_DATA} ${WRKSRC}/systems/freebsd/${file} ${PREFIX}/etc
.endfor
${TEST} -d ${LOGCHECK_TMP} || ${MKDIR} -m 700 ${LOGCHECK_TMP}
${CHOWN} root:wheel ${LOGCHECK_TMP}
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
.endif
.include <bsd.port.mk>
|