summaryrefslogtreecommitdiff
path: root/security/chkrootkit/Makefile
blob: c79c7054675385daea51c3b015e7957da6e0e910 (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
52
53
54
55
56
57
58
59
60
61
# $NetBSD: Makefile,v 1.18 2012/10/23 18:16:22 asau Exp $
#

DISTNAME=		chkrootkit-0.47
PKGREVISION=		1
CATEGORIES=		security
MASTER_SITES=		ftp://ftp.pangeia.com.br/pub/seg/pac/

MAINTAINER=		pkgsrc-users@NetBSD.org
HOMEPAGE=		http://www.chkrootkit.org/
COMMENT=		Locally checks for signs of a rootkit
LICENSE=		modified-bsd

PKG_INSTALLATION_TYPES=	overwrite pkgviews

USE_TOOLS+=		gmake
NO_CONFIGURE=		yes

PROGRAMS=	chkdirs chklastlog chkproc chkwtmp ifpromisc strings-static \
		chkutmp
DOCDIR=		${PREFIX}/share/doc/chkrootkit

SUBST_CLASSES+=		helper
SUBST_STAGE.helper=	post-patch
SUBST_FILES.helper=	chkrootkit
SUBST_SED.helper=	-e "s|./chklastlog|${PREFIX}/bin/chklastlog|g"	\
			-e "s|./chkproc|${PREFIX}/bin/chkproc|g" 	\
			-e "s|./chkwtmp|${PREFIX}/bin/chkwtmp|g"	\
			-e "s|./chkutmp|${PREFIX}/bin/chkutmp|g"	\
			-e "s|./ifpromisc|${PREFIX}/bin/ifpromisc|g"	\
			-e "s|./strings-static|${PREFIX}/bin/strings-static|g" \
			-e "s|./chkdirs|${PREFIX}/bin/chkdirs|g" 	\
			-e "s|/bin/sh|${SH}|g"

.include "../../mk/compiler.mk"

PLIST_VARS+=	wtmpx
.if ${OPSYS} == "SunOS"
PROGRAMS+=	check_wtmpx
PLIST.wtmpx=	yes
CFLAGS+=	-DSOLARIS2
LDFLAGS+=	-lsocket
.  if empty(CC_VERSION:Mgcc-*)
MAKE_ENV+=	STATIC="-B static"
.  else
MAKE_ENV+=	STATIC="-static"
.  endif
.else
MAKE_ENV+=	STATIC="-static"
.endif

INSTALLATION_DIRS+=	bin ${DOCDIR}

do-install:
	cd ${WRKSRC} && ${INSTALL_PROGRAM} ${PROGRAMS} ${DESTDIR}${PREFIX}/bin
	${INSTALL_SCRIPT} ${WRKSRC}/chkrootkit ${DESTDIR}${PREFIX}/bin
	${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${DOCDIR}
	${INSTALL_DATA} ${WRKSRC}/README.chklastlog ${DESTDIR}${DOCDIR}
	${INSTALL_DATA} ${WRKSRC}/README.chkwtmp ${DESTDIR}${DOCDIR}

.include "../../mk/bsd.pkg.mk"