[php-pecl-geoip] Update to 1.0.8 - PHP 5.4.0 Build

Remi Collet remi at fedoraproject.org
Fri Jan 20 17:40:18 UTC 2012


commit 8fd573c656240e51d8240dd7ab30c66c4ba43d73
Author: remi <fedora at famillecollet.com>
Date:   Fri Jan 20 18:39:49 2012 +0100

    Update to 1.0.8 - PHP 5.4.0 Build

 .gitignore          |    1 +
 geoip-tests.patch   |   47 -----------------------------------------------
 php-pecl-geoip.spec |   17 ++++++++++++-----
 sources             |    2 +-
 4 files changed, 14 insertions(+), 53 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 641116b..74866f4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 geoip-1.0.7.tgz
+/geoip-1.0.8.tgz
diff --git a/geoip-tests.patch b/geoip-tests.patch
index 6dfd861..335568b 100644
--- a/geoip-tests.patch
+++ b/geoip-tests.patch
@@ -1,38 +1,3 @@
-Index: tests/008.phpt
-===================================================================
---- tests/008.phpt	(revision 311865)
-+++ tests/008.phpt	(working copy)
-@@ -5,7 +5,11 @@
- --FILE--
- <?php
- 
--var_dump( geoip_db_filename(14) );
-+if (GEOIP_NUM_DB_TYPES <= 18 ) {
-+    var_dump( geoip_db_filename(14) );
-+} else {
-+    var_dump( geoip_db_filename(19) );
-+}
- 
- ?>
- --EXPECT--
-Index: tests/011.phpt
-===================================================================
---- tests/011.phpt	(revision 311865)
-+++ tests/011.phpt	(working copy)
-@@ -4,8 +4,12 @@
- <?php if (!extension_loaded("geoip")) print "skip"; ?>
- --FILE--
- <?php
-+if (GEOIP_NUM_DB_TYPES <= 18 ) {
-+    geoip_database_info(14);
-+} else {
-+    geoip_database_info(19);
-+}
- 
--geoip_database_info(14);
- 
- ?>
- --EXPECTF--
 Index: tests/014.phpt
 ===================================================================
 --- tests/014.phpt	(revision 311865)
@@ -58,15 +23,3 @@ Index: tests/014.phpt
  
  Warning: geoip_time_zone_by_country_and_region(): You need to specify at least the country code. in %s on line %d
  bool(false)
-Index: geoip.c
-===================================================================
---- geoip.c	(revision 311865)
-+++ geoip.c	(working copy)
-@@ -118,6 +118,7 @@
- 	_GeoIP_setup_dbfilename();
- 	
- 	/* For database type constants */
-+	REGISTER_LONG_CONSTANT("GEOIP_NUM_DB_TYPES",        NUM_DB_TYPES,              CONST_CS | CONST_PERSISTENT);
- 	REGISTER_LONG_CONSTANT("GEOIP_COUNTRY_EDITION",     GEOIP_COUNTRY_EDITION,     CONST_CS | CONST_PERSISTENT);
- 	REGISTER_LONG_CONSTANT("GEOIP_REGION_EDITION_REV0", GEOIP_REGION_EDITION_REV0, CONST_CS | CONST_PERSISTENT);
- 	REGISTER_LONG_CONSTANT("GEOIP_CITY_EDITION_REV0",   GEOIP_CITY_EDITION_REV0,   CONST_CS | CONST_PERSISTENT);
diff --git a/php-pecl-geoip.spec b/php-pecl-geoip.spec
index 3de5832..4a2827b 100644
--- a/php-pecl-geoip.spec
+++ b/php-pecl-geoip.spec
@@ -4,16 +4,14 @@
 %define pecl_name geoip
 
 Name:		php-pecl-geoip
-Version:	1.0.7
-Release:	8%{?dist}
+Version:	1.0.8
+Release:	1%{?dist}
 Summary:	Extension to map IP addresses to geographic places
 Group:		Development/Languages
 License:	PHP
 URL:		http://pecl.php.net/package/%{pecl_name}
 Source0:	http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
 
-# https://bugs.php.net/bug.php?id=60066
-Patch0:		geoip-build.patch
 # https://bugs.php.net/bug.php?id=59804
 Patch1:		geoip-tests.patch
 
@@ -45,8 +43,14 @@ database
 [ -f package2.xml ] || %{__mv} package.xml package2.xml
 %{__mv} package2.xml %{pecl_name}-%{version}/%{pecl_name}.xml
 
+# Upstream often forget this
+extver=$(sed -n '/#define PHP_GEOIP_VERSION/{s/.* "//;s/".*$//;p}' %{pecl_name}-%{version}/php_geoip.h)
+if test "x${extver}" != "x%{version}"; then
+   : Error: Upstream version is ${extver}, expecting %{version}.
+   exit 1
+fi
+
 cd %{pecl_name}-%{version}
-%patch0 -p3 -b .build
 %patch1 -p0 -b .tests
 
 
@@ -104,6 +108,9 @@ fi
 %{pecl_xmldir}/%{name}.xml
 
 %changelog
+* Thu Jan 19 2012 Remi Collet <remi at fedoraproject.org> - 1.0.8-1
+- update to 1.0.8 for php 5.4
+
 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.7-8
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 
diff --git a/sources b/sources
index 47591ca..ab4769b 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-ca5397a1dacb62afd426c2065fc1e106  geoip-1.0.7.tgz
+65263ac6d1c335f22ce818b3253912a5  geoip-1.0.8.tgz


More information about the scm-commits mailing list