summaryrefslogtreecommitdiffstats
path: root/games/pcgen/Makefile
blob: 5c74b841d7123418aa9a6f76f51d1a8ad14aa9f1 (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Ports collection makefile for:	PCGen
# Date created:				17 November 2003
# Whom:					Herve Quiroz <herve.quiroz@esil.univ-mrs.fr>
#
# $FreeBSD$

PORTNAME=	pcgen
PORTVERSION=	5.8.0
CATEGORIES=	games java
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	pcgen
DISTNAME=	pcgen${PORTVERSION:S/.//g}_partial

MAINTAINER=	hq@FreeBSD.org
COMMENT=	A Java-based RPG character generator and maintenance program

RUN_DEPENDS=	java:${PORTSDIR}/java/javavmwrapper

USE_ZIP=	YES
WRKSRC=		${WRKDIR}/${PORTNAME}${PORTVERSION:S/.//g}
USE_JAVA=	YES
JAVA_VERSION=	1.4+
NO_BUILD=	YES

DATADIR=	${JAVASHAREDIR}/${PORTNAME}
DATAFILES=	characters data filepaths.ini lib outputsheets pcgen.jar plugins system
PLIST_FILES+=	bin/pcgen

SUB_FILES=	pcgen.sh

.if !defined(NOPORTDOCS)
PORTDOCS=	acknowledgments faqpages gmgen greetings.html images \
		index.html installationpages listfilepages menupages \
		navlistindex.html navtokenindex.html navtree navtree.html \
		outputsheetpages pcgen.css tabpages walkthroughpages
.endif

post-extract:
	@${FIND} ${WRKSRC} -name CVS | ${XARGS} -t ${RM} -rf

do-configure:
	@${ECHO_CMD} "pcgen.filepaths=user" > ${WRKSRC}/filepaths.ini

do-install:
	@${ECHO_MSG} -n ">> Installing in ${DATADIR}..."
	@cd ${WRKSRC} && ${FIND} ${DATAFILES} -type d -exec ${MKDIR} ${DATADIR}/{} ";"
	@cd ${WRKSRC} && ${FIND} ${DATAFILES} -type f -exec ${INSTALL_DATA} {} ${DATADIR}/{} ";"
	@${ECHO_MSG} " [ DONE ]"
	@${ECHO_MSG} -n ">> Installing launcher script as ${PREFIX}/bin/pcgen..."
	@${INSTALL_SCRIPT} ${WRKDIR}/pcgen.sh ${PREFIX}/bin/pcgen
	@${ECHO_MSG} " [ DONE ]"
.if !defined(NOPORTDOCS)
	@${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}..."
	@cd ${WRKSRC}/docs && ${FIND} ${PORTDOCS} -type d -exec ${MKDIR} ${DOCSDIR}/{} ";"
	@cd ${WRKSRC}/docs && ${FIND} ${PORTDOCS} -type f -exec ${INSTALL_DATA} {} ${DOCSDIR}/{} ";"
	@${ECHO_MSG} " [ DONE ]"
.endif

post-install:
	@${FIND} -s ${DATAFILES:S,^,${WRKSRC}/,} -not -type d 2>/dev/null | \
		${SED} -ne 's,^${WRKSRC},${DATADIR:S,^${PREFIX}/,,},p' >> ${TMPPLIST}
	@${FIND} -s -d ${DATAFILES:S,^,${WRKSRC}/,} -type d 2>/dev/null | \
		${SED} -ne 's,^${WRKSRC},@dirrm ${DATADIR:S,^${PREFIX}/,,},p' >> ${TMPPLIST}
	@${ECHO_CMD} '@dirrm ${DATADIR:S,^${PREFIX}/,,}' >> ${TMPPLIST}

.include <bsd.port.mk>
OpenPOWER on IntegriCloud