%define modname txforward %define soname %{modname}.so %define inifile A90_%{modname}.ini Summary: Reverse Proxy (web accelerator) PHP compatibility layer Name: php-%{modname} Version: 1.0.7 Release: %mkrel 4 Group: Development/PHP License: PHP License URL: http://fcartegnie.free.fr/patchs/txforward.html Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz Requires(pre): rpm-helper Requires(postun): rpm-helper BuildRequires: php-devel >= 3:5.2.0 BuildRequires: file %description Makes reverse-proxing (web accelerator) totally invisible for php applications. Doesn't require php code modifications to handle X-Forwarded-For IP. * Stills allows proxy-aware applications to work with X-Forwarded headers and proxy IP address. * Should work with any web server * Should work with any proxy server %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//' # lib64 fix perl -p -i -e "s|/lib\b|/%{_lib}|g" *.m4 %build %serverbuild phpize %configure2_5x --with-libdir=%{_lib} \ --enable-%{modname} %make %install rm -rf %{buildroot} install -d %{buildroot}%{_sysconfdir}/php.d install -d %{buildroot}%{_libdir}/php/extensions install -m0755 modules/%{soname} %{buildroot}%{_libdir}/php/extensions/ cat > %{buildroot}%{_sysconfdir}/php.d/%{inifile} << EOF extension = %{soname} [%{modname}] txforward.depth = 4 EOF %clean rm -rf %{buildroot} %files %defattr(-,root,root) %doc package*.xml CREDITS README %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/php.d/%{inifile} %attr(0755,root,root) %{_libdir}/php/extensions/%{soname} %changelog * Wed Jan 30 2013 oden <oden> 1.0.7-4.mga3 + Revision: 393344 - rebuilt for php-5.4.11 * Sun Jan 13 2013 umeabot <umeabot> 1.0.7-3.mga3 + Revision: 377613 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Mon Mar 19 2012 luigiwalser <luigiwalser> 1.0.7-2.mga2 + Revision: 223947 - httpd restart is handled by filetriggers now * Sun Jan 22 2012 spuhler <spuhler> 1.0.7-1.mga2 + Revision: 199834 - upgrade to 1.0.7 * Mon Feb 07 2011 spuhler <spuhler> 1.0.6-13.mga1 + Revision: 48308 - removed buildroot definition from .spec - imported package php-txforward