php-geoip: new package
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Tue, 17 Jun 2014 14:39:23 +0000 (11:39 -0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 22 Jun 2014 19:55:32 +0000 (21:55 +0200)
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/Config.in
package/php-geoip/Config.in [new file with mode: 0644]
package/php-geoip/php-geoip.mk [new file with mode: 0644]

index 4718719451a01f76993bd138ad02d042d44eae38..498630f6f6b05081d118b547b275c9f055c0f45d 100644 (file)
@@ -430,6 +430,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"
diff --git a/package/php-geoip/Config.in b/package/php-geoip/Config.in
new file mode 100644 (file)
index 0000000..adb2046
--- /dev/null
@@ -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
diff --git a/package/php-geoip/php-geoip.mk b/package/php-geoip/php-geoip.mk
new file mode 100644 (file)
index 0000000..99f74e0
--- /dev/null
@@ -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))