aboutsummaryrefslogtreecommitdiffstats
path: root/biology/boinc-simap/Makefile
blob: d86f0e17687136bd8ad2f5e3d20c8910e904ca79 (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
# Created by: Pav Lucistnik <pav@FreeBSD.org>
# $FreeBSD$
#

PORTNAME=   boinc-simap
PORTVERSION=    ${SIMAP_VERSION}.${HMMER_VERSION}
PORTREVISION=   5
CATEGORIES= biology
MASTER_SITES=   http://boincsimap.org/boincsimap/download/
DISTNAME=   ${SIMAP_BINARY} ${HMMER_BINARY}
EXTRACT_SUFX=   #

MAINTAINER= rene@FreeBSD.org
COMMENT=    Similarity Matrix of Proteins project for BOINC

RUN_DEPENDS=    boinc_client:${PORTSDIR}/net/boinc-client

NO_BUILD=   yes
NO_WRKSUBDIR=   yes
STRIP=      #

# these must match settings in ${PORTSDIR}/net/boinc-client/Makefile
BOINC_CLIENT_USER?= boinc
BOINC_CLIENT_GROUP?=    nobody
BOINC_CLIENT_HOME?= /var/db/boinc

SIMAP_SITE= boincsimap.org_boincsimap
SIMAP_BINARY=   simap_${SIMAP_VERSION}_${MACH}-pc-freebsd
SIMAP_VERSION=  5.10
HMMER_BINARY=   hmmer_${HMMER_VERSION}_${MACH}-pc-freebsd
HMMER_VERSION=  5.09

PLIST_SUB=  SIMAP_BINARY=${SIMAP_BINARY} HMMER_BINARY=${HMMER_BINARY} SIMAP_SITE=${SIMAP_SITE} \
        BOINC_CLIENT_HOME=${BOINC_CLIENT_HOME}

ONLY_FOR_ARCHS= i386 amd64

OPTIONS_DEFINE= SSE

.include <bsd.port.pre.mk>

.if ${PORT_OPTIONS:MSSE}
MACH=       i686
.else
MACH=       i386
.endif

.if ${ARCH} == amd64
AMD64=      ""
.if ${OSVERSION} < 800000
AMD64_BEFORE_8000000=       ""
AMD64_AFTER_8000000=        "@comment "
.else
AMD64_BEFORE_8000000=       "@comment "
AMD64_AFTER_8000000=        ""
.endif
.else
AMD64=      "@comment "
AMD64_BEFORE_8000000=       "@comment "
AMD64_AFTER_8000000=        "@comment "
.endif

SUB_FILES=  app_info.xml pkg-message
SUB_LIST=   SIMAP_BINARY=${SIMAP_BINARY} HMMER_BINARY=${HMMER_BINARY} SIMAP_APPVERSION=${SIMAP_VERSION:S/.//} HMMER_APPVERSION=${HMMER_VERSION:S/.//} AMD64=${AMD64} AMD64_BEFORE_8000000=${AMD64_BEFORE_8000000} AMD64_AFTER_8000000=${AMD64_AFTER_8000000}

.if ${OSVERSION} >= 700043
LIB_DEPENDS+=   c.6:${PORTSDIR}/misc/compat6x
.endif

do-extract:
    @${MKDIR} ${WRKDIR}
    @${CP} ${DISTDIR}/${SIMAP_BINARY} ${WRKDIR}
    @(cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${HMMER_BINARY} ${EXTRACT_AFTER_ARGS})

do-install:
    ${INSTALL} -d -o ${BOINC_CLIENT_USER} -g ${BOINC_CLIENT_GROUP} ${BOINC_CLIENT_HOME}/projects
    ${INSTALL} -d -o ${BOINC_CLIENT_USER} -g ${BOINC_CLIENT_GROUP} ${BOINC_CLIENT_HOME}/projects/${SIMAP_SITE}
    ${INSTALL_DATA} -o ${BOINC_CLIENT_USER} -g ${BOINC_CLIENT_GROUP} ${WRKDIR}/app_info.xml ${BOINC_CLIENT_HOME}/projects/${SIMAP_SITE}
.for APP in ${DISTNAME}
    ${INSTALL_PROGRAM} -o ${BOINC_CLIENT_USER} -g ${BOINC_CLIENT_GROUP} ${WRKDIR}/${APP} ${BOINC_CLIENT_HOME}/projects/${SIMAP_SITE}
.endfor

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

.include <bsd.port.post.mk>