Sophie

Sophie

distrib > Mandriva > 10.2 > i586 > by-pkgid > 276cb3a6bd995a28d2051a879706de66 > files > 3

php-idn-4.3.10_1.1-4mdk.src.rpm

%define version 4.3.10
%define rversion 1.1

%define realname IDN
%define modname idn
%define dirname %{modname}
%define soname %{modname}.so
%define inifile A26_%{modname}.ini
%define mod_src %{modname}.c

Summary:	Provides a interface to GNU Libidn for PHP4
Name:		php-%{modname}
Version:	%{version}_%{rversion}
Release:	%mkrel 4
Group:		System/Servers
License:	GPL
URL:		http://php-idn.bayour.com/
Source0:	%{modname}-%{rversion}.tar.bz2
Patch0:		idn-1.1-lib64.diff.bz2
Requires:	php432
BuildRequires:  php432-devel
BuildRequires:	idn-devel
BuildRoot:	%{_tmppath}/%{name}-root

%description
The %{name} package is a dynamic shared object (DSO) that adds
%{realname} support to PHP. PHP is an HTML-embedded scripting language. 
If you need %{realname} support for PHP applications, you will need to 
install this package in addition to the php package.

Binding to the GNU libidn for using Internationalized Domain Names.

%prep

%setup -q -n idn-%{rversion}
%patch0 -p0

%build

phpize --clean; phpize
%configure2_5x \
    --with-%{modname}=shared,%{_prefix}

%make
mv modules/*.so .
#chrpath -d %{soname}

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

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

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

cat > README.%{modname} <<EOF
The %{name} package contains a dynamic shared object (DSO) for PHP. 
To activate it, make sure a file /etc/php.d/%{inifile} is present and
contains the line 'extension = %{soname}'.
EOF

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

[idn]

idn.allow_unassigned_chars = "0"
idn.default_charset = "ISO-8859-1"
idn.use_std_3_ascii_rules = "0"

EOF

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
[ "../package.xml" != "/" ] && rm -f ../package.xml

%files 
%defattr(-,root,root)
%doc README* entities reference tests CREDITS THANX_TO idn.php
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/php.d/%{inifile}
%attr(0755,root,root) %{_libdir}/php/extensions/%{soname}

%changelog
* Mon Mar 21 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_1.1-4mdk
- use the %%mkrel macro

* Sat Feb 12 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_1.1-3mdk
- rebuilt against a non hardened-php aware php lib

* Sat Jan 15 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_1.1-2mdk
- rebuild due to hardened-php-0.2.6
- cleanups

* Sun Dec 19 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_1.1-1mdk
- 1.1
- added lib64 fixes (P0)

* Thu Dec 16 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_1.0-1mdk
- rebuild for php 4.3.10

* Fri Oct 01 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.9_1.0-1mdk
- rebuild for php 4.3.9

* Sun Aug 08 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.8_1.0-4mdk
- rebuilt against latest libidn

* Sun Aug 01 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.8_1.0-2mdk
- rebuilt against latest libidn

* Wed Jul 14 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.8_1.0-1mdk
- rebuilt for php-4.3.8

* Mon Jul 12 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.7_1.0-2mdk
- remove redundant provides

* Mon Jun 14 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.7-1mdk
- rebuilt for php-4.3.7

* Wed May 26 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.6_1.0-1mdk
- 1.0
- drop P0, it's included

* Tue May 25 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.6_0.9-1mdk
- use the source by Turbo Fredriksson and Simon Josefsson instead
- added P0

* Sun May 23 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.6_0.1-2mdk
- use the %%configure2_5x macro
- move scandir to /etc/php.d

* Wed May 05 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.6_0.1-1mdk
- initial cooker contrib