aboutsummaryrefslogtreecommitdiff
path: root/games/linux-enemyterritory-omni-bot/Makefile
blob: e4b02d56cfb8ffcadd4f403a4bb2a5b2d17bb5b2 (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
# Created by: alepulver
# $FreeBSD$

PORTNAME=	omni-bot
PORTVERSION=	0.820
CATEGORIES=	games linux
MASTER_SITES=	http://www.omni-bot.com/forum/downloads/
PKGNAMEPREFIX=	linux-enemyterritory-
DISTNAME=	Omni-bot_0.82_ET_Linux

MAINTAINER=	bar@FreeBSD.org
COMMENT=	Omni-Bot is a bot for Enemy Territory

RUN_DEPENDS=	et:${PORTSDIR}/games/linux-enemyterritory

USE_ZIP=	yes
USE_LINUX=	yes
NO_WRKSUBDIR=	yes

DATADIR=	${PREFIX}/lib/enemyterritory/${PORTNAME}
DOCSDIR=	${PREFIX}/share/doc/enemyterritory-${PORTNAME}

do-build:
.for f in et etded
	@(${ECHO_CMD} "#!/bin/sh"; \
	${ECHO_CMD} 'exec ${PREFIX}/bin/${f} +set fs_game ${PORTNAME} +set omnibot_path "${DATADIR}" "$$@"') > \
		${WRKSRC}/${f}-${PORTNAME}
.endfor

do-install:
.for f in et etded
	${INSTALL_SCRIPT} ${WRKSRC}/${f}-${PORTNAME} ${PREFIX}/bin
.endfor
	${MKDIR} ${DATADIR}
	${MV} ${WRKSRC}/omni-bot/et/user/omni-bot.cfg \
		${WRKSRC}/omni-bot/et/user/omni-bot.cfg.sample
	${CP} -R ${WRKSRC}/omni-bot/* ${DATADIR}
	${INSTALL_PROGRAM} ${WRKSRC}/omnibot/qagame.mp.i386.so ${DATADIR}
	${INSTALL_DATA} ${WRKSRC}/omnibot/omnibot_et.pk3 ${DATADIR}

post-install:
	@if [ ! -f ${DATADIR}/et/user/omni-bot.cfg ]; then \
		${CP} -p ${DATADIR}/et/user/omni-bot.cfg.sample \
			${DATADIR}/et/user/omni-bot.cfg ; \
	fi

.include <bsd.port.mk>