%global pecl_name igbinary %global with_zts 0%{?__ztsphp:1} %global ini_name 40-%{pecl_name}.ini %global sources %{pecl_name}-%{version}%{?upstream_prever} %global _configure ../%{sources}/configure Summary: Replacement for the standard PHP serializer Name: php-pecl-igbinary Version: 3.2.16 Release: 1%{?dist} Source0: https://pecl.php.net/get/%{sources}.tgz License: BSD-3-Clause URL: https://pecl.php.net/package/igbinary BuildRequires: gcc BuildRequires: php-pear BuildRequires: php-devel >= 7.0 BuildRequires: php-pecl-apcu-devel BuildRequires: php-json # used by tests BuildRequires: tzdata Requires: php(zend-abi) = %{php_zend_api} Requires: php(api) = %{php_core_api} Provides: php-%{pecl_name} = %{version} Provides: php-%{pecl_name}%{?_isa} = %{version} Provides: php-pecl(%{pecl_name}) = %{version} Provides: php-pecl(%{pecl_name})%{?_isa} = %{version} %description Igbinary is a drop in replacement for the standard PHP serializer. Instead of time and space consuming textual representation, igbinary stores PHP data structures in a compact binary form. Savings are significant when using memcached or similar memory based storages for serialized data. %package devel Summary: Igbinary developer files (header) Requires: php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} Requires: php-devel%{?_isa} %description devel These are the files needed to compile programs using Igbinary %prep %setup -q -c sed -e '/COPYING/s/role="doc"/role="src"/' -i package.xml cd %{sources} # Check version subdir="php$(%{__php} -r 'echo (PHP_MAJOR_VERSION < 7 ? 5 : 7);')" extver=$(sed -n '/#define PHP_IGBINARY_VERSION/{s/.* "//;s/".*$//;p}' src/$subdir/igbinary.h) if test "x${extver}" != "x%{version}%{?upstream_prever}"; then : Error: Upstream version is ${extver}, expecting %{version}%{?upstream_prever}. exit 1 fi cd .. mkdir NTS %if %{with_zts} mkdir ZTS %endif cat <