Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > b44592e54a55b64f3c1dc43f3d5817ee > files > 1

php-timezonedb-2007.11-1.1mdv2008.0.src.rpm

%define modname timezonedb
%define dirname %{modname}
%define soname %{modname}.so
%define inifile A60_%{modname}.ini

Summary:	Timezone Database to be used with PHP's date and time functions
Name:		php-%{modname}
Version:	2007.11
%define		subrel 1
Release:	%mkrel 1
Group:		Development/PHP
License:	PHP License
URL:		http://pecl.php.net/package/timezonedb/
Source0:	http://pecl.php.net/get/%{modname}-%{version}.tgz
BuildRequires:	php-devel >= 3:5.2.1
BuildRequires:	file
BuildRoot:	%{_tmppath}/%{name}-%{version}-buildroot

%description
This extension is a drop-in replacement for the builtin timezone database that
comes with PHP. You should only install this extension in case you need to get
a later version of the timezone database than the one that ships with PHP.

The data that this extension uses comes from the "Olson" database, which is
located at ftp://elsie.nci.nih.gov/pub/.

%prep

%setup -q -n %{modname}-%{version}
[ "../package*.xml" != "/" ] && mv ../package*.xml .

# fix permissions
find . -type f | xargs chmod 644

# strip away annoying ^M
find . -type f|xargs file|grep 'CRLF'|cut -d: -f1|xargs perl -p -i -e 's/\r//'
find . -type f|xargs file|grep 'text'|cut -d: -f1|xargs perl -p -i -e 's/\r//'

%build
%serverbuild

phpize
%configure2_5x --with-libdir=%{_lib} \
    --with-%{modname}=shared,%{_prefix}
%make

mv modules/*.so .

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

install -d %{buildroot}%{_libdir}/php/extensions
install -d %{buildroot}%{_sysconfdir}/php.d/%{modname}

install -m0755 %{soname} %{buildroot}%{_libdir}/php/extensions/

cat > %{buildroot}%{_sysconfdir}/php.d/%{inifile} << EOF
extension = %{soname}
EOF

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files 
%defattr(-,root,root)
%doc CREDITS package*.xml
%dir %{_sysconfdir}/php.d/%{modname}
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/php.d/%{inifile}
%attr(0755,root,root) %{_libdir}/php/extensions/%{soname}


%changelog
* Thu Jan 24 2008 Gustavo De Nardin <gustavodn@mandriva.com> 2007.11-1.1mdv2008.0
+ Revision: 157338
- update to newest version in Cooker, 2007.11

  + Oden Eriksson <oeriksson@mandriva.com>
    - fix #35355 (PHP timezone info update for 2007.1 and 2008.0)

* Sat Sep 01 2007 Oden Eriksson <oeriksson@mandriva.com> 2007.5-4mdv2008.0
+ Revision: 77464
- rebuilt against php-5.2.4

* Thu Aug 16 2007 Oden Eriksson <oeriksson@mandriva.com> 2007.5-3mdv2008.0
+ Revision: 64308
- use the new %%serverbuild macro

* Thu Jun 14 2007 Oden Eriksson <oeriksson@mandriva.com> 2007.5-2mdv2008.0
+ Revision: 39391
- use distro conditional -fstack-protector

* Wed Apr 18 2007 Oden Eriksson <oeriksson@mandriva.com> 2007.5-1mdv2008.0
+ Revision: 14495
- 2007.5


* Wed Mar 07 2007 Oden Eriksson <oeriksson@mandriva.com> 2007.3-1mdv2007.0
+ Revision: 134199
- Import php-timezonedb

* Wed Mar 07 2007 Oden Eriksson <oeriksson@mandriva.com> 2007.3-1mdv2007.1
- initial Mandriva package