php7-pear/php7-pear.spec

86 lines
2.7 KiB
RPMSpec
Raw Normal View History

#
# spec file for package php7-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 https://bugs.opensuse.org/
#
%global peardir %{_datadir}/php7/PEAR
Name: php7-pear
Version: 1.10.17
Release: 0
Summary: PHP Extension and Application Repository
License: BSD-2-Clause
Group: Development/Libraries/PHP
URL: https://pear.php.net/package/pearweb_phars
Source0: https://github.com/pear/pearweb_phars/raw/v%{version}/install-pear-nozlib.phar
Source1: https://github.com/pear/pearweb_phars/raw/v%{version}/install-pear-nozlib.sig#/install-pear-nozlib.phar.sig
Source2: %{name}.keyring
Source3: %{name}.rpmlintrc
BuildRequires: php7
BuildRequires: php7-phar
Provides: php-pear(PEAR) = %{version}
Provides: php-pear = %{version}
Obsoletes: php-pear < %{version}
BuildArch: noarch
%description
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 https://pear.php.net/manual for more details.
%prep
# Empty prep section, nothing to prepare
%build
# Empty build section, nothing to build
%install
export PHP_PEAR_SYSCONF_DIR=%{_sysconfdir}/php7/cli
export PHP_PEAR_SIG_KEYDIR=%{_sysconfdir}/php7/cli/pearkeys
export PHP_PEAR_SIG_BIN=%{_bindir}/gpg
export PHP_PEAR_INSTALL_DIR=%{peardir}
export PHP_PEAR_CACHE_DIR=%{_localstatedir}/cache/pear
export PHP_PEAR_TEMP_DIR=%{_localstatedir}/tmp
export INSTALL_ROOT=%{buildroot}
install -d %{buildroot}%{_localstatedir}/cache/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} \
--download /tmp/pear/download \
--man %{_mandir} \
--metadata %{peardir} \
--temp /tmp/pear/temp \
--www %{peardir}/htdocs
%files
%{_bindir}/*
%config(noreplace) %{_sysconfdir}/php7/cli/pear.conf
%dir %{peardir}
%{peardir}
%dir %{_localstatedir}/cache/pear
%exclude %{_bindir}/peardev
%exclude %{peardir}/{.depdblock,.lock,test}
%changelog