summaryrefslogtreecommitdiff
path: root/security/logcheck/Makefile
blob: e137017b0a4dfd4aafb18db1d50dca80ae32308c (plain)
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
# $NetBSD: Makefile,v 1.18 2009/12/11 19:48:21 heinz Exp $

DISTNAME=	logcheck-1.1.1
PKGREVISION=	1
CATEGORIES=	security
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=sentrytools/}

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://sourceforge.net/projects/sentrytools/
COMMENT=	Auditing tool for system logs on Unix boxes
LICENSE=	gnu-gpl-v2

PKG_DESTDIR_SUPPORT=	user-destdir

NOT_FOR_UNPRIVILEGED=	yes

PKG_SYSCONFSUBDIR=	logcheck
EGDIR=			${PREFIX}/share/examples/logcheck
TEMPDIR=		${VARBASE}/adm/tmp

.for f in hacking ignore violations violations.ignore
CONF_FILES_PERMS+=	${EGDIR}/logcheck.${f} ${PKG_SYSCONFDIR}/logcheck.${f}\
			${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0600
.endfor

SUBST_CLASSES+=		prefix
SUBST_STAGE.prefix=	pre-configure
SUBST_MESSAGE.prefix=	Fixing hard-coded paths.
SUBST_FILES.prefix=	Makefile systems/freebsd/logcheck.sh
SUBST_SED.prefix=	-e "s+/usr/local+${PREFIX}+g"
SUBST_SED.prefix+=	-e "s+@PKG_SYSCONFDIR@+${PKG_SYSCONFDIR}+g"
SUBST_SED.prefix+=	-e "s+@TEMPDIR@+${TEMPDIR}+g"

INSTALLATION_DIRS+=	bin ${EGDIR}

OWN_DIRS_PERMS+=	${TEMPDIR} ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0700

SPECIAL_PERMS+=		${PREFIX}/bin/logcheck.sh ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0700
SPECIAL_PERMS+=		${PREFIX}/bin/logtail ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0700

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/src/logtail ${DESTDIR}${PREFIX}/bin
	${INSTALL_SCRIPT} ${WRKSRC}/systems/freebsd/logcheck.sh \
		${DESTDIR}${PREFIX}/bin
.for f in hacking ignore violations violations.ignore
	${INSTALL_DATA} ${WRKSRC}/systems/freebsd/logcheck.${f} \
		${DESTDIR}${EGDIR}
.endfor

.include "../../devel/sysexits/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"