summaryrefslogtreecommitdiff
path: root/games/ufoai-data/Makefile
blob: 96403a3707fa363ce0cf1df6e0bb3104b09ff2de (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
# Created by: Alonso Cardenas Marquez <acm@FreeBSD.org>
# $FreeBSD$

PORTNAME=	data
PORTVERSION=	2.5
CATEGORIES=	games
MASTER_SITES=	SF/ufoai/UFO_AI%202.x/${PORTVERSION}
PKGNAMEPREFIX=	ufoai-
DISTNAME=	${PKGNAMEPREFIX}${PORTVERSION}-${PORTNAME}
EXTRACT_SUFX=	.tar
DIST_SUBDIR=	${PKGNAMEPREFIX:S/-//}

MAINTAINER=	m.tsatsenko@gmail.com
COMMENT=	UFO alien invasion data files

# See http://ufoai.org/wiki/License
LICENSE=	GPLv2 CC-BY-SA-3.0
LICENSE_COMB=	multi

EXTRACT_DEPENDS=	${UNZIP_CMD}:archivers/unzip

NO_BUILD=	yes
NO_WRKSUBDIR=	yes
NO_ARCH=	yes

DATADIR=	share/${PKGNAMEPREFIX:S/-//}
PLIST=		${WRKDIR}/pkg-plist

post-extract:
	@cd ${WRKSRC}/base && \
		${FIND} * -type f -exec ${UNZIP_CMD} "{}" -d ${WRKSRC}/base \;
	@${RM} ${WRKSRC}/base/*.pk3

pre-install:
	@${RM} -f ${PLIST}
	@cd ${WRKSRC}/base && \
		${FIND} * -type f | ${SORT} | ${SED} -e 's|^|%%DATADIR%%/base/|' >> ${PLIST}

do-install:
	cd ${WRKSRC}/base && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/${DATADIR}/base

.include <bsd.port.mk>