summaryrefslogtreecommitdiffstats
path: root/java/eclipse-pmd/Makefile
blob: e24178a3a84362e4b54c981472a316557372b4b2 (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
# Created by: Bruno Van Den Bossche <brvdboss@spymac.com>
# $FreeBSD$

PORTNAME=	pmd
PORTVERSION=	2.0.5.v3
PORTREVISION=	7
CATEGORIES=	java devel
MASTER_SITES=	SF/${PORTNAME}/OldFiles
PKGNAMEPREFIX=	eclipse-
DISTNAME=	pmd-eclipse3-site-2.0.5
DIST_SUBDIR=	eclipse

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Scan Java source code and look for potential problems

BROKEN=		plugin is obsolete or malfunctioning with latest eclipse
DEPRECATED=	evaluation recommendation is to remove rather than update
EXPIRATION_DATE=	2015-04-18

RUN_DEPENDS=	${LOCALBASE}/bin/eclipse:${PORTSDIR}/java/eclipse

USES=		zip
NO_BUILD=	yes
NO_WRKSUBDIR=	yes
USE_JAVA=	yes
JAVA_EXTRACT=	jre

CPIO?=		cpio --quiet -pdmu -R

PMDVERSION=	1.8.0.v3

PLUGIN_CORE_DIR="net.sourceforge.pmd.core_${PMDVERSION}"
PLUGIN_PMD_DIR=	"net.sourceforge.pmd.eclipse_${PORTVERSION}"

PLIST_SUB+=	PLUGIN_PMD_DIR="${PLUGIN_PMD_DIR}" \
		PLUGIN_CORE_DIR="${PLUGIN_CORE_DIR}"

post-extract:
		cd ${WRKDIR}/features && ${MKDIR} ${PLUGIN_PMD_DIR} \
		&& ${CP} ${PLUGIN_PMD_DIR}.jar ${PLUGIN_PMD_DIR} \
		&& cd ${PLUGIN_PMD_DIR} \
		&& ${JAR} xvf ${PLUGIN_PMD_DIR}.jar \
		&& ${RM} ${PLUGIN_PMD_DIR}.jar

		cd ${WRKDIR}/plugins && ${MKDIR} ${PLUGIN_PMD_DIR} \
		&& ${CP} ${PLUGIN_PMD_DIR}.jar ${PLUGIN_PMD_DIR} \
		&& cd ${PLUGIN_PMD_DIR} \
		&& ${JAR} xvf ${PLUGIN_PMD_DIR}.jar \
		&& ${RM} ${PLUGIN_PMD_DIR}.jar

		cd ${WRKDIR}/plugins && ${MKDIR} ${PLUGIN_CORE_DIR} \
		&& ${CP} ${PLUGIN_CORE_DIR}.jar ${PLUGIN_CORE_DIR} \
		&& cd ${PLUGIN_CORE_DIR} \
		&& ${JAR} xvf ${PLUGIN_CORE_DIR}.jar \
		&& ${RM} ${PLUGIN_CORE_DIR}.jar

do-install:
		@${MKDIR} ${STAGEDIR}${PREFIX}/lib/eclipse
		@${MKDIR} ${STAGEDIR}${PREFIX}/lib/eclipse/plugins
		@${MKDIR} ${STAGEDIR}${PREFIX}/lib/eclipse/plugins/${PLUGIN_PMD_DIR}
		@${MKDIR} ${STAGEDIR}${PREFIX}/lib/eclipse/plugins/${PLUGIN_CORE_DIR}
		@${MKDIR} ${STAGEDIR}${PREFIX}/lib/eclipse/features/${PLUGIN_PMD_DIR}
		cd ${WRKDIR}/features/${PLUGIN_PMD_DIR} && ${FIND} . \
		  | ${CPIO} ${SHAREOWN}:${SHAREGRP} \
		  ${STAGEDIR}${PREFIX}/lib/eclipse/features/${PLUGIN_PMD_DIR}
		cd ${WRKDIR}/plugins/${PLUGIN_PMD_DIR} && ${FIND} . \
		  | ${CPIO} ${SHAREOWN}:${SHAREGRP} \
		  ${STAGEDIR}${PREFIX}/lib/eclipse/plugins/${PLUGIN_PMD_DIR}
		cd ${WRKDIR}/plugins/${PLUGIN_CORE_DIR} && ${FIND} . \
		  | ${CPIO} ${SHAREOWN}:${SHAREGRP} \
		  ${STAGEDIR}${PREFIX}/lib/eclipse/plugins/${PLUGIN_CORE_DIR}

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