[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / games / knightcap-brain

File: [cvs.NetBSD.org] / pkgsrc / games / knightcap-brain / Makefile (download)

Revision 1.19, Sun Jan 14 15:26:47 2018 UTC (6 years, 1 month ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4, pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1
Changes since 1.18: +8 -8 lines

pkgsrc doesn't support PREFIX with spaces or other special characters.
Therefore it is not necessary to add the :Q modifier to this variable
and several others.

pkglint -r -Wall --autofix --only :Q

# $NetBSD: Makefile,v 1.19 2018/01/14 15:26:47 rillig Exp $

DISTNAME=		new_brain
PKGNAME=		knightcap-brain-19980616
MASTER_SITES=		ftp://ftp.samba.org/pub/KnightCap/

MAINTAINER=		pkgsrc-users@NetBSD.org
HOMEPAGE=		http://samba.org/KnightCap/
COMMENT=		Book of losing moves for KnightCap


EXTRACT_ONLY=		# empty

# The prefab brain file is not especially portable (see the top of
# brain.c in knightcap; the file is a binary array of brain_entry) and
# while most of it is adequate but not ideal and should be portable
# among platforms of the same endianness (even ILP32 vs. LP64 ones),
# it unfortunately contains two fields of type time_t. We think the
# posted brain file is from 32-bit x86, probably Linux, so it will
# work on little-endian machines where time_t is still 32 bit. This
# excludes at least NetBSD 6.0 and up, and at least some of the 64-bit
# Linux ports, but I don't know for sure which ones. So begin by
# allowing little-endian platforms and then excluding ones known not
# to work. Add more as needed; a brain file with mismatched time_t
# won't load. Note that while the existing brain file could easily be
# translated, if anyone feels like doing that they should probably
# translate the posted one to a portable format (e.g. compressed JSON
# or something, or just plain text) and provide a loader for that
# format upstream.

.include "../../mk/bsd.prefs.mk"
NOT_FOR_PLATFORM=	NetBSD-[6-9].*-* NetBSD-1[1-9].*-*
NOT_FOR_PLATFORM+=	Linux-*-alpha

EGDIR=			${PREFIX}/share/examples/knightcap

	${SED} -e "s,@PREFIX@,${PREFIX},g" < ${FILESDIR}/newbrain.sh \
		> ${WRKSRC}/newbrain.sh

	${INSTALL_SCRIPT} ${WRKSRC}/newbrain.sh \
	${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/new_brain.dat \

.include "../../mk/bsd.pkg.mk"