Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > media > main-src > by-pkgid > e36b7620494195f3d87f3fa487095403 > files > 2

php-pear-Date-1.4.3-8mdk.src.rpm

%define		_class		Date
%define		_status		stable
%define		_pearname	%{_class}

Summary:	%{_pearname} - date and time zone classes
Name:		php-pear-%{_pearname}
Version:	1.4.3
Release:	%mkrel 8
License:	PHP License
Group:		Development/Other
Source0:	http://pear.php.net/get/%{_pearname}-%{version}.tar.bz2
URL:		http://pear.php.net/package/Date/
Requires(post): php-pear
Requires(preun): php-pear
Requires:	php-pear
BuildArch:	noarch
BuildRequires:	dos2unix
BuildRoot:	%{_tmppath}/%{name}-%{version}-buildroot

%description
Generic classes for representation and manipulation of dates, times
and time zones without the need of timestamps, which is a huge
limitation for PHP programs. Includes time zone data, time zone
conversions and many date/time conversions. It does not rely on 32-bit
system date stamps, so you can display calendars and compare dates
that date pre 1970 and post 2038. This package also provides a class
to convert date strings between Gregorian and Human calendar formats.

In PEAR status of this package is: %{_status}.

%prep

%setup -q -c

find . -type d -perm 0700 -exec chmod 755 {} \;
find . -type f -perm 0555 -exec chmod 755 {} \;
find . -type f -perm 0444 -exec chmod 644 {} \;

for i in `find . -type d -name CVS` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do
    if [ -e "$i" ]; then rm -rf $i; fi >&/dev/null
done

# strip away annoying ^M
find -type f | grep -v ".gif" | grep -v ".png" | grep -v ".jpg" | xargs dos2unix -U

%install
rm -rf %{buildroot}

install -d %{buildroot}%{_datadir}/pear/%{_class}

install %{_pearname}-%{version}/%{_class}.php %{buildroot}%{_datadir}/pear/
install %{_pearname}-%{version}/%{_class}/*.php %{buildroot}%{_datadir}/pear/%{_class}/

install -d %{buildroot}%{_datadir}/pear/packages
install -m0644 package.xml %{buildroot}%{_datadir}/pear/packages/%{_pearname}.xml

%post
if [ "$1" = "1" ]; then
	if [ -x %{_bindir}/pear -a -f %{_datadir}/pear/packages/%{_pearname}.xml ]; then
		%{_bindir}/pear install --nodeps -r %{_datadir}/pear/packages/%{_pearname}.xml
	fi
fi
if [ "$1" = "2" ]; then
	if [ -x %{_bindir}/pear -a -f %{_datadir}/pear/packages/%{_pearname}.xml ]; then
		%{_bindir}/pear upgrade -f --nodeps -r %{_datadir}/pear/packages/%{_pearname}.xml
	fi
fi

%preun
if [ "$1" = 0 ]; then
	if [ -x %{_bindir}/pear -a -f %{_datadir}/pear/packages/%{_pearname}.xml ]; then
		%{_bindir}/pear uninstall --nodeps -r %{_pearname}
	fi
fi

%clean
rm -rf %{buildroot}

%files
%defattr(644,root,root,755)
%doc %{_pearname}-%{version}/{tests,TODO}
%dir %{_datadir}/pear/%{_class}
%{_datadir}/pear/*.php
%{_datadir}/pear/%{_class}/*.php
%{_datadir}/pear/packages/%{_pearname}.xml

%changelog
* Thu Aug 25 2005 Oden Eriksson <oeriksson@mandriva.com> 1.4.3-8mdk
- rebuilt to fix auto deps

* Tue Aug 09 2005 Oden Eriksson <oeriksson@mandriva.com> 1.4.3-7mdk
- rebuilt to use new pear auto deps/reqs from pld

* Sat Jul 30 2005 Oden Eriksson <oeriksson@mandriva.com> 1.4.3-6mdk
- fix deps

* Wed Jul 20 2005 Oden Eriksson <oeriksson@mandriva.com> 1.4.3-5mdk
- reworked the %%post and %%preun stuff, like in conectiva
- fix deps

* Tue Jul 19 2005 Oden Eriksson <oeriksson@mandriva.com> 1.4.3-4mdk
- fix deps

* Thu Jun 16 2005 Oden Eriksson <oeriksson@mandriva.com> 1.4.3-3mdk
- fix spec file to conform with the others

* Thu Jan 20 2005 Pascal Terjan <pterjan@mandrake.org> 1.4.3-2mdk
- fix pre/post

* Wed Jan 19 2005 Pascal Terjan <pterjan@mandrake.org> 1.4.3-1mdk
- Updated

* Thu Feb 12 2004 Pascal Terjan <pterjan@mandrake.org> 1.4-4mdk
- Own tests/Date

* Sun Jan 04 2004 Pascal Terjan <pterjan@mandrake.org> 1.4-3mdk
- Register the package into pear

* Thu Jan 01 2004 Pascal Terjan <pterjan@mandrake.org> 1.4-2mdk
- Fix directories ownership

* Sun Dec 28 2003 Pascal Terjan <pterjan@mandrake.org> 1.4-1mdk
- First mdk package