File php5-pear.spec of Package php5-pear

# spec file for package php5-pear
# Copyright (c) 2019 SUSE LLC
# 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

%global peardir %{_datadir}/php5/PEAR
%global metadir %{peardir}

%define pear_module_version(m) %(sed -n 's/.*=>.*%{1}-\\(.*\\)\\.tar.*/\\1/p' %{SOURCE0})

Name:           php5-pear
Version:        1.10.17
Release:        0
Summary:        PHP Extension and Application Repository
License:        BSD-2-Clause
Group:          Development/Libraries/PHP
Source2:        %{name}.keyring
Source3:        %{name}.rpmlintrc
Patch0:         pear-cacheid-array-check.patch
BuildRequires:  php5
Requires:       php5
Recommends:     php5-openssl
Provides:       php-pear = %{version}
Provides:       php-pear(Archive_Tar) = %pear_module_version Archive_Tar
Provides:       php-pear(Console_Getopt) = %pear_module_version Console_Getopt
Provides:       php-pear(PEAR) = %pear_module_version PEAR
Provides:       php-pear(Structures_Graph) = %pear_module_version Structures_Graph
Provides:       php-pear(XML_Util) = %pear_module_version XML_Util
Obsoletes:      php-pear < %{version}
BuildArch:      noarch

PEAR is a code repository for PHP extensions and PHP library code
similar to TeX's CTAN and Perl's CPAN. This package provides an access
to the repository.

See for more details.

%package -n php5-pecl
Summary:        PHP Extension Community Library
Group:          Development/Libraries/PHP
Requires:       autoconf
Requires:       automake
Requires:       gcc-c++
Requires:       libtool
Requires:       php5-pear = %{version}
Provides:       php-pecl = %{version}
Obsoletes:      php-pecl < %{version}
BuildArch:      noarch

%description -n php5-pecl
PECL is a repository for PHP Extensions, providing a directory of
all known extensions and hosting facilities for downloading and
development of PHP extensions.

See for more details.

# Empty prep section, nothing to prepare

# Empty build section, nothing to build

export PHP_PEAR_INSTALL_DIR=%{peardir}
export PHP_PEAR_METADATA_DIR=%{metadir}
export PHP_PEAR_SIG_BIN=%{_bindir}/gpg
export PHP_PEAR_SYSCONF_DIR=%{_sysconfdir}/php5/cli
export INSTALL_ROOT=%{buildroot}

install -d %{buildroot}%{_localstatedir}/{cache,lib}/pear

php -d date.timezone=UTC -d memory_limit=64M -d short_open_tag=0 -d safe_mode=0 \
	-d 'error_reporting=E_ALL&~E_DEPRECATED' -d detect_unicode=0 %{SOURCE0} \
	--force \
	--bin      %{_bindir} \
	--cache    %{_localstatedir}/cache/pear \
	--dir      %{peardir} \
	--man      %{_mandir} \
	--metadata %{metadir} \
	--www      %{peardir}/htdocs

pushd %{buildroot}%{peardir}
patch -p1 < %{PATCH0}

%config(noreplace) %{_sysconfdir}/php5/cli/pear.conf
%dir %{_localstatedir}/cache/pear
%dir %{_localstatedir}/lib/pear
%dir %{peardir}
%docdir %{peardir}/doc
%exclude %{_bindir}/peardev
%exclude %{peardir}/doc/PEAR/INSTALL
%exclude %{peardir}/test

%files -n php5-pecl

openSUSE Build Service is sponsored by