# $NetBSD$
#
###########################################################
#               Generated by fbsd2pkg                     #
###########################################################

DISTNAME=	ddocent-${PORTVERSION}
CATEGORIES=	biology
MASTER_SITES=	http://acadix.biz/Ports/distfiles/
EXTRACT_SUFX=	.tar.xz
PKGNAME=	ddocent-${PORTVERSION}

MAINTAINER=	dsiercks@uwm.edu
HOMEPAGE=	http://ddocent.wordpress.com/
COMMENT=	Bash pipeline for ddRAD sequencing
LICENSE=	mit

NO_BUILD=	yes

REPLACE_BASH=	scripts/*.sh scripts/dDocent_filters
REPLACE_PERL=	scripts/*.pl

PORTVERSION=	2015.11.30

# This subst is applied on top of patch-dDocent
# Do not apply it within the source dist, or it will get picked up
# next time the patch is generated with pkg-diff or mkpatches
SUBST_CLASSES+=		prefix
SUBST_STAGE.prefix=	post-install
SUBST_FILES.prefix=	${DESTDIR}${PREFIX}/bin/dDocent
SUBST_SED.prefix=	-e 's|%%PREFIX%%|${PREFIX}|g'

DEPENDS+=	gnuplot>=3.7:../../graphics/gnuplot \
		cdhit>=4.6:../../biology/cdhit \
		parallel>=0:../../wip/parallel \
		gawk>=0:../../lang/gawk \
		vcftools>=0.1.11:../../wip/vcftools \
		stacks>=0:../../wip/stacks \
		Trimmomatic:../../wip/trimmomatic \
		seqtk>=0:../../wip/seqtk \
		bedtools2>=2.23.0:../../wip/bedtools2 \
		pear-merger>=0:../../wip/pear \
		mawk>=0:../../lang/mawk

INSTALLATION_DIRS=	bin

do-install:
	${INSTALL_SCRIPT} \
		${WRKSRC}/dDocent \
		${WRKSRC}/scripts/* ${DESTDIR}${PREFIX}/bin

.include "../../wip/bamtools/buildlink3.mk"
.include "../../wip/freebayes/buildlink3.mk"
.include "../../wip/samtools0119/buildlink3.mk"
.include "../../wip/vcflib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
