summaryrefslogtreecommitdiffstats
path: root/php-pecl-igbinary.spec
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-08-28 09:43:39 +0200
committerRemi Collet <fedora@famillecollet.com>2014-08-28 09:43:39 +0200
commit94fcb229b00f9ad6ab09eb72eebd8da334150a0c (patch)
treedd54290a94501b0c372bb212a63ef6781a09ccd7 /php-pecl-igbinary.spec
parent5dd5508c2038baceeec81ca3bf18a7babbbf243f (diff)
php-pecl-igbinary: 1.2.0
Diffstat (limited to 'php-pecl-igbinary.spec')
-rw-r--r--php-pecl-igbinary.spec61
1 files changed, 34 insertions, 27 deletions
diff --git a/php-pecl-igbinary.spec b/php-pecl-igbinary.spec
index e5af731..e96478b 100644
--- a/php-pecl-igbinary.spec
+++ b/php-pecl-igbinary.spec
@@ -13,9 +13,9 @@
%global extname igbinary
%global with_zts 0%{?__ztsphp:1}
-%global commit c35d48f3d14794373b2ef89a6d79020bb7418d7f
-%global short %(c=%{commit}; echo ${c:0:7})
-%global prever -dev
+#global commit c35d48f3d14794373b2ef89a6d79020bb7418d7f
+#global short %(c=%{commit}; echo ${c:0:7})
+#global prever -dev
%if "%{php_version}" < "5.6"
%global ini_name %{extname}.ini
%else
@@ -24,17 +24,14 @@
Summary: Replacement for the standard PHP serializer
Name: %{?scl_prefix}php-pecl-igbinary
-Version: 1.1.2
+Version: 1.2.0
%if 0%{?short:1}
Release: 0.11.git%{short}%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
Source0: https://github.com/%{extname}/%{extname}/archive/%{commit}/%{extname}-%{version}-%{short}.tar.gz
%else
-Release: 2%{?dist}
+Release: 1%{?dist}
Source0: http://pecl.php.net/get/%{extname}-%{version}.tgz
-# http://pecl.php.net/bugs/22598
-Source1: %{extname}-tests.tgz
%endif
-# https://bugs.php.net/59669
License: BSD
Group: System Environment/Libraries
@@ -111,7 +108,7 @@ These are the files needed to compile programs using Igbinary
%if 0%{?short:1}
mv igbinary-%{commit}/package.xml .
-mv igbinary-%{commit} %{extname}-%{version}
+mv igbinary-%{commit} NTS
sed -e '/release/s/-dev/dev/' -i package.xml
cd %{extname}-%{version}
@@ -119,11 +116,13 @@ cd %{extname}-%{version}
%patch0 -p1 -b .apcu
%else
-cd %{extname}-%{version}
-tar xzf %{SOURCE1}
+mv %{extname}-%{version} NTS
+cd NTS
%endif
# Check version
+sed -e '/IGBINARY_VERSION/s/1.1.2-dev/%{version}/' -i igbinary.h
+
extver=$(sed -n '/#define IGBINARY_VERSION/{s/.* "//;s/".*$//;p}' igbinary.h)
if test "x${extver}" != "x%{version}%{?prever}"; then
: Error: Upstream version is ${extver}, expecting %{version}%{?prever}.
@@ -132,7 +131,7 @@ fi
cd ..
%if %{with_zts}
-cp -r %{extname}-%{version} %{extname}-%{version}-zts
+cp -r NTS ZTS
%endif
cat <<EOF | tee %{ini_name}
@@ -152,13 +151,13 @@ EOF
%build
-cd %{extname}-%{version}
+cd NTS
%{_bindir}/phpize
%configure --with-php-config=%{_bindir}/php-config
make %{?_smp_mflags}
%if %{with_zts}
-cd ../%{extname}-%{version}-zts
+cd ../ZTS
%{_bindir}/zts-phpize
%configure --with-php-config=%{_bindir}/zts-php-config
make %{?_smp_mflags}
@@ -168,32 +167,36 @@ make %{?_smp_mflags}
%install
rm -rf %{buildroot}
-make install -C %{extname}-%{version} \
- INSTALL_ROOT=%{buildroot}
+make install -C NTS INSTALL_ROOT=%{buildroot}
-install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
+install -D -m 644 package2.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
# Install the ZTS stuff
%if %{with_zts}
-make install -C %{extname}-%{version}-zts \
- INSTALL_ROOT=%{buildroot}
+make install -C ZTS INSTALL_ROOT=%{buildroot}
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
# Test & Documentation
-cd %{extname}-%{version}
-for i in $(grep 'role="test"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
-do [ -f tests/$i ] && install -Dpm 644 tests/$i %{buildroot}%{pecl_testdir}/%{extname}/tests/$i
+cd NTS
+for i in $(grep 'role="test"' ../package2.xml | sed -e 's/^.*name="//;s/".*$//')
+do install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{extname}/tests/$i
done
-for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
+for i in $(grep 'role="doc"' ../package2.xml | sed -e 's/^.*name="//;s/".*$//')
do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{extname}/$i
done
%check
-cd %{extname}-%{version}
+sed -e '/^extension=apc/d' -i ?TS/tests/igbinary_045*phpt
+%if "%{php_version}" < "5.4"
+# SessionHandlerInterface is 5.4 only
+rm ?TS/tests/igbinary_047.phpt
+%endif
+
+cd NTS
# APC required for test 045
if [ -f %{php_extdir}/apcu.so ]; then
@@ -212,10 +215,10 @@ TEST_PHP_EXECUTABLE=%{_bindir}/php \
TEST_PHP_ARGS="-n $MOD -d extension=$PWD/modules/%{extname}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
-%{_bindir}/php -n run-tests.php
+%{_bindir}/php -n run-tests.php --show-diff
%if %{with_zts}
-cd ../%{extname}-%{version}-zts
+cd ../ZTS
: simple ZTS module load test, without APC, as optional
%{__ztsphp} --no-php-ini \
@@ -227,7 +230,7 @@ TEST_PHP_EXECUTABLE=%{__ztsphp} \
TEST_PHP_ARGS="-n $MOD -d extension=$PWD/modules/%{extname}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
-%{__ztsphp} -n run-tests.php
+%{__ztsphp} -n run-tests.php --show-diff
%endif
@@ -249,6 +252,7 @@ fi
%defattr(-,root,root,-)
%doc %{pecl_docdir}/%{extname}
%config(noreplace) %{php_inidir}/%{ini_name}
+
%{php_extdir}/%{extname}.so
%{pecl_xmldir}/%{name}.xml
@@ -269,6 +273,9 @@ fi
%changelog
+* Thu Aug 28 2014 Remi Collet <remi@fedoraproject.org> - 1.2.0-1
+- update to 1.1.1
+
* Sun Aug 24 2014 Remi Collet <remi@fedoraproject.org> - 1.1.2-0.11.git3b8ab7e
- improve SCL stuff