summaryrefslogtreecommitdiffstats
path: root/net/py-GeoIP/Makefile
blob: 74afc363976e3260611ce2d3eb13d017b33edb70 (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
# New ports collection makefile for:	py-GeoIP
# Date created:		27 February 2004
# Whom:			Stefan Walter <sw@gegenunendlich.de>
#
# $FreeBSD$
#

PORTNAME=	GeoIP
PORTVERSION=	1.2.1
PORTREVISION=	1
CATEGORIES=	net python
MASTER_SITES=	http://www.maxmind.com/download/geoip/api/python/
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
DISTNAME=	${PORTNAME}-Python-${PORTVERSION}

MAINTAINER=	stefan@FreeBSD.org
COMMENT=	Mapping of IP addresses/hostnames to country names in Python

LIB_DEPENDS=	GeoIP.4:${PORTSDIR}/net/GeoIP

USE_PYTHON=	yes
USE_PYDISTUTILS=yes

EXAMPLESDIR=	${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME}
EXAMPLE_FILES=	README test.py test_city.py test_org.py test_region.py

PLIST_FILES=	%%PYTHON_SITELIBDIR%%/GeoIP.so \
		%%PORTDOCS%%%%EXAMPLESDIR%%/README \
		%%PORTDOCS%%%%EXAMPLESDIR%%/test.py \
		%%PORTDOCS%%%%EXAMPLESDIR%%/test_city.py \
		%%PORTDOCS%%%%EXAMPLESDIR%%/test_org.py \
		%%PORTDOCS%%%%EXAMPLESDIR%%/test_region.py
PLIST_DIRS=	%%PORTDOCS%%%%EXAMPLESDIR%%

post-patch:
	@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' \
		${WRKSRC}/setup.py \
		${WRKSRC}/test.py \
		${WRKSRC}/test_city.py \
		${WRKSRC}/test_org.py \
		${WRKSRC}/test_region.py

post-install:
.if !defined(NOPORTDOCS)
	@${MKDIR} ${EXAMPLESDIR}
.for file in ${EXAMPLE_FILES}
	@${INSTALL_DATA} ${WRKSRC}/${file} ${EXAMPLESDIR}
.endfor
.endif

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