Ravenports generated: 22 Sep 2024 04:10
[ravenports.git] / bucket_98 / GeoIP
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               GeoIP
4 VERSION=                1.6.12
5 KEYWORDS=               net geography
6 VARIANTS=               std
7 SDESC[std]=             Legacy API library for geolocation queries
8 HOMEPAGE=               https://dev.maxmind.com/geoip/legacy/
9 CONTACT=                nobody
10
11 DOWNLOAD_GROUPS=        main
12 SITES[main]=            GITHUB/maxmind:geoip-api-c:v1.6.12
13 DISTFILE[1]=            generated:main
14 DF_INDEX=               1
15 SPKGS[std]=             set
16                         primary
17                         dev
18                         tools
19                         man
20
21 OPTIONS_AVAILABLE=      none
22 OPTIONS_STANDARD=       none
23
24 EXRUN[tools]=           primary
25
26 USES=                   autoreconf libtool
27
28 MUST_CONFIGURE=         gnu
29
30 INSTALL_TARGET=         install-strip
31 SOVERSION=              1.6.12
32 SUB_FILES=              messages-tools.ucl
33                         geoipupdate.sh
34
35 post-install:
36         ${MKDIR} ${STAGEDIR}${PREFIX}/share/GeoIP
37         ${INSTALL_SCRIPT} ${WRKDIR}/geoipupdate.sh ${STAGEDIR}${PREFIX}/bin
38
39 [FILE:659:descriptions/desc.primary]
40 GeoIP is a C library that enables the user to find the country that any
41 IP address or hostname originates from.  It uses a file based database
42 that is accurate as of March 2002.  This database simply contains IP blocks
43 as keys, and countries as values.  This database should be more complete and
44 accurate than using reverse DNS lookups.
45
46 This module can be used to automatically select the geographically closest
47 mirror, to analyze your web server logs to determine the countries of your
48 visitors, for credit card fraud detection, and for software export controls.
49
50 This port includes a helper script, geoipupdate.sh, to help you keep the
51 library up-to-date.
52
53
54 [FILE:42:descriptions/desc.tools]
55 This package contains GeoIP lookup tools.
56
57
58 [FILE:112:distinfo]
59 99b119f8e21e94f1dfd6d49fbeed29a70df1544896e76cd456f25e397b07d476       160826 maxmind-geoip-api-c-1.6.12.tar.gz
60
61
62 [FILE:57:manifests/plist.primary]
63 lib/
64  libGeoIP.so.%%SOMAJOR%%
65  libGeoIP.so.%%SOVERSION%%
66
67
68 [FILE:84:manifests/plist.dev]
69 include/
70  GeoIP.h
71  GeoIPCity.h
72 lib/
73  libGeoIP.a
74  libGeoIP.so
75 lib/pkgconfig/geoip.pc
76
77
78 [FILE:65:manifests/plist.tools]
79 bin/
80  geoiplookup
81  geoiplookup6
82  geoipupdate.sh
83 @dir share/GeoIP
84
85
86 [FILE:47:manifests/plist.man]
87 share/man/man1/
88  geoiplookup.1
89  geoiplookup6.1
90
91
92 [FILE:593:patches/patch-man__Makefile.am]
93 --- man/Makefile.am.orig        2015-04-30 04:26:22 UTC
94 +++ man/Makefile.am
95 @@ -1,4 +1,4 @@
96 -man_MANS = geoiplookup6.1 geoiplookup.1
97 +NOINST_man_MANS = geoiplookup6.1 geoiplookup.1
98  
99  EXTRA_DIST = geoiplookup6.1.in geoiplookup.1.in
100  
101 @@ -20,7 +20,7 @@ CLEANFILES = geoiplookup6.1 geoiplookup.
102  LOOKUP_MAN = $(mandir)/man1/geoiplookup.1
103  LOOKUP6_MAN = $(mandir)/man1/geoiplookup6.1
104  
105 -install-data-hook:
106 +install-data-hook: $(NOINST_man_MANS)
107         cat geoiplookup.1 | sed s,DATADIR,$(pkgdatadir), > $(DESTDIR)$(LOOKUP_MAN)
108         cat geoiplookup6.1 | sed s,DATADIR,$(pkgdatadir), > $(DESTDIR)$(LOOKUP6_MAN)
109  
110
111
112 [FILE:1701:files/geoipupdate.sh.in]
113 #!/bin/sh
114
115 # You can set the following environment variables:
116 #
117 # GEOIP_DB_SERVER: The default download server is geolite.maxmind.com
118 # GEOIP_FETCH_CITY: If set (to anything), download the GeoLite City DB
119 # GEOIP_FETCH_ASN: If set, download the GeoIP ASN DB
120
121 GEOIP_DB_SERVER=${GEOIP_DB_SERVER:=geolite.maxmind.com}
122 GEOIP_FETCH_CITY=${GEOIP_FETCH_CITY:=}
123 GEOIP_FETCH_ASN=${GEOIP_FETCH_ASN:=}
124
125 set -eu
126 echo Fetching GeoIP.dat and GeoIPv6.dat...
127
128 # arguments:
129 # $1 URL
130 # $2 output file name
131 _fetch() {
132     url="$1"
133     out="$2"
134     TEMPDIR="$(mktemp -d '%%DATADIR%%/GeoIPupdate.XXXXXX')"
135     trap 'rc=$? ; set +e ; rm -rf "'"$TEMPDIR"'" ; exit $rc' 0
136     if fetch -o "$TEMPDIR/$out.gz" "$url"; then
137         gunzip "$TEMPDIR/$out.gz"
138         chmod 444 "$TEMPDIR/$out"
139         if ! mv -f "$TEMPDIR/$out" "%%DATADIR%%"/"$2"; then
140             echo "Unable to replace %%DATADIR%%/$2"
141             return 2
142         fi
143     else
144         echo "$2 download failed"
145         return 1
146     fi
147     rmdir "$TEMPDIR"
148     trap - 0
149     return 0
150 }
151
152 _fetch "http://${GEOIP_DB_SERVER}/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz" GeoIP.dat
153 _fetch "http://${GEOIP_DB_SERVER}/download/geoip/database/GeoIPv6.dat.gz" GeoIPv6.dat
154
155 if [ -n "$GEOIP_FETCH_CITY" ]; then
156         _fetch "http://${GEOIP_DB_SERVER}/download/geoip/database/GeoLiteCity.dat.gz" GeoLiteCity.dat
157         _fetch "http://${GEOIP_DB_SERVER}/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz" GeoLiteCityv6.dat
158 fi
159 if [ -n "$GEOIP_FETCH_ASN" ]; then
160         _fetch "http://${GEOIP_DB_SERVER}/download/geoip/database/asnum/GeoIPASNum.dat.gz" GeoIPASNum.dat
161         _fetch "http://${GEOIP_DB_SERVER}/download/geoip/database/asnum/GeoIPASNumv6.dat.gz" GeoIPASNumv6.dat
162 fi
163
164
165 [FILE:175:files/messages-tools.ucl.in]
166 tools: {
167   type: "install"
168   message: <<EOM
169 GeoIP does not ship with the actual data files. You must download
170 them yourself! Please run:
171 # %%PREFIX%%/bin/geoipupdate.sh
172 EOM
173 }
174