Sophie

Sophie

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

php-pear-Calendar-0.5.5-2.mga3.src.rpm

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

Name: 		php-pear-%{upstream_name}
Version:     	0.5.5
Release:     	%mkrel 2
Summary:    	A package for building Calendar data structures (irrespective of output)
License: 	PHP
Group: 		Development/PHP
Source0: 	http://pear.php.net/get/Calendar-%{version}.tgz
URL: 		http://pear.php.net/package/Calendar
BuildRequires:	pear >= 1.4.7
BuildArch: noarch

%description
Calendar provides an API for building Calendar data structures. Using
the simple iterator and it's "query" API, a user interface can easily be
built on top of the calendar data structure, at the same time easily
connecting it
to some kind of underlying data store, where "event" information is
being held.

It provides different calculation "engines" the default being based on
Unix timestamps (offering fastest performance) with an alternative using
PEAR::Date
which extends the calendar past the limitations of Unix timestamps. Other
engines
should be implementable for other types of calendar (e.g. a Chinese
Calendar based
on lunar cycles).

%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}/Calendar.xml

%clean
rm -rf %{buildroot}

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

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

%files
%defattr(-,root,root)
%doc docs/Calendar/*
%{peardir}/*
%{xmldir}/Calendar.xml


%changelog

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

* Thu Jan 12 2012 spuhler <spuhler> 0.5.5-1.mga2
+ Revision: 195172
- upgrade to 0.5.5
  pearized spec

* Sun Jan 30 2011 spuhler <spuhler> 0.5.4-4.mga1
+ Revision: 44603
- removed buildroot definition from .spec
  removed the if mdkversion lines
- imported package php-pear-Calendar