diff options
Diffstat (limited to 'php-pecl-protocolbuffers.spec')
-rw-r--r-- | php-pecl-protocolbuffers.spec | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/php-pecl-protocolbuffers.spec b/php-pecl-protocolbuffers.spec index f20fa51..5d09579 100644 --- a/php-pecl-protocolbuffers.spec +++ b/php-pecl-protocolbuffers.spec @@ -13,16 +13,24 @@ %global with_zts 0%{?__ztsphp:1} %global pecl_name protocolbuffers +%if "%{php_version}" < "5.6" +%global ini_name %{pecl_name}.ini +%else +%global ini_name 40-%{pecl_name}.ini +%endif Summary: Protocol buffers in PHP Name: %{?scl_prefix}php-pecl-%{pecl_name} -Version: 0.2.2 +Version: 0.2.4 Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: BSD Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +# https://github.com/chobie/php-protocolbuffers/pull/40 +Patch0: %{pecl_name}-pr40.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{?scl_prefix}php-devel > 5.2 BuildRequires: %{?scl_prefix}php-pear @@ -71,6 +79,8 @@ are compiled against the "old" format. mv %{pecl_name}-%{version} NTS cd NTS +%patch0 -p1 -b .pr40 + # Sanity check, really often broken extver=$(sed -n '/#define PHP_PROTOCOLBUFFERS_VERSION/{s/.* "//;s/".*$//;p}' php_protocolbuffers.h) if test "x${extver}" != "x%{version}"; then @@ -85,9 +95,13 @@ cp -pr NTS ZTS %endif # Create configuration file -cat > %{pecl_name}.ini << 'EOF' +cat > %{ini_name} << 'EOF' ; Enable %{pecl_name} extension module extension=%{pecl_name}.so + +; Configuration +;protocolbuffers.strict_mode=1 +;protocolbuffers.validate_string=1 EOF @@ -113,7 +127,7 @@ rm -rf %{buildroot} make -C NTS install INSTALL_ROOT=%{buildroot} # install config file -install -D -m 644 %{pecl_name}.ini %{buildroot}%{php_inidir}/%{pecl_name}.ini +install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} # Install XML package description install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml @@ -121,7 +135,7 @@ install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml %if %{with_zts} make -C ZTS install INSTALL_ROOT=%{buildroot} -install -D -m 644 %{pecl_name}.ini %{buildroot}%{php_ztsinidir}/%{pecl_name}.ini +install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # Test & Documentation @@ -147,7 +161,7 @@ fi cd NTS : Minimal load test for NTS extension %{__php} --no-php-ini \ - --define extension= %{buildroot}%{php_extdir}/%{pecl_name}.so \ + --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} : Upstream test suite for NTS extension @@ -161,7 +175,7 @@ REPORT_EXIT_STATUS=1 \ cd ../ZTS : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ - --define extension= %{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ + --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} : Upstream test suite for ZTS extension @@ -182,16 +196,21 @@ rm -rf %{buildroot} %doc %{pecl_docdir}/%{pecl_name} %doc %{pecl_testdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml -%config(noreplace) %{php_inidir}/%{pecl_name}.ini +%config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so %if %{with_zts} -%config(noreplace) %{php_ztsinidir}/%{pecl_name}.ini +%config(noreplace) %{php_ztsinidir}/%{ini_name} %{php_ztsextdir}/%{pecl_name}.so %endif %changelog +* Mon Apr 14 2014 Remi Collet <remi@fedoraproject.org> - 0.2.3-1 +- Update to 0.2.4 +- add numerical prefix to extension configuration file +- open https://github.com/chobie/php-protocolbuffers/pull/40 + * Fri Feb 14 2014 Remi Collet <remi@fedoraproject.org> - 0.2.2-1 - Update to 0.2.2 (alpha) |