[php-pecl-gearman] Update to 1.0.1 - PHP 5.4.0 Build
Remi Collet
remi at fedoraproject.org
Fri Jan 20 17:36:17 UTC 2012
commit b54c07c2c062e1c0b633272b02948d2a603f3b56
Author: remi <fedora at famillecollet.com>
Date: Fri Jan 20 18:35:47 2012 +0100
Update to 1.0.1 - PHP 5.4.0 Build
.gitignore | 1 +
php-pecl-gearman.spec | 73 +++++++++++++++++++++++++++++++++++++------------
sources | 2 +-
3 files changed, 57 insertions(+), 19 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index eba750f..0d629bf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/gearman-0.7.0.tgz
+/gearman-1.0.1.tgz
diff --git a/php-pecl-gearman.spec b/php-pecl-gearman.spec
index 1668c71..51565d1 100644
--- a/php-pecl-gearman.spec
+++ b/php-pecl-gearman.spec
@@ -4,18 +4,18 @@
%define pecl_name gearman
Name: php-pecl-gearman
-Version: 0.7.0
-Release: 6%{?dist}
+Version: 1.0.1
+Release: 1%{?dist}
Summary: PHP wrapper to libgearman
Group: Development/Tools
License: PHP
URL: http://gearman.org
-Source0: http://pecl.php.net/get/gearman-0.7.0.tgz
+Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: php-devel, libgearman-devel > 0.8, gearmand >= 0.12, re2c
+BuildRequires: php-devel, libgearman-devel > 0.21
BuildRequires: php-pear
# Required by phpize
BuildRequires: autoconf, automake, libtool
@@ -25,7 +25,16 @@ Requires: php(api) = %{php_core_api}
Requires(post): %{__pecl}
Requires(postun): %{__pecl}
-Requires: php-common, gearmand >= 0.12, libgearman > 0.8
+# comment this as ABI are enough : libgearman.so.6 and php(zend-abi).
+#Requires: php-common, gearmand >= 0.12, libgearman > 0.8
+
+# 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$
+
%description
@@ -33,29 +42,52 @@ This extension uses libgearman library to provide API for
communicating with gearmand, and writing clients and workers
%prep
-%setup -q -n gearman-%{version}
+%setup -q -c
+
+# Upstream often forget to change this
+extver=$(sed -n '/#define PHP_GEARMAN_VERSION/{s/.* "//;s/".*$//;p}' %{pecl_name}-%{version}/php_gearman.h)
+if test "x${extver}" != "x%{version}"; then
+ : Error: Upstream version is ${extver}, expecting %{version}.
+ exit 1
+fi
+
+cat >%{pecl_name}.ini <<EOF
+; enable %{pecl_name} extension
+extension=%{pecl_name}.so
+EOF
+
%build
+cd %{pecl_name}-%{version}
phpize
%configure
make %{?_smp_mflags}
%install
-rm -rf $RPM_BUILD_ROOT
-make install INSTALL_ROOT=$RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/php.d
-cat > $RPM_BUILD_ROOT%{_sysconfdir}/php.d/gearman.ini << 'EOF'
-; enable gearman extension
-extension="gearman.so"
-EOF
+rm -rf %{buildroot}
+
+make -C %{pecl_name}-%{version} \
+ install INSTALL_ROOT=%{buildroot}
+
# Install XML package description
-mkdir -p $RPM_BUILD_ROOT%{pecl_xmldir}
-install -m 644 ../package.xml $RPM_BUILD_ROOT%{pecl_xmldir}/%{name}.xml
+install -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
+
+# install config file
+install -Dpm644 %{pecl_name}.ini %{buildroot}%{php_inidir}/%{pecl_name}.ini
+%check
+cd %{pecl_name}-%{version}
+
+# simple module load test
+php --no-php-ini \
+ --define extension_dir=%{buildroot}%{php_extdir} \
+ --define extension=%{pecl_name}.so \
+ --modules | grep %{pecl_name}
+
%clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
%if 0%{?pecl_install:1}
%post
@@ -69,17 +101,22 @@ if [ $1 -eq 0 ] ; then
fi
%endif
-%{_sysconfdir}/php.d/gearman.ini
%files
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/php.d/gearman.ini
%{php_extdir}/gearman.so
%{pecl_xmldir}/%{name}.xml
-%doc ChangeLog README CREDITS EXPERIMENTAL LICENSE
+%doc %{pecl_name}-%{version}/{ChangeLog,README,CREDITS,EXPERIMENTAL,LICENSE}
%changelog
+* Thu Jan 19 2012 Remi Collet <remi at fedoraproject.org> - 1.0.1-1
+- update to 1.0.1 for php 5.4
+- add %%check for php extension
+- add filter to fix private-shared-object-provides
+- use %%setup -c because package.xml is outside the tree
+
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.7.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
diff --git a/sources b/sources
index 2e7cc9a..0555ec6 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-2e1da4a3d5e3c1e103b772da92f37680 gearman-0.7.0.tgz
+dc576593f18e73aacf3b4430ba9d47d5 gearman-1.0.1.tgz
More information about the scm-commits
mailing list