# Created by: Ju Pengfei <jupengfei@gmail.com>
# $FreeBSD: tags/RELEASE_10_1_0/chinese/fortune/Makefile 356156 2014-06-01 16:43:03Z ohauer $

PORTNAME=	fortune
PORTVERSION=	1.2.2
PORTREVISION=	2
CATEGORIES=	chinese
MASTER_SITES=	GOOGLE_CODE
DISTNAME=	fortune-mod-zh-${PORTVERSION}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Classic fortune file in Chinese

RUN_DEPENDS=	autob5:${PORTSDIR}/chinese/autoconvert

PROJECTHOST=	chinese-fortune
NO_BUILD=	yes
USES=		tar:bzip2 gmake
SUB_FILES=	pkg-message

.if !exists(/usr/games/fortune) || !exists(/usr/games/strfile)
IGNORE=		needs the FreeBSD games distribution
.endif

post-patch:
	@${REINPLACE_CMD} -e "s|/usr/|${PREFIX}/|" \
		-e "s|strfile|/usr/games/strfile|" \
		${WRKSRC}/src/Makefile

.include <bsd.port.mk>
