Sophie

Sophie

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

php-pear-Date_Holidays-0.21.6-2.mga3.src.rpm

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

Name: 		php-pear-%{upstream_name}
Version:     	0.21.6
Release:     	%mkrel 2
Summary:    	Driver based class to calculate holidays
License: 	PHP License
Group: 		Development/PHP
Source0: 	http://pear.php.net/get/Date_Holidays-%{version}.tgz
URL: 		http://pear.php.net/package/Date_Holidays
BuildRequires: 	php-pear >= 1.4.7
Requires: 	php-pear >= 1.6.0
Requires:	php-pear-Date
Requires:	php-pear-XML_Serializer
BuildArch: 	noarch

%description
Date_Holidays helps you calculate the dates and titles of holidays and
other special celebrations. The calculation is driver-based so it is easy
to add new drivers that calculate a country's holidays. The methods of the
class can be used to get a holiday's date and title in various languages.

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

%clean
rm -rf %{buildroot}

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

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

%files
%defattr(-,root,root)
%doc docs/Date_Holidays/*
%{_bindir}/pear-dh-compile-translationfile
%{_bindir}/pear-dh-ini2xml
%{peardir}/*
%{xmldir}/Date_Holidays.xml


%changelog

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

* Sun Mar 04 2012 spuhler <spuhler> 0.21.6-1.mga2
+ Revision: 217761
- upgrade to 0.21.6
- reversed last change

* Fri Feb 10 2012 pterjan <pterjan> 0.21.5-2.mga2
+ Revision: 206754
- Don't ship the test, they create broken dependencies

* Mon Jan 23 2012 spuhler <spuhler> 0.21.5-1.mga2
+ Revision: 200105
- upgrade to 0.21.5
  pearized spec file

* Tue Mar 15 2011 spuhler <spuhler> 0.21.2-7.mga1
+ Revision: 71930
- reversed last change and fixed it in the Norway package
  increased rel for build

* Sat Mar 12 2011 spuhler <spuhler> 0.21.2-6.mga1
+ Revision: 70222
- removed php-pear-Date_Holidays_Norway as suggest because of a dep bug

* Mon Feb 07 2011 spuhler <spuhler> 0.21.2-5.mga1
+ Revision: 48409
- removed the if mdkversion lines  from spec
  increased rel t 4 for rebuild

* Mon Jan 17 2011 spuhler <spuhler> 0.21.2-4.mga1
+ Revision: 20733
- removed buildroot definition from .spec
  commented the if mdkversion lines
- imported package php-pear-Date_Holidays