summaryrefslogtreecommitdiffstats
path: root/devel/geoip-java/Makefile
blob: 4be1760cac7f6cba0d4fd17a2eba3573491d9d67 (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
# $FreeBSD$

PORTNAME=	geoip
PORTVERSION=	1.2.8
CATEGORIES=	devel java
MASTER_SITES=	http://www.maxmind.com/download/geoip/api/java/
DISTNAME=	GeoIPJava-${PORTVERSION}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Java bindings for GeoIP API

LICENSE=	LGPL21

RUN_DEPENDS=	GeoIP>=1.4.8:${PORTSDIR}/net/GeoIP

PKGNAMESUFFIX:=	-java
USE_ZIP=	YES

USE_JAVA=	YES
JAVA_VERSION=	1.6+
USE_ANT=	YES
ALL_TARGET=	jar

PLIST_FILES=	%%JAVAJARDIR%%/maxmind-geoip-${PORTVERSION}.jar
PORTDOCS=	*
DOCSDIR=	${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}

NO_STAGE=	yes

OPTIONS_DEFINE=	DOCS

.include <bsd.port.options.mk>

pre-build:
	@${CP} ${FILESDIR}/build.xml ${WRKSRC}

post-build-script:
.if ${PORT_OPTIONS:MDOCS}
	cd ${WRKSRC} && \
		${ANT} javadoc
.endif

do-install:
	${INSTALL_DATA} ${WRKSRC}/maxmind-geoip.jar ${JAVAJARDIR}/maxmind-geoip-${PORTVERSION}.jar
.if ${PORT_OPTIONS:MDOCS}
	@${MKDIR} ${DOCSDIR}
	cd ${WRKSRC}/javadoc && ${COPYTREE_SHARE} \* ${DOCSDIR}
.endif

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