summaryrefslogtreecommitdiffstats
path: root/net/cnupm/Makefile
blob: 8ad6579ebc1ca0c2d45be470a17a37338a9b312e (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
# New ports collection makefile for:	cnupm
# Date created:				29 October 2003
# Whom:					Dennis S.Davidoff <null@1system.ru>
#
# $FreeBSD$
#

PORTNAME=	cnupm
PORTVERSION=	3.12
CATEGORIES=	net ipv6
MASTER_SITES=	http://pdp-11.org.ru/~form/cnupm/files/ \
		ftp://cvs.1system.ru/pub/local/src/cnupm/

MAINTAINER=	scjamorim@bsd.com.br
COMMENT=	The BPF Traffic Collector (IPv4/IPv6)

MAKE_ENV+=	BINDIR="${PREFIX}/sbin" \
		MANDIR="${MANPREFIX}/man/man"

USE_RC_SUBR=	cnupm.sh
MAN8=		cnupm.8 cnupmstat.8
MANCOMPRESSED=	yes

CNUPM_OWN?=	cnupm
CNUPM_GRP?=	cnupm

PW=		/usr/sbin/pw

PLIST_SUB+=	CNUPM_OWN="${CNUPM_OWN}" CNUPM_GRP="${CNUPM_GRP}"

PORTDOCS=	README

post-install:
	${PW} groupshow ${CNUPM_GRP} 2>/dev/null || ${PW} groupadd \
		-n ${CNUPM_GRP}
	${PW} usershow ${CNUPM_OWN} 2>/dev/null || ${PW} useradd \
		-n ${CNUPM_OWN} -c 'Cnupm traffic collector' \
		-g ${CNUPM_GRP} -s /sbin/nologin
	${INSTALL} -o ${CNUPM_OWN} -g ${CNUPM_GRP} -m 750 -d ${PREFIX}/var/cnupm
	${PW} usermod -n ${CNUPM_OWN} -d ${PREFIX}/var/cnupm
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
.for docs in ${PORTDOCS}
	@${INSTALL_DATA} ${WRKSRC}/${docs} ${DOCSDIR}
.endfor
.endif

	@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>
OpenPOWER on IntegriCloud