blob: 0b4cada890726a4a6d22a75b26fa7d601c3bd8d8 (
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
# New ports collection makefile for: netmond
# Date created: 2004 Mar 30
# Whom: vfom@narod.ru
#
# $FreeBSD$
#
PORTNAME= netmond
PORTVERSION= 2.2b6
PORTREVISION= 4
CATEGORIES= net-mgmt
MASTER_SITES= http://freebsd.unixfreunde.de/sources/ \
ftp://ftp.risp.ru/pub/RinetSoftware/
DISTNAME= netmond-2.2-b6
EXTRACT_SUFX= .tgz
PATCH_SITES= http://freebsd.unixfreunde.de/sources/ \
http://vfom.narod.ru/download/
PATCH_VERSION= 1
PATCHFILES= ${DISTNAME}.patch${PATCH_VERSION}${EXTRACT_SUFX} ${DISTNAME}.docs${EXTRACT_SUFX}
MAINTAINER= vfom@narod.ru
COMMENT= Netmond - IP network monitoring daemon
#MK_IFGRAPH= yes
PATCHDIR= ${WRKDIR}/patches
.if defined(MK_IFGRAPH)
LIB_DEPENDS= gd.4:${PORTSDIR}/graphics/gd
.else
CONFIGURE_ARGS= --without-ifgraph
.endif
GNU_CONFIGURE= yes
USE_BISON= yes
BINOWN= root
BINGRP= netmon
BINMODE= 0550
PLIST_FILES= sbin/netmond sbin/netmond_watchdog sbin/netmondctl \
etc/netmond.conf.sample
.if defined(MK_IFGRAPH)
PLIST_FILES+= sbin/ifgraph
.endif
USE_RC_SUBR= netmond.sh
SUB_FILES+= pkg-message netmond_watchdog netmondctl
PORTDOCS= README README.ru CHANGES README.port.eng README.port.ru index.html netmond.css en/ ru/
post-extract:
${MKDIR} ${PATCHDIR}
${TAR} -zxf ${DISTDIR}/${DISTNAME}.patch${PATCH_VERSION}${EXTRACT_SUFX} -C ${PATCHDIR}
${CP} ${PATCHDIR}/pipe.c ${WRKSRC}
do-install:
@if pw user show netmon 2>/dev/null ; then \
${ECHO} "User 'netmon' exists." ; \
else \
pw useradd -n netmon -g wheel -c 'Network monitor account' -s /usr/sbin/nologin ; \
fi
@if pw group show ${BINGRP} 2>/dev/null ; then \
${ECHO} "Group '${BINGRP}' exists." ; \
else \
pw groupadd ${BINGRP} -M root,netmon ; \
fi
${INSTALL_PROGRAM} ${WRKSRC}/netmond ${PREFIX}/sbin/netmond
.if defined(MK_IFGRAPH)
${INSTALL_PROGRAM} ${WRKSRC}/ifgraph ${PREFIX}/sbin/ifgraph
.endif
${INSTALL_SCRIPT} ${WRKDIR}/netmond_watchdog ${PREFIX}/sbin/netmond_watchdog
${INSTALL_SCRIPT} ${WRKDIR}/netmondctl ${PREFIX}/sbin/netmondctl
${INSTALL_DATA} ${WRKSRC}/netmon.conf.sample ${PREFIX}/etc/netmond.conf.sample
${CHMOD} u+s ${PREFIX}/sbin/netmond
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${CHMOD} 755 ${DOCSDIR}
${TAR} -zxf ${DISTDIR}/${DISTNAME}.docs${EXTRACT_SUFX} -C ${DOCSDIR}
.endif
post-install:
${CAT} ${PKGMESSAGE}
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 500000
BROKEN= Does not compile on 4.x
.endif
.include <bsd.port.post.mk>
|