aboutsummaryrefslogtreecommitdiff
path: root/games/bnetd/Makefile
blob: 045628df08ff9e8fcbbf24f70fa821b38d7eb9fd (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
# New ports collection makefile for:	bnetd
# Version required:	0.4.6
# Date created:		24 April 1999
# Whom:			Ying-Chieh Liao <ijliao@csie.nctu.edu.tw>
#
# $Id$
#

DISTNAME=	bnetd-0.4.6
CATEGORIES=	net game
MASTER_SITES=	http://www.bnetd.org/files/

MAINTAINER=	ijliao@csie.nctu.edu.tw

MAN1=		bnclient.1 bnetd.1 bnpass.1
MAN4=		bnetd.conf.4 bntext.4
MLINKS=		bntext.4 bnmotd.txt.4 bntext.4 bnnews.txt.4

do-build:
	@(cd ${WRKSRC}/src; ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS})

do-install:
	cd ${WRKSRC}/bin; ${INSTALL_PROGRAM} bnclient bnpass ${PREFIX}/bin
	cd ${WRKSRC}/sbin; ${INSTALL_PROGRAM} bnetd ${PREFIX}/sbin
	cd ${WRKSRC}/man; ${INSTALL_MAN} ${MAN1} ${MAN1PREFIX}/man/man1; ${INSTALL_MAN} ${MAN4} ${MAN4PREFIX}/man/man4
	${MKDIR} ${PREFIX}/bnetd; ${CP} -R ${WRKSRC}/files ${WRKSRC}/users ${WRKSRC}/conf ${PREFIX}/bnetd

post-install:
	@if [ ! -f ${PREFIX}/etc/rc.d/bnetd.sh ]; then \
		${ECHO} "Installing ${PREFIX}/etc/rc.d/bnetd.sh startup file."; \
		${ECHO} "#!/bin/sh" > ${PREFIX}/etc/rc.d/bnetd.sh; \
		${ECHO} "cd ${PREFIX}; [ -x sbin/bnetd -a -f bnetd/conf/bnetd.conf ] && sbin/bnetd -c bnetd/conf/bnetd.conf > /dev/null && echo -n ' bnetd'" >> ${PREFIX}/etc/rc.d/bnetd.sh; \
		chmod 751 ${PREFIX}/etc/rc.d/bnetd.sh; \
	fi

.include <bsd.port.mk>