[php-pecl-solr] update to 1.0.2

Remi Collet remi at fedoraproject.org
Tue Nov 29 17:24:01 UTC 2011


commit 5188780d6e01ff20da6df8450ff527e8355dd1c2
Author: remi <fedora at famillecollet.com>
Date:   Tue Nov 29 18:23:55 2011 +0100

    update to 1.0.2

 .gitignore         |    1 +
 php-pecl-solr.spec |   67 +++++++++++++++++++++++++++++++++------------------
 sources            |    2 +-
 3 files changed, 45 insertions(+), 25 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e396473..fcf514d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 *~
 package-*.xml
 /solr-1.0.1.tgz
+/solr-1.0.2.tgz
diff --git a/php-pecl-solr.spec b/php-pecl-solr.spec
index e019fd1..6be77cc 100644
--- a/php-pecl-solr.spec
+++ b/php-pecl-solr.spec
@@ -6,7 +6,7 @@
 Summary:        Object oriented API to Apache Solr
 Summary(fr):    API orientée objet pour Apache Solr
 Name:           php-pecl-solr
-Version:        1.0.1
+Version:        1.0.2
 Release:        1%{?dist}
 License:        PHP
 Group:          Development/Languages
@@ -16,18 +16,20 @@ Source0:        http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
 Source2:        xml2changelog
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Provides:       php-pecl(%{pecl_name}) = %{version}, php-%{pecl_name} = %{version}
 BuildRequires:  php-devel, php-pear, curl-devel, libxml2-devel
+
 Requires(post): %{__pecl}
 Requires(postun): %{__pecl}
-Requires:     php(zend-abi) = %{php_zend_api}
-Requires:     php(api) = %{php_core_api}
-Requires:     php-xml >= 5.2.3
+Requires:       php(zend-abi) = %{php_zend_api}
+Requires:       php(api) = %{php_core_api}
+Requires:       php-xml >= 5.2.3
+Provides:       php-pecl(%{pecl_name}) = %{version}, php-%{pecl_name} = %{version}
 
-%{?filter_setup:
-%filter_provides_in %{php_extdir}/.*\.so$
-%filter_setup
-}
+# 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
@@ -79,6 +81,17 @@ http://www.php.net/manual/fr/book.solr.php
 %{_bindir}/php -n %{SOURCE2} package.xml >CHANGELOG
 
 cd %{pecl_name}-%{version}
+# Fix version
+sed -i -e '/PHP_SOLR_DOTTED_VERSION/s/1.0.1/1.0.2/' php_solr_version.h
+
+# Check version
+extver=$(sed -n '/#define PHP_SOLR_DOTTED_VERSION/{s/.* "//;s/".*$//;p}' php_solr_version.h)
+if test "x${extver}" != "x%{version}"; then
+   : Error: Upstream version is ${extver}, expecting %{version}.
+   exit 1
+fi
+
+# Fix rights
 chmod -x README.* \
          CREDITS \
          LICENSE \
@@ -86,6 +99,13 @@ chmod -x README.* \
          docs/documentation.php \
          *.c \
          *.h
+cd ..
+
+# Create configuration file
+cat > %{pecl_name}.ini << 'EOF'
+; Enable Solr extension module
+extension=%{pecl_name}.so
+EOF
 
 
 %build
@@ -96,20 +116,15 @@ phpize
 
 
 %install
-cd %{pecl_name}-%{version}
 rm -rf %{buildroot}
-make install INSTALL_ROOT=%{buildroot}
-
-# Drop in the bit of configuration
-mkdir -p %{buildroot}%{_sysconfdir}/php.d
-cat > %{buildroot}%{_sysconfdir}/php.d/%{pecl_name}.ini << 'EOF'
-; Enable Solr extension module
-extension=%{pecl_name}.so
-EOF
+make -C %{pecl_name}-%{version} \
+     install INSTALL_ROOT=%{buildroot}
 
 # Install XML package description
-mkdir -p %{buildroot}%{pecl_xmldir}
-install -p -m 644 ../package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
+install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
+
+# install config file
+install -D -m 644 %{pecl_name}.ini %{buildroot}%{_sysconfdir}/php.d/%{pecl_name}.ini
 
 
 %post
@@ -122,10 +137,6 @@ if [ $1 -eq 0 ] ; then
 fi
 
 
-%clean
-%{__rm} -rf %{buildroot}
-
-
 %check
 cd %{pecl_name}-%{version}
 ln -s %{php_extdir}/curl.so modules/
@@ -139,6 +150,10 @@ TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=curl.so -d extensio
    run-tests.php
 
 
+%clean
+rm -rf %{buildroot}
+
+
 %files
 %defattr(-, root, root, -)
 %doc CHANGELOG
@@ -156,6 +171,10 @@ TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=curl.so -d extensio
 
 
 %changelog
+* Tue Nov 29 2011 Remi Collet <remi at fedoraproject.org> - 1.0.2-1
+- update to 1.0.2
+- fix filter
+
 * Fri Jun 10 2011 Remi Collet <Fedora at famillecollet.com> - 1.0.1-1
 - Version 1.0.1 (stable) - API 1.0.1 (stable)
 - run test suite after build
diff --git a/sources b/sources
index d49d343..77ccc64 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-538adecfd52a79feae777870edcfd5d7  solr-1.0.1.tgz
+1632144b462ab22b91d03e4d59704fab  solr-1.0.2.tgz


More information about the scm-commits mailing list