aboutsummaryrefslogtreecommitdiffstats
path: root/math/plman/Makefile
blob: b9e2735c10f29651d1913cdc829f9096875cea72 (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
# Created by: Nicola Vitale <nivit@email.it>
# $FreeBSD$

PORTNAME=   plman
PORTVERSION=    2.5.1
PORTREVISION=   2
CATEGORIES= math java
MASTER_SITES=   http://${PORTNAME}.sourceforge.net/dist/ \
        http://nivi.interfree.it/distfiles/${PORTNAME}.sourceforge.net/
DISTNAME=   ${PORTNAME}${PORTVERSION:C/\./_/g}

MAINTAINER= nivit@FreeBSD.org
COMMENT=    Propositional Logic sentence shell/interpreter

NO_BUILD=   yes

USES=       zip
USE_JAVA=   yes

JAVA_VERSION=   1.6+
DATADIR=    ${JAVASHAREDIR}/${PORTNAME}
REPLACE_FILES=  ${WRKSRC}/bin/${PORTNAME}
WRKSRC= ${WRKDIR}/${PORTNAME}

FIND_DATA=  lib
FIND_DOCS=  docs

OPTIONS_DEFINE= DOCS

post-patch:
    for FILE in ${REPLACE_FILES}; do \
        ${REINPLACE_CMD} -e "/%%DATADIR%%/s//${DATADIR:S/\//\\\//g}/g" $${FILE} ;\
    done;

do-install:
    ${INSTALL_SCRIPT} ${WRKSRC}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
    ${MKDIR} ${STAGEDIR}${DATADIR}/${FIND_DATA}
    cd ${WRKSRC} && ${FIND} ${FIND_DATA} -type f -exec ${INSTALL_DATA} {} ${STAGEDIR}${DATADIR}/{} \;
    ${MKDIR} ${STAGEDIR}${DOCSDIR}
    cd ${WRKSRC}/${FIND_DOCS} && ${FIND} . -type f -exec ${INSTALL_DATA} {} ${STAGEDIR}${DOCSDIR}/{} \;

.include <bsd.port.mk>