[php-magickwand] PHP 5.4.0 Build

Remi Collet remi at fedoraproject.org
Fri Jan 20 17:24:06 UTC 2012


commit adeb390b89383d96dcc345bc64ffd50aaf753fe8
Author: remi <fedora at famillecollet.com>
Date:   Fri Jan 20 18:23:37 2012 +0100

    PHP 5.4.0 Build

 php-magickwand.spec |   34 +++++++++++++++++++++++++++++++++-
 1 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/php-magickwand.spec b/php-magickwand.spec
index 6308d18..9f6d9b1 100644
--- a/php-magickwand.spec
+++ b/php-magickwand.spec
@@ -1,10 +1,17 @@
 %global php_apiver	%((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1)
 %{!?php_extdir:		%{expand: %%global php_extdir %(php-config --extension-dir)}}
 
+# Fix private-shared-object-provides
+# RPM 4.8
+%{?filter_provides_in: %filter_provides_in %{php_extdir}/.*\.so$}
+%{?filter_setup}
+# RPM 4.9
+%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}%{php_extdir}/.*\\.so$
+
 Summary:	PHP API for ImageMagick
 Name:		php-magickwand
 Version:	1.0.9
-Release:	1%{?dist}
+Release:	2%{?dist}
 License:	ImageMagick
 Group:		Development/Languages
 # Only latest version is always kept on: http://www.magickwand.org/download/php/
@@ -28,6 +35,17 @@ functionality and progress monitoring.
 
 %prep
 %setup -q -n MagickWandForPHP-%{version}
+
+# fix version
+sed -i -e /MAGICKWAND_VERSION/s/1.0.8/1.0.9/ magickwand.h
+
+# Check version  (upstream often forget this)
+extver=$(sed -n '/#define MAGICKWAND_VERSION/{s/.* "//;s/".*$//;p}' magickwand.h)
+if test "x${extver}" != "x%{version}"; then
+   : Error: Upstream version is ${extver}, expecting %{version}.
+   exit 1
+fi
+
 export PHP_RPATH=no
 phpize
 %configure
@@ -48,6 +66,14 @@ mv -f README.fixed README
 %check
 make test
 
+# no test provides by upstream (make test => No tests were run.)
+# Minimal load test of php extension
+php --no-php-ini \
+    --define extension_dir=${RPM_BUILD_ROOT}%{php_extdir} \
+    --define extension=magickwand.so \
+    --modules | grep magickwand
+
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -58,6 +84,12 @@ rm -rf $RPM_BUILD_ROOT
 %config(noreplace) %{_sysconfdir}/php.d/magickwand.ini
 
 %changelog
+* Thu Jan 19 2012 Remi Collet <remi at fedoraproject.org> - 1.0.9-2
+- build against php 5.4.0
+- add %%check for php extension
+- add filter to fix private-shared-object-provides
+- fix version reported by phpinfo()
+
 * Sun Jan 15 2012 Robert Scheck <robert at fedoraproject.org> 1.0.9-1
 - Update to 1.0.9
 


More information about the scm-commits mailing list