Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > 038480033ceaa39f17b01cbe70d9e4b5 > files > 2

php-pear-System_Command-1.0.8-8.mga9.src.rpm

%define		_class		System
%define		_subclass	Command
%define		upstream_name	%{_class}_%{_subclass}
%define peardir %(pear config-get php_dir 2> /dev/null || echo %{_datadir}/pear)
%define xmldir  /var/lib/pear

Name:		php-pear-%{upstream_name}
Version:	1.0.8
Release:	%mkrel 8
Summary:	System_Command is a commandline execution interface
License:	PHP License
Group:		Development/PHP
URL:		https://pear.php.net/package/System_Command/
Source0: 	https://pear.php.net/get/%{upstream_name}-%{version}.tgz
BuildRequires:	php-pear >= 1.4.7
BuildArch:	noarch


%description
System_Command is a commandline execution interface. Running functions from
the commandline can be risky if the proper precautions are not taken to
escape the shell arguments and reaping the exit status properly. This class
provides a formal interface to both, so that you can run a system command
as comfortably as you would run a php function, with full pear error
handling as results on failure. It is important to note that this class,
unlike other implementations, distinguishes between output to stderr and
output to stdout. It also reports the exit status of the command. So in
every sense of the word, it gives php shell capabilities.

%prep
%setup -c -T
pear -v -c pearrc \
        -d php_dir=%{peardir} \
        -d doc_dir=/docs \
        -d bin_dir=%{_bindir} \
        -d data_dir=%{peardir}/data \
        -d test_dir=%{peardir}/tests \
        -d ext_dir=%{_libdir} \
        -s

%build

%install
pear -c pearrc install --nodeps --packagingroot %{buildroot} %{SOURCE0}
        
# Clean up unnecessary files
rm pearrc
rm %{buildroot}/%{peardir}/.filemap
rm %{buildroot}/%{peardir}/.lock
rm -rf %{buildroot}/%{peardir}/.registry
rm -rf %{buildroot}%{peardir}/.channels
rm %{buildroot}%{peardir}/.depdb
rm %{buildroot}%{peardir}/.depdblock

mv %{buildroot}/docs .


# Install XML package description
mkdir -p %{buildroot}%{xmldir}
tar -xzf %{SOURCE0} package.xml
cp -p package.xml %{buildroot}%{xmldir}/System_Command.xml

%post
pear install --nodeps --soft --force --register-only %{xmldir}/System_Command.xml

%postun
if [ "$1" -eq "0" ]; then
    pear uninstall --nodeps --ignore-errors --register-only pear.php.net/System_Command
fi

%files
%doc docs/System_Command/*
%{peardir}/*
%{xmldir}/System_Command.xml


%changelog
* Tue Mar 22 2022 umeabot <umeabot> 1.0.8-8.mga9
+ Revision: 1818135
- Mageia 9 Mass Rebuild

* Wed Feb 12 2020 umeabot <umeabot> 1.0.8-7.mga8
+ Revision: 1499169
- Mageia 8 Mass Rebuild

* Wed Sep 19 2018 umeabot <umeabot> 1.0.8-6.mga7
+ Revision: 1273987
- Mageia 7 Mass Rebuild

* Wed Feb 03 2016 umeabot <umeabot> 1.0.8-5.mga6
+ Revision: 933395
- Mageia 6 Mass Rebuild

* Wed Oct 15 2014 umeabot <umeabot> 1.0.8-4.mga5
+ Revision: 745983
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 1.0.8-3.mga5
+ Revision: 687479
- Mageia 5 Mass Rebuild

* Sat Oct 19 2013 umeabot <umeabot> 1.0.8-2.mga4
+ Revision: 528333
- Mageia 4 Mass Rebuild

* Mon Jun 17 2013 spuhler <spuhler> 1.0.8-1.mga4
+ Revision: 444203
- upgrade to version 1.0.8
- pearized spec file

* Sun Jan 13 2013 umeabot <umeabot> 1.0.7-2.mga3
+ Revision: 377297
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sat Jan 29 2011 spuhler <spuhler> 1.0.7-1.mga1
+ Revision: 44314
- removed buildroot definition from .spec
  removed the if mdkversion lines
- imported package php-pear-System_Command