# For ART-build %define with_atomicscl %{?_with_atomicscl: 1} %{?!_with_atomicscl: 0} %if %{with_atomicscl} %global scl atomic-php53 %define _scl_prefix /opt/atomic #%_scl_root %endif %if 0%{?scl:1} %scl_package php %else %global pkg_name %{name} %global _root_sysconfdir %{_sysconfdir} %global _root_bindir %{_bindir} %global _root_sbindir %{_sbindir} %global _root_includedir %{_includedir} %global _root_libdir %{_libdir} %global _root_prefix %{_prefix} %if 0%{?rhel} < 6 %global _root_initddir /etc %else %global _root_initddir %{_initddir} %endif %endif %global php_apiver %((echo 0; %{_scl_root}/usr/bin/php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1) %global php_extdir %(%{_scl_root}/usr/bin/php-config --extension-dir 2>/dev/null || echo "undefined") %global php_version %(%{_scl_root}/usr/bin/php-config --version 2>/dev/null || echo 0) %define php_name suhosin Summary: Advanced protection system for PHP installations Name: %{?scl_prefix}php-%{php_name} Version: 0.9.36 Release: 1 License: PHP License Group: Development/Languages URL: http://www.hardened-php.net/suhosin/ Source: %{php_name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{php_name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: %{?scl_prefix}php >= %{php_version} BuildRequires: %{?scl_prefix}php-devel, autoconf, automake, libtool, ccache %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 (This is the suhosin extension only). %prep %setup -n %{php_name}-%{version} #%setup -n %{php_name}-master #%{__install} -m 644 -c %{SOURCE1} %{php_name}-%{version}/LICENSE #%{__install} -m 644 -c %{SOURCE1} %{php_name}-%{version}/INSTALL %build #cd stefanesser-suhosin-1fba865 %{_scl_root}/usr/bin/phpize %configure \ --with-php-config=%{_scl_root}/usr/bin/php-config %{__make} %{?_smp_mflags} %install %{__rm} -rf %{buildroot} #cd stefanesser-suhosin-1fba865 %{__make} install INSTALL_ROOT=%{buildroot} # Drop in the bit of configuration %{__mkdir_p} %{buildroot}%{_sysconfdir}/php.d %{__cat} > %{buildroot}%{_sysconfdir}/php.d/%{php_name}.ini << 'EOF' ; Enable suhosin extension module extension=%{php_name}.so EOF %clean %{__rm} -rf %{buildroot} %files %defattr(-, root, root, -) #%doc %{php_name}-%{version}/CREDITS %{php_name}-%{version}/Changelog %config(noreplace) %{_sysconfdir}/php.d/%{php_name}.ini %{php_extdir}/%{php_name}.so %changelog * Mon Oct 12 2015 Scott R. Shinn - 0.9.38-7 - Update to 0.9.38 * Mon Jan 26 2015 Scott R. Shinn - 0.9.37.1-4 - Update to 0.9.37.1 * Fri Jun 27 2014 Scott R. Shinn - 0.9.36-3 - Update to 0.9.36 * Thu Aug 1 2013 Scott R. Shinn - 0.9.33-2 - Merge dev branch 1fba865 from https://github.com/stefanesser/suhosin/ * Wed Feb 14 2012 Scott R. Shinn - 0.9.33-1 - Update to 0.9.33 * Mon Dec 13 2010 Scott R. Shinn - 0.9.32.1-1 - Update to 0.9.32.1 * Fri Dec 18 2009 Scott R. Shinn - 0.9.29-1 - update suhosin to 0.9.29 - relink against php 5.2.12 * Fri Dec 12 2008 Scott R. Shinn - 0.9.27-1 - update to 0.9.27 * Wed Jun 11 2008 Scott R. Shinn - 0.9.24-1 - update to 0.9.24 * Sat Dec 1 2007 Scott R. Shinn - 0.9.22-1 - update to 0.9.22 * Wed Nov 21 2007 Scott R. Shinn - 0.9.20-2 - import into ART, modified for art-build * Fri Jul 27 2007 Johnny Hughes 0.9.20-1.el5.centos - Initial build for CentOS-5 Extras