summaryrefslogtreecommitdiffstats
path: root/net/dimes/Makefile
blob: b2f5913f706329c6d3f2b8903bcde03efa18b7e9 (plain)
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
98
99
100
101
102
103
# Created by: stast
# $FreeBSD$

PORTNAME=	dimes
PORTVERSION=	0.5.2
CATEGORIES=	net java
MASTER_SITES=	http://www.netdimes.org/PublicData/downloads/ \
		http://www.stasyan.com/devel/distfiles/
DISTNAME=	Dimes_Agent_052_Linux

MAINTAINER=	devel@stasyan.com
COMMENT=	Distributed research project for measurement topology of the Internet

NO_PACKAGE=	There is the string in properties.xml which system-depends

WRKSRC=		${WRKDIR}/DIMES
BUILD_WRKSRC=	${WRKSRC}/scripts_linux

USE_JAVA=	yes
JAVA_VERSION=	1.6+
#java-linux required
JAVA_OS=	linux
DATADIR=	${JAVASHAREDIR}/dimes

post-extract:
	${REINPLACE_CMD} 's|$$CURRENT_DIR/..|${DATADIR}/|g' ${WRKSRC}/scripts_linux/agent.sh
	${REINPLACE_CMD} 's|#. colors.sh|JAVA_HOME=${JAVA_HOME}|g' ${WRKSRC}/scripts_linux/agent.sh
	${REINPLACE_CMD} 's|./bash|/bin/sh|g' ${WRKSRC}/scripts_linux/Makefile
	${REINPLACE_CMD} 's|/opt/DIMES|${DATADIR}|g' ${WRKSRC}/Classes/Base/conf/properties.xml

do-install:
	@${MKDIR} ${STAGEDIR}${DATADIR}
	@${MKDIR} ${STAGEDIR}${DATADIR}/scripts_linux
	@${MKDIR} ${STAGEDIR}${DATADIR}/Classes
	@${MKDIR} ${STAGEDIR}${DATADIR}/Classes/Base
	@${MKDIR} ${STAGEDIR}${DATADIR}/Classes/Base/dimes
	@${MKDIR} ${STAGEDIR}${DATADIR}/Classes/Base/dimes/service
	@${MKDIR} ${STAGEDIR}${DATADIR}/Classes/dimes
	@${MKDIR} ${STAGEDIR}${DATADIR}/Classes/dimes/service
	@${MKDIR} -m 0777 ${STAGEDIR}${DATADIR}/Classes/Base/History
	@${MKDIR} -m 0777 ${STAGEDIR}${DATADIR}/Classes/Base/Incoming
	@${MKDIR} -m 0777 ${STAGEDIR}${DATADIR}/Classes/Base/Incoming/Keepalive
	@${MKDIR} -m 0777 ${STAGEDIR}${DATADIR}/Classes/Base/Outgoing
	@${MKDIR} -m 0777 ${STAGEDIR}${DATADIR}/Classes/Base/Outgoing/log
	@${MKDIR} -m 0777 ${STAGEDIR}${DATADIR}/Classes/Base/Outgoing/results
	@${MKDIR} ${STAGEDIR}${DATADIR}/Classes/Base/conf
	@${MKDIR} ${STAGEDIR}${DATADIR}/Classes/Base/bin_linux
	@${MKDIR} ${STAGEDIR}${DATADIR}/Classes/Base/resources
	@${MKDIR} ${STAGEDIR}${DATADIR}/Classes/Base
	@${MKDIR} ${STAGEDIR}${DATADIR}/Classes/Base
	@${MKDIR} ${STAGEDIR}${DATADIR}/Classes/JARs
	@${MKDIR} ${STAGEDIR}${DATADIR}/Licences
	${INSTALL_DATA} ${WRKSRC}/Classes/'AgentLauncher$$1.class' \
	  ${STAGEDIR}${DATADIR}/Classes/'AgentLauncher$$1.class'
	${INSTALL_DATA} ${WRKSRC}/Classes/'AgentLauncher$$2.class' \
	  ${STAGEDIR}${DATADIR}/Classes/'AgentLauncher$$2.class'
	${INSTALL_DATA} ${WRKSRC}/Classes/AgentLauncher.class \
	  ${STAGEDIR}${DATADIR}/Classes/AgentLauncher.class
	${INSTALL_DATA} ${WRKSRC}/Classes/Start.class \
	  ${STAGEDIR}${DATADIR}/Classes/Start.class
	cd ${WRKSRC}/Classes/ && \
	  ${FIND} . -type f -and \( -name "*.jpg" -or -name "*.gif" \
	    -or -name "*.dll" -or -name "*.ico" \
	    -or -name "*.zip"  -or -name "*.GIF" -or -name "*.txt" \
	    -or -name "*.properties" \) \
	    -exec ${INSTALL_DATA} {} ${STAGEDIR}${DATADIR}/Classes/{} \;
	cd ${WRKSRC}/Classes/Base/bin_linux && \
	  ${FIND} . -type f  -exec ${INSTALL_DATA} -m 0555 {} ${STAGEDIR}${DATADIR}/Classes/Base/bin_linux/{} \;
	cd ${WRKSRC}/Classes/Base/resources/ && \
	  ${FIND} . -type f -and \( -name "*.jar" -or -name "*.txt" \
	    -or -name "*.keystore" \) \
	    -exec ${INSTALL_DATA} {} ${STAGEDIR}${DATADIR}/Classes/Base/resources/{} \;
	${INSTALL_DATA} -m 0666 ${WRKSRC}/Classes/Base/resources/layouts.bin \
	  ${STAGEDIR}${DATADIR}/Classes/Base/resources/layouts.bin
	${INSTALL_DATA} -m 0666 ${WRKSRC}/Classes/Base/resources/layouts.meta \
	  ${STAGEDIR}${DATADIR}/Classes/Base/resources/layouts.meta
	${INSTALL_DATA} -m 0666 ${WRKSRC}/Classes/Base/resources/default.in \
	  ${STAGEDIR}${DATADIR}/Classes/Base/resources/default.in
	${INSTALL_DATA} -m 0666 ${WRKSRC}/Classes/Base/resources/dimespacket.sys \
	  ${STAGEDIR}${DATADIR}/Classes/Base/resources/dimespacket.sys
	${INSTALL_DATA} -m 0666 ${WRKSRC}/Classes/Base/resources/libcallmtr.so \
	  ${STAGEDIR}${DATADIR}/Classes/Base/resources/libcallmtr.so
	${INSTALL_DATA} -m 0666 ${WRKSRC}/Classes/dimes/service/Stop.class \
	  ${STAGEDIR}${DATADIR}/Classes/dimes/service/Stop.class
	${INSTALL_DATA} -m 0666 ${WRKSRC}/Classes/Base/conf/properties.xml \
	  ${STAGEDIR}${DATADIR}/Classes/Base/conf/properties.xml
	${INSTALL_DATA} -m 0666 ${WRKSRC}/Classes/Base/conf/wrapper.conf \
	  ${STAGEDIR}${DATADIR}/Classes/Base/conf/wrapper.conf
	${INSTALL_DATA} ${WRKSRC}/Classes/JARs/10.jar \
	  ${STAGEDIR}${DATADIR}/Classes/JARs/10.jar
	${INSTALL_DATA} ${WRKSRC}/Classes/JARs/dimesAgent.keystore \
	  ${STAGEDIR}${DATADIR}/Classes/JARs/dimesAgent.keystore
	cd ${WRKSRC}/Licences/ &&  ${FIND} . -type f -name "*.txt" \
	  -exec ${INSTALL_MAN} {} ${STAGEDIR}${DATADIR}/Licences/{} \;
	${INSTALL_SCRIPT} ${WRKSRC}/scripts_linux/agent.sh ${STAGEDIR}${DATADIR}/scripts_linux/agent.sh
	${INSTALL_SCRIPT} ${WRKSRC}/scripts_linux/colors.sh ${STAGEDIR}${DATADIR}/scripts_linux/colors.sh
	${INSTALL_DATA} ${WRKSRC}/scripts_linux/Makefile ${STAGEDIR}${DATADIR}/scripts_linux/Makefile
	${INSTALL_SCRIPT} ${WRKSRC}/linuxAgent.sh ${STAGEDIR}${DATADIR}/linuxAgent.sh
	${INSTALL_SCRIPT} ${WRKSRC}/linuxService.sh ${STAGEDIR}${DATADIR}/linuxService.sh
	${INSTALL_SCRIPT} ${WRKSRC}/linuxServiceStatus.sh ${STAGEDIR}${DATADIR}/linuxServiceStatus.sh
	${INSTALL_SCRIPT} ${WRKSRC}/linuxStopService.sh ${STAGEDIR}${DATADIR}/linuxStopService.sh

.include <bsd.port.mk>
OpenPOWER on IntegriCloud