Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > f76913845d1abee6167009c22df6ee08 > files > 2

php-pear-Config-1.10.12-2.mga3.src.rpm

%define		_class		Config
%define		upstream_name	%{_class}

Name:		php-pear-%{upstream_name}
Version:	1.10.12
Release:	%mkrel 2
Summary:	Class for reading and writing Config-"files"
License:	PHP License
Group:		Development/PHP
URL:		http://pear.php.net/package/Config/
Source0:	http://download.pear.php.net/package/%{upstream_name}-%{version}.tgz
Requires(post): php-pear
Requires(preun): php-pear
Requires:	php-pear
BuildArch:	noarch
BuildRequires:	php-pear


%description
The Config package provides methods for editing configuration
datasources. It does so in an object oriented manner, defining each
and every items found in the config datasource as a Config_Container
of various types (comments, sections, directives, blanks, ...). Items
can then be edited, added, removed, inserted. This package is not
intended for reading configuration data only, but for editing them. If
you only want to read your configuration data, use functions like
parse_ini_file() and the like instead, they are much faster.

%prep
%setup -q -c
mv package.xml %{upstream_name}-%{version}/%{upstream_name}.xml

%install
rm -rf %{buildroot}

cd %{upstream_name}-%{version}
pear install --nodeps --packagingroot %{buildroot} %{upstream_name}.xml
rm -rf %{buildroot}%{_datadir}/pear/.??*

rm -rf %{buildroot}%{_datadir}/pear/docs
rm -rf %{buildroot}%{_datadir}/pear/tests

install -d %{buildroot}%{_datadir}/pear/packages
install -m 644 %{upstream_name}.xml %{buildroot}%{_datadir}/pear/packages

%clean
rm -rf %{buildroot}

#%post
#%if %mdkversion < 201000
#pear install --nodeps --soft --force --register-only \
#    %{_datadir}/pear/packages/%{upstream_name}.xml >/dev/null || :
#%endif

#%preun
#%if %mdkversion < 201000
#if [ "$1" -eq "0" ]; then
#    pear uninstall --nodeps --ignore-errors --register-only \
#        %{pear_name} >/dev/null || :
#fi
#%endif

%files
%defattr(-,root,root)
%doc %{upstream_name}-%{version}/docs/*
%{_datadir}/pear/%{_class}.php
%{_datadir}/pear/%{_class}
%{_datadir}/pear/packages/%{upstream_name}.xml




%changelog

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

* Mon Jan 17 2011 spuhler <spuhler> 1.10.12-1.mga1
+ Revision: 20675
- removed buildroot definition from .spec
  commented the if mdkversion lines
- imported package php-pear-Config