summaryrefslogtreecommitdiff
path: root/homebrew/geoip
diff options
context:
space:
mode:
Diffstat (limited to 'homebrew/geoip')
-rw-r--r--homebrew/geoip/.beer28
-rw-r--r--homebrew/geoip/.make.sh-auto9
-rw-r--r--homebrew/geoip/_metadata/description1
-rw-r--r--homebrew/geoip/_metadata/homepage1
-rw-r--r--homebrew/geoip/_metadata/name1
-rw-r--r--homebrew/geoip/_metadata/version1
-rwxr-xr-xhomebrew/geoip/download.sh1
7 files changed, 42 insertions, 0 deletions
diff --git a/homebrew/geoip/.beer b/homebrew/geoip/.beer
new file mode 100644
index 000000000..e9fa43d27
--- /dev/null
+++ b/homebrew/geoip/.beer
@@ -0,0 +1,28 @@
+{
+ "name": "Geoip",
+ "description": "This library is for the GeoIP Legacy format (dat)",
+ "url": "https://github.com/maxmind/geoip-api-c/releases/download/v1.6.12/GeoIP-1.6.12.tar.gz",
+ "mirror": null,
+ "homepage": "https://github.com/maxmind/geoip-api-c",
+ "depends": [],
+ "resource": [
+ {
+ "name": "database",
+ "url": "https://src.fedoraproject.org/lookaside/pkgs/GeoIP/GeoIP.dat.gz/4bc1e8280fe2db0adc3fe48663b8926e/GeoIP.dat.gz"
+ }
+ ],
+ "conflicts": [],
+ "patches": [],
+ "install": [
+ "geoip_data = Pathname.new \"#{var}/GeoIP\"",
+ "geoip_data.mkpath",
+ "legacy_data = Pathname.new \"#{HOMEBREW_PREFIX}/share/GeoIP\"",
+ "cp Dir[\"#{legacy_data}/*\"], geoip_data if legacy_data.exist?",
+ "full = Pathname.new \"#{geoip_data}/GeoIP.dat\"",
+ "ln_s \"GeoLiteCountry.dat\", full unless full.exist? || full.symlink?",
+ "full = Pathname.new \"#{geoip_data}/GeoIPCity.dat\"",
+ "ln_s \"GeoLiteCity.dat\", full unless full.exist? || full.symlink?"
+ ],
+ "version": "1.6.12",
+ "file": "geoip.rb"
+} \ No newline at end of file
diff --git a/homebrew/geoip/.make.sh-auto b/homebrew/geoip/.make.sh-auto
new file mode 100644
index 000000000..dab944eba
--- /dev/null
+++ b/homebrew/geoip/.make.sh-auto
@@ -0,0 +1,9 @@
+pkg:setup
+geoip_data = Pathname.new "#{var}/GeoIP"
+geoip_data.mkpath
+legacy_data = Pathname.new "#{HOMEBREW_PREFIX}/share/GeoIP"
+cp Dir["#{legacy_data}/*"], geoip_data if legacy_data.exist?
+full = Pathname.new "#{geoip_data}/GeoIP.dat"
+ln_s "GeoLiteCountry.dat", full unless full.exist? || full.symlink?
+full = Pathname.new "#{geoip_data}/GeoIPCity.dat"
+ln_s "GeoLiteCity.dat", full unless full.exist? || full.symlink?
diff --git a/homebrew/geoip/_metadata/description b/homebrew/geoip/_metadata/description
new file mode 100644
index 000000000..b46b3cb2c
--- /dev/null
+++ b/homebrew/geoip/_metadata/description
@@ -0,0 +1 @@
+This library is for the GeoIP Legacy format (dat)
diff --git a/homebrew/geoip/_metadata/homepage b/homebrew/geoip/_metadata/homepage
new file mode 100644
index 000000000..22851684c
--- /dev/null
+++ b/homebrew/geoip/_metadata/homepage
@@ -0,0 +1 @@
+https://github.com/maxmind/geoip-api-c
diff --git a/homebrew/geoip/_metadata/name b/homebrew/geoip/_metadata/name
new file mode 100644
index 000000000..93a3ccc6e
--- /dev/null
+++ b/homebrew/geoip/_metadata/name
@@ -0,0 +1 @@
+Geoip
diff --git a/homebrew/geoip/_metadata/version b/homebrew/geoip/_metadata/version
new file mode 100644
index 000000000..9e7398a30
--- /dev/null
+++ b/homebrew/geoip/_metadata/version
@@ -0,0 +1 @@
+1.6.12
diff --git a/homebrew/geoip/download.sh b/homebrew/geoip/download.sh
new file mode 100755
index 000000000..938dd8588
--- /dev/null
+++ b/homebrew/geoip/download.sh
@@ -0,0 +1 @@
+wget https://github.com/maxmind/geoip-api-c/releases/download/v1.6.12/GeoIP-1.6.12.tar.gz \ No newline at end of file