aboutsummaryrefslogtreecommitdiffstats
path: root/science/devisor/Makefile
blob: 8a73944e1aae61373b3e11d0e3c0a33c5328b97d (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
# Created by: Pedro F. Giffuni
# $FreeBSD$

PORTNAME=   devisor
PORTVERSION=    2.1
PORTREVISION=   2
CATEGORIES= science java
MASTER_SITES=   http://www.featflow.de/download/
DISTNAME=   devisor${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Design and Visualization Software Resource for FeatFlow

USE_JAVA=   yes
JAVA_VERSION=   1.6+
NO_BUILD=   yes # Sources are available though

SUB_FILES=  devisorgrid.sh

DATADIR=    ${JAVASHAREDIR}/${PORTNAME}

DATAFILES=  data images misc manual
CLASSFILES= devisor2 devisorgrid.class

PORTDOCS=   *
PLIST_FILES=    bin/devisorgrid

OPTIONS_DEFINE= DOCS

.include <bsd.port.options.mk>

do-install:
    ${INSTALL_SCRIPT} ${WRKDIR}/devisorgrid.sh ${PREFIX}/bin/devisorgrid
    cd ${WRKSRC} \
      && ${FIND} ${DATAFILES} -type d -exec ${MKDIR} ${DATADIR}/{} \; \
      && ${FIND} ${DATAFILES} -type f -not -name '*.pdf' -print -exec ${INSTALL_DATA} {} ${DATADIR}/{} \;
    cd ${WRKSRC} \
      && ${FIND} ${CLASSFILES} -type d -exec ${MKDIR} ${DATADIR}/{} \; \
      && ${FIND} ${CLASSFILES} -name '*.class' -type f -print -exec ${INSTALL_DATA} {} ${DATADIR}/{} \;
.if ${PORT_OPTIONS:MDOCS}
    cd ${WRKSRC}/manual \
      && ${FIND} . -type d -exec ${MKDIR} ${DOCSDIR}/{} \; \
      && ${FIND} . -type f -name '*.pdf' -exec ${INSTALL_DATA} {} ${DOCSDIR}/{} \;
.endif

post-install:
    @cd ${WRKSRC} \
      && ${FIND} -s ${DATAFILES} -type f -not -name '*.pdf' \
        | ${SED} -ne 's,^,${DATADIR:S,${PREFIX}/,,}/,p' >> ${TMPPLIST} \
      && ${FIND} -s -d ${DATAFILES} -type d \
        | ${SED} -ne 's,^,@dirrm ${DATADIR:S,${PREFIX}/,,}/,p' >> ${TMPPLIST}
    @cd ${WRKSRC} \
      && ${FIND} -s ${CLASSFILES} -name '*.class' -type f \
        | ${SED} -ne 's,^,${DATADIR:S,${PREFIX}/,,}/,p' >> ${TMPPLIST} \
      && ${FIND} -s -d ${CLASSFILES} -type d \
        | ${SED} -ne 's,^,@dirrm ${DATADIR:S,${PREFIX}/,,}/,p' >> ${TMPPLIST}
    @${ECHO_CMD} '@dirrm ${DATADIR:S,${PREFIX}/,,}' >> ${TMPPLIST}

.include <bsd.port.mk>