Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > b8de61d48b25e471d7961f76d98b00ff > files > 1

php-suhosin-0.9.33-1.mga1.src.rpm

%define modname suhosin
%define soname %{modname}.so
%define inifile Z98_%{modname}.ini

Summary:	Suhosin extension module for PHP
Name:		php-%{modname}
Version:	0.9.33
Release:	%mkrel 1
Group:		Development/PHP
License:	PHP License
URL:		http://www.hardened-php.net/suhosin/
Source0:	http://download.suhosin.org/%{modname}-%{version}.tgz
Source1:	http://download.suhosin.org/%{modname}-%{version}.tgz.sig
BuildRequires:	php-devel >= 3:5.2.0


%description
Suhosin is an advanced protection system for PHP installations. It was designed
to protect servers and users from known and unknown flaws in PHP applications
and the PHP core. Suhosin is binary compatible to normal PHP installation,
which means it is compatible to 3rd party binary extension like ZendOptimizer.

%prep

%setup -q -n %{modname}-%{version}

# nuke mac files (duh!)
find -name "\._*" | xargs rm -f

%build
%serverbuild

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

%make
mv modules/*.so %{modname}.so

%install
rm -rf %{buildroot}

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

install -m0755 %{soname} %{buildroot}%{_libdir}/php/extensions/
install -m0644 suhosin.ini %{buildroot}%{_sysconfdir}/php.d/%{inifile}

%post
if [ -f /var/lock/subsys/httpd ]; then
    %{_initrddir}/httpd restart >/dev/null || :
fi

%postun
if [ "$1" = "0" ]; then
    if [ -f /var/lock/subsys/httpd ]; then
	%{_initrddir}/httpd restart >/dev/null || :
    fi
fi

%clean
rm -rf %{buildroot}

%files 
%defattr(-,root,root)
%doc CREDITS tests Changelog
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/php.d/%{inifile}
%attr(0755,root,root) %{_libdir}/php/extensions/%{soname}




%changelog

* Thu May 03 2012 luigiwalser <luigiwalser> 0.9.33-1.mga1
+ Revision: 234673
- 0.9.33

  + spuhler <spuhler>
    - rebuilt for php-5.3.10
    - added security patch, Patch0: suhosin-0.9.32.1-CVE-2011-2483.diff

* Fri Jan 14 2011 spuhler <spuhler> 0.9.32.1-5.mga1
+ Revision: 17232
- imported package php-suhosin