1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
5 KEYWORDS= net geography
7 SDESC[standard]= Legacy API library for geolocation queries
8 HOMEPAGE= https://dev.maxmind.com/geoip/legacy/
12 SITES[main]= GITHUB/maxmind:geoip-api-c:v1.6.12
13 DISTFILE[1]= generated:main
15 SPKGS[standard]= single
17 OPTIONS_AVAILABLE= none
18 OPTIONS_STANDARD= none
20 USES= autoreconf libtool
24 INSTALL_TARGET= install-strip
26 SUB_FILES= pkg-message-single
30 @${MKDIR} ${STAGEDIR}${PREFIX}/share/GeoIP
31 ${INSTALL_SCRIPT} ${WRKDIR}/geoipupdate.sh ${STAGEDIR}${PREFIX}/bin
33 [FILE:659:descriptions/desc.single]
34 GeoIP is a C library that enables the user to find the country that any
35 IP address or hostname originates from. It uses a file based database
36 that is accurate as of March 2002. This database simply contains IP blocks
37 as keys, and countries as values. This database should be more complete and
38 accurate than using reverse DNS lookups.
40 This module can be used to automatically select the geographically closest
41 mirror, to analyze your web server logs to determine the countries of your
42 visitors, for credit card fraud detection, and for software export controls.
44 This port includes a helper script, geoipupdate.sh, to help you keep the
49 99b119f8e21e94f1dfd6d49fbeed29a70df1544896e76cd456f25e397b07d476 160826 maxmind-geoip-api-c-1.6.12.tar.gz
52 [FILE:254:manifests/plist.single]
63 libGeoIP.so.%%SOMAJOR%%
64 libGeoIP.so.%%SOVERSION%%
65 lib/pkgconfig/geoip.pc
72 [FILE:593:patches/patch-man__Makefile.am]
73 --- man/Makefile.am.orig 2015-04-30 04:26:22 UTC
76 -man_MANS = geoiplookup6.1 geoiplookup.1
77 +NOINST_man_MANS = geoiplookup6.1 geoiplookup.1
79 EXTRA_DIST = geoiplookup6.1.in geoiplookup.1.in
81 @@ -20,7 +20,7 @@ CLEANFILES = geoiplookup6.1 geoiplookup.
82 LOOKUP_MAN = $(mandir)/man1/geoiplookup.1
83 LOOKUP6_MAN = $(mandir)/man1/geoiplookup6.1
86 +install-data-hook: $(NOINST_man_MANS)
87 cat geoiplookup.1 | sed s,DATADIR,$(pkgdatadir), > $(DESTDIR)$(LOOKUP_MAN)
88 cat geoiplookup6.1 | sed s,DATADIR,$(pkgdatadir), > $(DESTDIR)$(LOOKUP6_MAN)
92 [FILE:1701:files/geoipupdate.sh.in]
95 # You can set the following environment variables:
97 # GEOIP_DB_SERVER: The default download server is geolite.maxmind.com
98 # GEOIP_FETCH_CITY: If set (to anything), download the GeoLite City DB
99 # GEOIP_FETCH_ASN: If set, download the GeoIP ASN DB
101 GEOIP_DB_SERVER=${GEOIP_DB_SERVER:=geolite.maxmind.com}
102 GEOIP_FETCH_CITY=${GEOIP_FETCH_CITY:=}
103 GEOIP_FETCH_ASN=${GEOIP_FETCH_ASN:=}
106 echo Fetching GeoIP.dat and GeoIPv6.dat...
110 # $2 output file name
114 TEMPDIR="$(mktemp -d '%%DATADIR%%/GeoIPupdate.XXXXXX')"
115 trap 'rc=$? ; set +e ; rm -rf "'"$TEMPDIR"'" ; exit $rc' 0
116 if fetch -o "$TEMPDIR/$out.gz" "$url"; then
117 gunzip "$TEMPDIR/$out.gz"
118 chmod 444 "$TEMPDIR/$out"
119 if ! mv -f "$TEMPDIR/$out" "%%DATADIR%%"/"$2"; then
120 echo "Unable to replace %%DATADIR%%/$2"
124 echo "$2 download failed"
132 _fetch "http://${GEOIP_DB_SERVER}/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz" GeoIP.dat
133 _fetch "http://${GEOIP_DB_SERVER}/download/geoip/database/GeoIPv6.dat.gz" GeoIPv6.dat
135 if [ -n "$GEOIP_FETCH_CITY" ]; then
136 _fetch "http://${GEOIP_DB_SERVER}/download/geoip/database/GeoLiteCity.dat.gz" GeoLiteCity.dat
137 _fetch "http://${GEOIP_DB_SERVER}/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz" GeoLiteCityv6.dat
139 if [ -n "$GEOIP_FETCH_ASN" ]; then
140 _fetch "http://${GEOIP_DB_SERVER}/download/geoip/database/asnum/GeoIPASNum.dat.gz" GeoIPASNum.dat
141 _fetch "http://${GEOIP_DB_SERVER}/download/geoip/database/asnum/GeoIPASNumv6.dat.gz" GeoIPASNumv6.dat
145 [FILE:125:files/pkg-message-single.in]
146 GeoIP does not ship with the actual data files. You must download
147 them yourself! Please run:
148 # %%PREFIX%%/bin/geoipupdate.sh