summaryrefslogtreecommitdiff
path: root/biology/nab/Makefile
blob: 698943ce5c4682e2141adce4ea6bf6383c33d568 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# New ports collection Makefile for: nab
# Date created:         Sept. 10, 2000
# Whom:                 M. L. Dodson <bdodson@scms.utmb.edu>
#
# $FreeBSD$
#

PORTNAME=	nab
PORTVERSION=	4.5.2
CATEGORIES=	biology
MASTER_SITES=	ftp://ftp.scripps.edu/pub/case/ \
		http://www.scripps.edu/case/ \
		http://siegfried.utmb.edu/bdodson/

MAINTAINER=	bdodson@scms.utmb.edu
COMMENT=	\
 "This is nab (nucleic acid builder), a language for macromolecules"

BUILD_DEPENDS=	ucpp:${PORTSDIR}/devel/ucpp

ONLY_FOR_ARCHS= i386

MAKE_ENV+=	NABHOME=${WRKSRC} ARCH= PATH=${WRKSRC}/bin:${PATH}

MAN1=		nab.1
MANCOMPRESSED=	yes
USE_REINPLACE=	yes

BINARIES=	matextract      matmul          teLeap          tss_main \
		matgen          nab             transform       tss_next \
		matmerge        nab2c           tss_init

LIBRARIES=	cifparse.a      libnab.a        libsym.a

INCS=	defreal.h       nab.h           nabcode.h       nabtypes.h

post-extract:
	@${CP} ${FILESDIR}/config.h ${WRKSRC}

pre-patch:
	@${REINPLACE_CMD} -e 's,<malloc.h>,<stdlib.h>,' \
		${WRKSRC}/cifparse/cifparse.c

post-patch:
	@${RM} -f ${WRKSRC}/examples/program_7.nab.orig
	@${RM} -f ${WRKSRC}/examples/program_1.c \
		${WRKSRC}/examples/program_1.exe
	@${RM} -f ${WRKSRC}/test/1ubq/a.exe
	@${RM} -f ${WRKSRC}/test/1ubq/rattle_min.c
	@${RM} -f ${WRKSRC}/test/1ubq/runleap.c
	@${RM} -f ${WRKSRC}/test/*.exe
	@${RM} -f ${WRKSRC}/tleap/utilMakeHelp.exe
	@${RM} -f ${WRKSRC}/fd_data/abdna.dat.old
	@${RM} -f ${WRKSRC}/reslib/leap/parm94.dat~
	@(cd ${WRKSRC}/reslib/leap && \
		${FIND} . -type f -print | ${GREP} -v '\./[a-zA-Z0-9]' | \
			${XARGS} ${RM} -f)

pre-install:
	@cd ${WRKSRC}/src && \
		${SETENV} PREFIX=${PREFIX} ${MAKE} beforerealinstall

do-install:
	@-${MKDIR} ${PREFIX}/share/nab
	@-${MKDIR} ${PREFIX}/share/nab/bin
	@-${MKDIR} ${PREFIX}/share/nab/include
	@-${MKDIR} ${PREFIX}/share/nab/lib
.if !defined(NOPORTDOCS)
	@cd ${WRKSRC} && (${TAR} cf - examples test peptide suppose | \
		(cd ${PREFIX}/share/nab; ${TAR} xf -))
	@-${MKDIR} ${PREFIX}/share/doc/nab
	${INSTALL_MAN} ${WRKSRC}/doc/NAB.pdf ${PREFIX}/share/doc/nab
.endif
	@cd ${WRKSRC} && (${TAR} cf - dgdb reslib fd_data | \
		(cd ${PREFIX}/share/nab; ${TAR} xf -))
	@(cd ${PREFIX}/share; ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} nab; \
		${CHMOD} -R ugo+rX-w nab)
	@-(cd ${PREFIX}/share/nab && ${LN} -sf ../NDB coords)
	${INSTALL_PROGRAM} ${WRKSRC}/bin/*     ${PREFIX}/bin
	${INSTALL_DATA}    ${WRKSRC}/include/* ${PREFIX}/include
	${INSTALL_DATA} ${WRKSRC}/lib/*     ${PREFIX}/lib
	@-cd ${WRKSRC}/doc && ${GZIP_CMD} ${MAN1}
	${INSTALL_MAN} ${WRKSRC}/doc/nab.1.gz ${PREFIX}/man/man1
.for f in ${BINARIES}
	@cd ${PREFIX}/share/nab/bin && ${LN} -sf ../../../bin/${f} .
.endfor
.for f in ${LIBRARIES}
	@cd ${PREFIX}/share/nab/lib && ${LN} -sf ../../../lib/${f} .
.endfor
.for f in ${INCS}
	@cd ${PREFIX}/share/nab/include && ${LN} -sf ../../../include/${f} .
.endfor

post-install:
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>