File php5-igbinary.spec of Package php5-igbinary

# spec file for package php5-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

%define pkg_name    igbinary
Name:           php5-%{pkg_name}
Version:        1.2.1
Release:        0
Summary:        Replacement for the Standard PHP Serializer
# need to ask authors to clarify. There's 'New BSD' in package description,
# PHP-3.01 in igbinary-1.2.1/apc_serializer.h and 'PHP Style License' in
# igbinary-1.2.1/igbinary.spec
License:        PHP
Group:          Productivity/Networking/Web/Servers
BuildRequires:  php5-APCu-devel
BuildRequires:  php5-devel
Provides:       php-igbinary = %{version}
Obsoletes:      php-igbinary < %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if %{?php_zend_api}0
Requires:       php(api) = %{php_core_api}
Requires:       php(zend-abi) = %{php_zend_api}
%requires_eq    php5

Igbinary is a drop in replacement for the standard php serializer.

%setup -q -n %{pkg_name}-%{version}
mkdir %{name}

pushd %{name}
export CFLAGS
../configure --with-libdir=%{_lib}
make %{?_smp_mflags}

make DESTDIR=%{buildroot} install %{?_smp_mflags} -C %{name} INSTALL_ROOT=%{buildroot}
mkdir -p %{buildroot}%{_sysconfdir}/php5/conf.d
echo "; comment out next line to disable %{pkg_name} extension in php" > %{buildroot}%{_sysconfdir}/php5/conf.d/%{pkg_name}.ini
echo "extension = %{pkg_name}.so" >> %{buildroot}%{_sysconfdir}/php5/conf.d/%{pkg_name}.ini

pushd %{name}
make %{?_smp_mflags} test

%config(noreplace) %{_sysconfdir}/php5/conf.d/%{pkg_name}.ini
%dir %{_includedir}/php5/ext/igbinary