--- /dev/null
+--- php-5.3.17/sapi/litespeed/lsapi_main.c~ 2010-11-20 00:24:12.000000000 +0100
++++ php-5.3.17/sapi/litespeed/lsapi_main.c 2012-09-15 20:58:09.482395102 +0200
+@@ -635,7 +635,7 @@
+ " args... Arguments passed to script.\n";
+ php_output_startup();
+ php_output_activate(TSRMLS_C);
+- php_printf( usage );
++ php_printf( "%s", usage );
+ #ifdef PHP_OUTPUT_NEWAPI
+ php_output_end_all(TSRMLS_C);
+ #else
# http://spot.fedorapeople.org/php-5.3.6-libzip.patch
Patch65: system-libzip.patch
Patch66: %{orgname}-db.patch
+Patch67: php-litespeed.patch
URL: http://www.php.net/
%{?with_interbase:%{!?with_interbase_inst:BuildRequires: Firebird-devel >= 1.0.2.908-2}}
%{?with_pspell:BuildRequires: aspell-devel >= 2:0.50.0}
%patch66 -p1
%{__rm} -r sapi/litespeed
gzip -dc %{SOURCE15} | tar xf - -C sapi/
+%patch67 -p1
sed -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4
# make link relative
ln -sfn phar.phar $RPM_BUILD_ROOT%{_bindir}/phar
+# version suffix
+v=$(echo %{version} | cut -d. -f1-2)
+
# install Apache1 DSO module
%if %{with apache1}
libtool --mode=install install -p sapi/apache/libphp5.la $RPM_BUILD_ROOT%{_libdir}/apache1
-mv $RPM_BUILD_ROOT%{_libdir}/apache1/libphp5{,-%{version}}.so
-ln -s libphp5-%{version}.so $RPM_BUILD_ROOT%{_libdir}/apache1/libphp5.so
+mv $RPM_BUILD_ROOT%{_libdir}/apache1/libphp5{,-$v}.so
+ln -s libphp5-$v.so $RPM_BUILD_ROOT%{_libdir}/apache1/libphp5.so
%endif
# install Apache2 DSO module
%if %{with apache2}
libtool --mode=install install -p sapi/apache2handler/libphp5.la $RPM_BUILD_ROOT%{_libdir}/apache
-mv $RPM_BUILD_ROOT%{_libdir}/apache/libphp5{,-%{version}}.so
-ln -s libphp5-%{version}.so $RPM_BUILD_ROOT%{_libdir}/apache/libphp5.so
+mv $RPM_BUILD_ROOT%{_libdir}/apache/libphp5{,-$v}.so
+ln -s libphp5-$v.so $RPM_BUILD_ROOT%{_libdir}/apache/libphp5.so
%endif
# install litespeed sapi
%dir %{_sysconfdir}/apache.d
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-apache.ini
%attr(755,root,root) %{_libdir}/apache1/libphp5.so
-%attr(755,root,root) %{_libdir}/apache1/libphp5-%{version}.so
+%attr(755,root,root) %{_libdir}/apache1/libphp5-*.*.so
%endif
%if %{with apache2}
%dir %{_sysconfdir}/apache2handler.d
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-apache2handler.ini
%attr(755,root,root) %{_libdir}/apache/libphp5.so
-%attr(755,root,root) %{_libdir}/apache/libphp5-%{version}.so
+%attr(755,root,root) %{_libdir}/apache/libphp5-*.*.so
%endif
%if %{with litespeed}