Update games/hexalate to version 1.1.6
[dports.git] / games / fairymax / Makefile
1 # Created by: Kalten <kalten@gmx.at>
2 # $FreeBSD$
3
4 PORTNAME=       fairymax
5 PORTVERSION=    5.0b.20160316.1
6 PORTREVISION=   1
7 CATEGORIES=     games
8 MASTER_SITES=   http://freeheimdall.spdns.org/files/
9 # http://hgm.nubati.net/cgi-bin/gitweb.cgi?p=fairymax.git;a=snapshot;h=${COMMIT_HASH};sf=tgz
10 # http://hgm.nubati.net/cgi-bin/gitweb.cgi/fairymax.git/snapshot/${COMMIT_HASH}
11 # but sha256 changes, as creation date of *.tar inside *.tar.gz changes.
12 DISTNAME=       ${PORTNAME}-${COMMIT_HASH}
13
14 MAINTAINER=     kalten@gmx.at
15 COMMENT=        Chess engine for shatranj, courier chess, and others
16
17 COMMIT_HASH=    67cee03
18
19 OPTIONS_DEFINE= DOCS
20
21 PORTDOCS=       changelog copyright CVfairy.html README
22
23 USES=           gmake perl5
24 USE_PERL5=      build
25 MAKE_ARGS+=     prefix= \
26                 bindir=${PREFIX}/bin \
27                 mandir=${PREFIX}/man \
28                 datadir= \
29                 plugindir=${PREFIX}/share/games/plugins \
30                 fairydir=${DATADIR} \
31                 VERSION=${PORTVERSION}
32
33 post-patch:
34         @${REINPLACE_CMD} -E 's|(#define VERSION ")[^"]+(".*)|\1${PORTVERSION}\2|' \
35                 ${WRKSRC}/fairymax.c
36         @${REINPLACE_CMD} -E 's|^(prefix\|bindir\|mandir\|datadir\|plugindir\|fairydir) =|\1 ?=|' \
37                 ${WRKSRC}/Makefile
38         @${REINPLACE_CMD} -E 's|^       cp (.\{srcdir\}/fairymax .\{srcdir\}/shamax .\{srcdir\}/maxqi .\(DESTDIR\).\(bindir\))| ${INSTALL_PROGRAM} \1|' \
39                 ${WRKSRC}/Makefile
40         @${REINPLACE_CMD} -E 's|^       cp (.\{srcdir\}/data/)| ${INSTALL_DATA} \1|' \
41                 ${WRKSRC}/Makefile
42         @${REINPLACE_CMD} -E 's|^       cp (.\{srcdir\}/fairymax.6.gz)| ${INSTALL_MAN} \1|' \
43                 ${WRKSRC}/Makefile
44
45 post-install-DOCS-on:
46         @${MKDIR} ${STAGEDIR}${DOCSDIR}
47         ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
48
49 .include <bsd.port.mk>