2014-04-15 08:53:04 +00:00
|
|
|
# $OpenBSD: Makefile,v 1.31 2014/04/15 08:53:04 ajacoutot Exp $
|
2003-06-27 14:55:35 +00:00
|
|
|
|
2007-09-15 22:36:51 +00:00
|
|
|
COMMENT= find the country where IP address/hostname originates from
|
2003-06-27 14:55:35 +00:00
|
|
|
|
2014-03-18 17:56:36 +00:00
|
|
|
V= 1.6.0
|
2014-04-12 09:58:43 +00:00
|
|
|
REVISION= 0
|
2014-03-18 17:56:36 +00:00
|
|
|
DISTNAME= GeoIP-$V
|
2014-04-12 09:58:43 +00:00
|
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
|
|
|
|
geolite-data-20140402.tar.bz2:0
|
2014-03-18 17:56:36 +00:00
|
|
|
|
|
|
|
SHARED_LIBS += GeoIP 9.0 # 7.0
|
|
|
|
|
2006-11-02 07:03:29 +00:00
|
|
|
CATEGORIES= net geo
|
2003-06-27 14:55:35 +00:00
|
|
|
|
2014-03-18 17:56:36 +00:00
|
|
|
HOMEPAGE= http://dev.maxmind.com/geoip/legacy/downloadable/
|
|
|
|
MASTER_SITES= https://github.com/maxmind/geoip-api-c/releases/download/v$V/
|
|
|
|
MASTER_SITES0= http://spacehopper.org/mirrors/
|
2003-06-27 14:55:35 +00:00
|
|
|
|
2014-03-18 17:56:36 +00:00
|
|
|
# LGPLv2.1+
|
2003-06-27 14:55:35 +00:00
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
2012-07-11 09:38:39 +00:00
|
|
|
|
2014-03-18 17:56:36 +00:00
|
|
|
WANTLIB += c z
|
2003-06-27 14:55:35 +00:00
|
|
|
|
2012-03-29 13:38:12 +00:00
|
|
|
SEPARATE_BUILD= Yes
|
2009-03-08 12:44:45 +00:00
|
|
|
|
2003-06-27 14:55:35 +00:00
|
|
|
CONFIGURE_STYLE= gnu
|
2014-03-18 17:56:36 +00:00
|
|
|
CONFIGURE_ARGS= --datadir=${LOCALSTATEDIR}/db \
|
2003-12-07 06:46:44 +00:00
|
|
|
${CONFIGURE_SHARED}
|
2012-07-11 09:38:39 +00:00
|
|
|
|
2014-03-18 17:56:36 +00:00
|
|
|
post-install:
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/GeoIP/
|
|
|
|
${INSTALL_DATA} ${WRKDIR}/data/* ${PREFIX}/share/examples/GeoIP/
|
|
|
|
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/examples/GeoIP/
|
|
|
|
|
|
|
|
pre-test:
|
|
|
|
ln -s ../data ${WRKSRC}/data
|
|
|
|
|
|
|
|
# maintainer convenience target
|
|
|
|
geolite:
|
2014-04-12 09:58:43 +00:00
|
|
|
set -x; \
|
2014-03-18 17:56:36 +00:00
|
|
|
t=`mktemp -d /tmp/geoip.XXXXXXXXXX`; \
|
2014-04-12 09:58:43 +00:00
|
|
|
d=`date +%Y%m%d`; \
|
|
|
|
f=geolite-data-$${d}.tar.bz2; \
|
2014-03-18 17:56:36 +00:00
|
|
|
cd $$t; \
|
|
|
|
mkdir data; \
|
|
|
|
cd data; \
|
|
|
|
echo "This file contains an unmodified dated snapshot of GeoLite data from MaxMind," > readme.txt; \
|
|
|
|
echo "see http://www.maxmind.com and http://dev.maxmind.com/geoip/legacy/geolite/." >> readme.txt; \
|
|
|
|
echo "Distributed under Creative Commons Attribution-ShareAlike 3.0 Unported License." >> readme.txt; \
|
|
|
|
echo "Created at `date -z UTC` and intended for OS packaging purposes." >> readme.txt; \
|
2014-04-12 09:58:43 +00:00
|
|
|
ftp http://geolite.maxmind.com/download/geoip/database/{GeoIPv6.dat.gz,GeoLiteCountry/GeoIP.dat.gz}; \
|
2014-03-18 17:56:36 +00:00
|
|
|
gunzip *gz; \
|
|
|
|
cd ..; \
|
|
|
|
tar cjf $$f data; \
|
|
|
|
scp $$f naiad:mirrors/
|
2003-06-27 14:55:35 +00:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|