Sophie

Sophie

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

php-pear-Horde_Constraint-1.0.1-2.mga3.src.rpm

%define upstream_name Horde_Constraint
%define xmldir  %{_var}/lib/pear
%define peardir %(pear config-get php_dir 2> /dev/null)

Name: 		php-pear-%{upstream_name}
Version:     	1.0.1
Release:     	%mkrel 2
Summary:    	Horde Constraint library
License:    	LGPL-2.1
Group:       	Networking/Mail
Url:         	http://pear.horde.org/package/%{upstream_name}
Source0:    	Source0: http://pear.horde.org/get/%{upstream_name}-%{version}.tgz
BuildArch:  	noarch
Requires:    	php-pear
BuildRequires:	php-pear
BuildRequires: 	php-pear-channel-horde
Provides:      	php-pear-Horde_Constraint = %{version}
Obsoletes:	horde-constraint	

%description
This package provides a programmatic way of building constraints that
evaluate to true or false.

%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
rm -rf %{buildroot}
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}/Horde_Constraint.xml

%clean
rm -rf %{buildroot}

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

%postun
if [ "$1" -eq "0" ]; then
    pear uninstall --nodeps --ignore-errors --register-only pear.horde.org/Horde_Constraint
fi

%files
%defattr(-,root,root)
%doc docs/Horde_Constraint/COPYING
%{peardir}/Horde/Constraint.php
%{peardir}/Horde/Constraint/AlwaysFalse.php
%{peardir}/Horde/Constraint/AlwaysTrue.php
%{peardir}/Horde/Constraint/And.php
%{peardir}/Horde/Constraint/Coupler.php
%{peardir}/Horde/Constraint/IsEqual.php
%{peardir}/Horde/Constraint/IsInstanceOf.php
%{peardir}/Horde/Constraint/Not.php
%{peardir}/Horde/Constraint/Null.php
%{peardir}/Horde/Constraint/Or.php
%{peardir}/Horde/Constraint/PregMatch.php
%{peardir}/tests/Horde_Constraint/Horde/Constraint/AllTests.php
%{peardir}/tests/Horde_Constraint/Horde/Constraint/AlwaysFalseTest.php
%{peardir}/tests/Horde_Constraint/Horde/Constraint/AlwaysTrueTest.php
%{peardir}/tests/Horde_Constraint/Horde/Constraint/AndTest.php
%{peardir}/tests/Horde_Constraint/Horde/Constraint/IsInstanceOfTest.php
%{peardir}/tests/Horde_Constraint/Horde/Constraint/NotTest.php
%{peardir}/tests/Horde_Constraint/Horde/Constraint/NullTest.php
%{peardir}/tests/Horde_Constraint/Horde/Constraint/OrTest.php
%{peardir}/tests/Horde_Constraint/Horde/Constraint/PregMatchTest.php
%{xmldir}/Horde_Constraint.xml


%changelog

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

* Mon Nov 28 2011 spuhler <spuhler> 1.0.1-1.mga2
+ Revision: 173299
- added %%doc docs/Horde_Constraint/COPYING
- upgrade to 1.0.1
- changed Provides:php-pear-Horde_Constraint to php-pear-Horde_Constraint = %%{version)
- imported package php-pear-Horde_Constraint