# $MidnightBSD: mports/textproc/agrep/Makefile,v 1.3 2013/03/31 15:53:48 laffer1 Exp $

PORTNAME=	agrep
PORTVERSION=	2.04
PORTREVISION=	2
CATEGORIES=	textproc
MASTER_SITES=	ftp://ftp.cs.arizona.edu/agrep/
EXTRACT_SUFX=	.tar.Z
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} agrep.ps.1.Z agrep.ps.2.Z
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}

MAINTAINER=	ports@MidnightBSD.org
COMMENT=	Approximate grep (fast approximate pattern-matching tool)
LICENSE=	restricted

ALL_TARGET=
MAKE_ARGS=	CFLAGS="${CFLAGS}"
MAN1=		agrep.1
PORTDOCS=	COPYRIGHT agrep.algorithms agrep.ps.1.Z agrep.ps.2.Z

post-extract:
	${CP} ${DISTDIR}/agrep.ps.1.Z ${DISTDIR}/agrep.ps.2.Z ${WRKSRC}/

do-install:
	@${INSTALL_PROGRAM} ${WRKSRC}/agrep ${PREFIX}/bin/
	@${INSTALL_MAN} ${WRKSRC}/agrep.1 ${PREFIX}/man/man1/
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
	@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}/
.endif

.include <bsd.port.mk>
