summaryrefslogtreecommitdiff
path: root/net/mtr/Makefile
blob: ed216981b2ac832231a524fe95ca7496e459bc03 (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.8 2000/06/12 10:59:42 wiz Exp $
# $FreeBSD: ports/net/mtr/Makefile,v 1.16 1999/10/28 08:06:00 mharo Exp $

DISTNAME=	mtr-0.42
CATEGORIES=	net
MASTER_SITES=	ftp://ftp.bitwizard.nl/mtr/ \
		http://www.giovannelli.it/~gmarco/files/

MAINTAINER=	sommerfeld@netbsd.org
HOMEPAGE=	http://www.bitwizard.nl/mtr/

DEPENDS+=	gtk+>=1.2.7:../../x11/gtk

GNU_CONFIGURE=	yes
USE_GMAKE=	yes
CONFIGURE_ENV+= CPPFLAGS=-I${PREFIX}/include

OSVER!=		uname -r
GOOD_CURSES=	1.4[Y-Z] 1.4Z[A-Z] 1.[5-9]*

.for PATTERN in ${GOOD_CURSES}
.if ${OSVER:M${PATTERN}} != ""
CURSES_GOOD?=	# defined
.endif
.endfor

.if defined(CURSES_GOOD)
# hack to use curses even if ncurses are also installed
pre-configure:
.for FILE in configure configure.in
	cd ${WRKSRC}; ${SED} "s/ncurses/curses/" < ${FILE} \
		> ${FILE}.patched; ${MV} ${FILE}.patched ${FILE}
.endfor
	${CHMOD} 755 ${WRKSRC}/configure
.else
DEPENDS+=	ncurses>=4.2:../../devel/ncurses
.endif

do-install:
	${INSTALL} -c -s -m 4755 -o root -g wheel ${WRKSRC}/mtr ${PREFIX}/sbin
	${INSTALL_DATA} ${WRKSRC}/mtr.8 ${PREFIX}/man/man8

post-install:
	@${ECHO} ""
	@${ECHO} "${PREFIX}/sbin/mtr is setuid \"root\" "
	@${ECHO} ""
	@${ECHO} "Please read about potential security issues"
	@${ECHO} "in file ${WRKSRC}/SECURITY (not installed)"
	@${ECHO} ""

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