Skip to contentSkip to conversation

geoip: new package

PATCH Superseded Gustavo Zacarias 2 participants 4 messages Jun 16, 2014 – Jun 17, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 geoip: new package

---
 package/Config.in       |  1 +
 package/geoip/Config.in | 11 +++++++++++
 package/geoip/geoip.mk  | 15 +++++++++++++++
 3 files changed, 27 insertions(+)
 create mode 100644 package/geoip/Config.in
 create mode 100644 package/geoip/geoip.mk
package/Config.in +1 -0
index 9231c45..e435a11 100644
@@ -720,6 +720,7 @@ menu "Networking"
 	source "package/filemq/Config.in"
 	source "package/fmlib/Config.in"
 	source "package/glib-networking/Config.in"
+	source "package/geoip/Config.in"
 	source "package/libcgi/Config.in"
 	source "package/libcgicc/Config.in"
 	source "package/libcurl/Config.in"
package/geoip/Config.in new file +11 -0
new file mode 100644
index 0000000..a198a31
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_GEOIP
+	bool "geoip"
+	help
+	  GeoIP is a C library that enables the user to find geographical
+	  and network information of an IP address.
+	  To use this library, you need to download MaxMind's free GeoLite or
+	  commercial GeoIP binary databases into the target's /usr/share/GeoIP
+	  directory in uncompressed form.
+	  Note that GeoIP2 / GeoLite2 are not supported by this library.
+
+	  https://github.com/maxmind/geoip-api-c
package/geoip/geoip.mk new file +15 -0
new file mode 100644
index 0000000..fde07cb
@@ -0,0 +1,15 @@
+################################################################################
+#
+# geoip
+#
+################################################################################
+
+GEOIP_VERSION = 1.6.0
+GEOIP_SOURCE = GeoIP-$(GEOIP_VERSION).tar.gz
+GEOIP_SITE = $(call github,maxmind,geoip-api-c,v$(GEOIP_VERSION))
+GEOIP_AUTORECONF = YES
+GEOIP_INSTALL_STAGING = YES
+GEOIP_LICENSE = LGPLv2.1+
+GEOIP_LICENSE_FILES = COPYING
+
+$(eval $(autotools-package))
Signature · 1 line
1.8.5.5
#1 lore raw

PATCH 2/2 php-geoip: new package

---
 package/Config.in              |  1 +
 package/php-geoip/Config.in    |  8 ++++++++
 package/php-geoip/php-geoip.mk | 26 ++++++++++++++++++++++++++
 3 files changed, 35 insertions(+)
 create mode 100644 package/php-geoip/Config.in
 create mode 100644 package/php-geoip/php-geoip.mk
package/Config.in +1 -0
index e435a11..f0c5bd1 100644
@@ -429,6 +429,7 @@ endif
 if BR2_PACKAGE_PHP
 if !BR2_PREFER_STATIC_LIB
 menu "External php extensions"
+	source "package/php-geoip/Config.in"
 	source "package/php-gnupg/Config.in"
 	source "package/php-imagick/Config.in"
 	source "package/php-ssh2/Config.in"
package/php-geoip/Config.in new file +8 -0
new file mode 100644
index 0000000..adb2046
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_PHP_GEOIP
+	bool "php-geoip"
+	depends on BR2_PACKAGE_PHP
+	select BR2_PACKAGE_GEOIP
+	help
+	  PHP GeoIP-based IP address mapper to geographical places.
+
+	  http://pecl.php.net/package/geoip
package/php-geoip/php-geoip.mk new file +26 -0
new file mode 100644
index 0000000..99f74e0
@@ -0,0 +1,26 @@
+################################################################################
+#
+# php-geoip
+#
+################################################################################
+
+PHP_GEOIP_VERSION = 1.1.0
+PHP_GEOIP_SOURCE = geoip-$(PHP_GEOIP_VERSION).tgz
+PHP_GEOIP_SITE = http://pecl.php.net/get
+PHP_GEOIP_CONF_OPT = --with-php-config=$(STAGING_DIR)/usr/bin/php-config \
+	--with-geoip=$(STAGING_DIR)/usr
+# phpize does the autoconf magic
+PHP_GEOIP_DEPENDENCIES = geoip php host-autoconf
+PHP_GEOIP_LICENSE = PHP
+PHP_GEOIP_LICENSE_FILES = LICENSE
+
+define PHP_GEOIP_PHPIZE
+	(cd $(@D); \
+		PHP_AUTOCONF=$(HOST_DIR)/usr/bin/autoconf \
+		PHP_AUTOHEADER=$(HOST_DIR)/usr/bin/autoheader \
+		$(STAGING_DIR)/usr/bin/phpize)
+endef
+
+PHP_GEOIP_PRE_CONFIGURE_HOOKS += PHP_GEOIP_PHPIZE
+
+$(eval $(autotools-package))
Signature · 1 line
1.8.5.5
#2 lore raw

PATCH 1/2 geoip: new package

In reply to Gustavo Zacarias

Hi Gustavo,

Quoted 14 lines
---
  package/Config.in       |  1 +
  package/geoip/Config.in | 11 +++++++++++
  package/geoip/geoip.mk  | 15 +++++++++++++++
  3 files changed, 27 insertions(+)

create mode 100644 package/geoip/Config.in
create mode 100644 package/geoip/geoip.mk

package/Config.in +0 -0
index 9231c45..e435a11 100644

package/Config.in menu "Networking" · line 723

Quoted 4 lines
package/Config.in +1 -0
@@ -720,6 +720,7 @@ menu "Networking"
  	source "package/filemq/Config.in"
  	source "package/fmlib/Config.in"
  	source "package/glib-networking/Config.in"
+	source "package/geoip/Config.in"

This should be alphabetically ordered.

Regards,
Jerzy

Quoted 41 lines
package/Config.in +0 -0
  	source "package/libcgi/Config.in"
  	source "package/libcgicc/Config.in"
  	source "package/libcurl/Config.in"
package/geoip/Config.in new file +11 -0
new file mode 100644
index 0000000..a198a31
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_GEOIP
+	bool "geoip"
+	help
+	  GeoIP is a C library that enables the user to find geographical
+	  and network information of an IP address.
+	  To use this library, you need to download MaxMind's free GeoLite or
+	  commercial GeoIP binary databases into the target's /usr/share/GeoIP
+	  directory in uncompressed form.
+	  Note that GeoIP2 / GeoLite2 are not supported by this library.
+
+	  https://github.com/maxmind/geoip-api-c
package/geoip/geoip.mk new file +15 -0
new file mode 100644
index 0000000..fde07cb
@@ -0,0 +1,15 @@
+################################################################################
+#
+# geoip
+#
+################################################################################
+
+GEOIP_VERSION = 1.6.0
+GEOIP_SOURCE = GeoIP-$(GEOIP_VERSION).tar.gz
+GEOIP_SITE = $(call github,maxmind,geoip-api-c,v$(GEOIP_VERSION))
+GEOIP_AUTORECONF = YES
+GEOIP_INSTALL_STAGING = YES
+GEOIP_LICENSE = LGPLv2.1+
+GEOIP_LICENSE_FILES = COPYING
+
+$(eval $(autotools-package))
#3 lore raw

PATCH 1/2 geoip: new package

Quoted 7 lines · Jerzy Grzegorek
Quoted 2 lines

source "package/glib-networking/Config.in"
+ source "package/geoip/Config.in"

This should be alphabetically ordered.

Regards,
Jerzy

Hi. Ooops, i'll fix it, thanks.
Regards.