aboutsummaryrefslogtreecommitdiffstats
path: root/deskutils/freemind/Makefile
blob: ca59cf3a6fb0894628da04b8b55fbfadabc894f5 (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
# New ports collection makefile for:    freemind
# Date created: 22 september 2004
# Whom:     cartola (Carlos E. G. Carvalho)
#
# $FreeBSD$
#

PORTNAME=   freemind
PORTVERSION=    0.8.0
PORTEPOCH=  1
CATEGORIES= deskutils editors java
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= freemind
DISTNAME=   ${PORTNAME}-bin-max-${PORTVERSION:S/./_/g}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Free mind-mapping software written in Java

RUN_DEPENDS=    java:${PORTSDIR}/java/javavmwrapper

.if !exists(/usr/bin/unzip)
BUILD_DEPENDS+= unzip:${PORTSDIR}/archivers/unzip
.endif
.if !exists(/usr/bin/zip)
BUILD_DEPENDS+= zip:${PORTSDIR}/archivers/zip
.endif

USE_ZIP=    yes
USE_JAVA=   yes
JAVA_VERSION=   1.4+

DATADIR=    ${JAVASHAREDIR}/${PORTNAME}-${PORTVERSION}
DATAFILES=  accessories doc lib license patterns.xml plugins user.properties

EXTRACT_AFTER_ARGS= -d ${WRKSRC}
ZIP_CMD=    zip

SUB_FILES=  freemind.sh

do-build:
    (cd ${WRKSRC}; \
    ${UNZIP_CMD} lib/freemind.jar freemind.properties; \
    ${REINPLACE_CMD} -e '/^keystroke_node_increase_font_size/ s/PLUS/EQUALS/;/^keystroke_branch_increase_font_size/ s/PLUS/EQUALS/;s|./doc/freemind.mm|file:${DATADIR}/doc/freemind.mm|' freemind.properties; \
    ${ZIP_CMD} -u lib/freemind.jar freemind.properties)

do-install:
    cd ${WRKSRC} \
      && ${FIND} ${DATAFILES} -type d -exec ${MKDIR} ${DATADIR}/{} \; \
      && ${FIND} ${DATAFILES} -type f -exec ${INSTALL_DATA} {} ${DATADIR}/{} \;
    ${INSTALL_SCRIPT} ${WRKDIR}/freemind.sh ${PREFIX}/bin/freemind

.include <bsd.port.mk>