File php-igbinary.spec of Package php85-igbinary
#
# spec file for package php8-igbinary
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define pkg_name igbinary
%define flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "" || (0%{?suse_version} >= 1550 && "%{flavor}" == "php7")
%define php_name php
ExclusiveArch: do-not-build
%else
%define php_name %{flavor}
%endif
%define conf_dir %{_sysconfdir}/%{php_name}/conf.d
%define ext_dir %(%{__php_config} --extension-dir)
%define inc_dir %(%{__php_config} --include-dir)
Name: %{php_name}-%{pkg_name}
Version: 3.2.17RC1
Release: 0
Summary: PHP igbinary extension
License: BSD-3-Clause
Group: Productivity/Networking/Web/Servers
Url: https://pecl.php.net/package/igbinary
Source0: https://pecl.php.net/get/%{pkg_name}-%{version}.tar.gz
BuildRequires: php8-devel autoconf
Requires: php(api) = %{php_core_api}
Requires: php(zend-abi) = %{php_zend_api}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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.
%package devel
Summary: Include Files and Libraries mandatory for Development
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.
%prep
%setup -q -n %{pkg_name}-%{version}
%build
CFLAGS="%{optflags}"
CXXFLAGS="%{optflags}"
export CFLAGS
export CXXFLAGS
%{__phpize}
%configure --enable-igbinary
make %{?_smp_mflags}
%install
make INSTALL_ROOT=%{buildroot} install
install -D -m 0644 %{pkg_name}.php.ini %{buildroot}%{conf_dir}/%{pkg_name}.ini
%check
export TEST_PHP_ARGS="-d error_reporting=0"
#make %{?_smp_mflags} PHP_EXECUTABLE=%{__php} NO_INTERACTION=1 test
%files
%defattr(-,root,root)
%doc COPYING CREDITS NEWS README.md igbinary.php
%{ext_dir}/%{pkg_name}.so
%config(noreplace) %{conf_dir}/%{pkg_name}.ini
%files devel
%defattr(-,root,root)
%{inc_dir}/ext/%{pkg_name}/
%changelog