aboutsummaryrefslogtreecommitdiff
path: root/games/unnethack/Makefile
blob: 298831ed271a73f7b2818b668361f49cc49e016e (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
# Created by: Akinori MUSHA aka knu <knu@idaemons.org>
# $FreeBSD$

PORTNAME=	unnethack
PORTVERSION=	4.0.0.20120401
PORTREVISION=	2
CATEGORIES=	games
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTVERSION:R}

DISTNAME=	${PORTNAME}-${PORTVERSION:R}-${PORTVERSION:E}

MAINTAINER=	knu@FreeBSD.org
COMMENT=	New variant of NetHack

GNU_CONFIGURE=	yes
USES=		gmake
MAKE_JOBS_UNSAFE=	yes

VARDIR_REL=	var/games/${PORTNAME}
VARDIR=		${PREFIX}/${VARDIR_REL}
CONFIGURE_ARGS=	--datadir="${DATADIR:H}" --localstatedir="${VARDIR:H}" --docdir="${DOCSDIR:H}" \
		--with-owner=no --with-group=no \
		--enable-data-librarian
MAKE_ARGS=	MANPREFIX="${STAGEDIR}${MANPREFIX}"
INSTALL_TARGET=	install manpages
PKGDEINSTALL=	${WRKDIR}/pkg-deinstall
SUB_FILES=	pkg-deinstall
SUB_LIST=	VARDIR="${VARDIR}"
PLIST_SUB=	VARDIR="${VARDIR_REL}"

post-patch:
	${MV} ${WRKSRC}/doc/nethack.6 ${WRKSRC}/doc/${PORTNAME}.6

post-install:
	cd ${STAGEDIR}${PREFIX}/man/man6; \
	for f in ${WRKSRC}/doc/*.6; do \
		fn=$${f##*/}; \
		case $$fn in \
			unnethack.6) ;; \
			*) ${MV} $$fn unnethack_$$fn ;; \
		esac; \
	done
.if !defined(NOPORTDOCS)
	${INSTALL_DATA} ${FILESDIR}/sample.unnethackrc ${STAGEDIR}${DOCSDIR}
.endif
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>