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

# TransDecoder.LongOrfs suggests doing Pfam or BlastP searches?
# p5-URI-ESC?
# FIXME: Check use statements in all perl scripts for more deps

DISTNAME=	p5-transdecoder-${PORTVERSION}
CATEGORIES=	biology
MASTER_SITES=	${MASTER_SITE_GITHUB:=TransDecoder/}
GITHUB_PROJECT=	TransDecoder
GITHUB_TAG=	${PORTVERSION}

MAINTAINER=	bacon4000@gmail.com
HOMEPAGE=	http://transdecoder.github.io/
COMMENT=	Identify candidate coding regions within transcript sequences
LICENSE=	modified-bsd

SUBST_CLASSES+=		path
SUBST_STAGE.path=	post-patch
SUBST_SED.path+=	-e 's|$$FindBin::RealBin/PerlLib|${PREFIX}/lib/TransDecoder/PerlLib|g'
SUBST_SED.path+=	-e 's|$$FindBin::Bin/../PerlLib|${PREFIX}/lib/TransDecoder/PerlLib|g'
SUBST_SED.path+=	-e 's|$$FindBin::RealBin/util|${PREFIX}/libexec/TransDecoder/util|g'
SUBST_FILES.path+=	${WRKSRC}/TransDecoder*
SUBST_FILES.path+=	${WRKSRC}/util/*.pl

DEPENDS=	cdhit>=4.6.1:../../biology/cdhit \
		p5-URI>=0:../../www/p5-URI

USE_TOOLS=	perl
REPLACE_BASH=	sample_data/runMe.sh util/pfam_mpi.pbs
REPLACE_PERL=	util/*.pl sample_data/*.pl PerlLib/*.pm \
		TransDecoder.LongOrfs TransDecoder.Predict
NO_BUILD=	yes

PORTVERSION=	2.0.1

INSTALLATION_DIRS=	bin lib/TransDecoder/PerlLib libexec/TransDecoder/util

do-install:
	${INSTALL_SCRIPT} ${WRKSRC}/PerlLib/* \
		${DESTDIR}${PREFIX}/lib/TransDecoder/PerlLib
	${INSTALL_SCRIPT} ${WRKSRC}/TransDecoder* ${DESTDIR}${PREFIX}/bin
	${INSTALL_SCRIPT} ${WRKSRC}/util/*.pl \
		${DESTDIR}${PREFIX}/libexec/TransDecoder/util

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