[packages/php] fix php cli suffix when php_suffix is set

glen glen at pld-linux.org
Thu Jan 17 14:23:01 CET 2013


commit c2d33e29ad925eddfa0bb8ccfcf59de75248460b
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Jan 17 15:22:05 2013 +0200

    fix php cli suffix when php_suffix is set
    
    following 685b9bc99cbb2df55798df9cda9beeb0617110f1

 php.spec | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/php.spec b/php.spec
index e0be840..9dfbad0 100644
--- a/php.spec
+++ b/php.spec
@@ -2457,10 +2457,16 @@ cp -p sapi/embed/php_embed.h $RPM_BUILD_ROOT%{_includedir}/php/sapi/embed
 %endif
 
 # install CLI
-libtool --mode=install install -p sapi/cli/php $RPM_BUILD_ROOT%{_bindir}/php.cli
-cp -p sapi/cli/php.1 $RPM_BUILD_ROOT%{_mandir}/man1/php.1
-echo ".so php.1" >$RPM_BUILD_ROOT%{_mandir}/man1/php.cli.1
-ln -sf php.cli $RPM_BUILD_ROOT%{_bindir}/php
+# without suffix, install as php.cli
+%if "%{?php_suffix}" == ""
+%define	phpfn %{name}.cli
+%else
+%define	phpfn %{name}
+%endif
+libtool --mode=install install -p sapi/cli/php $RPM_BUILD_ROOT%{_bindir}/%{phpfn}
+cp -p sapi/cli/php.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{phpfn}.1
+echo ".so %{phpfn}.1" >$RPM_BUILD_ROOT%{_mandir}/man1/php.1
+ln -sf %{phpfn} $RPM_BUILD_ROOT%{_bindir}/php
 
 cp -p php.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.ini
 
@@ -2721,8 +2727,8 @@ fi
 %defattr(644,root,root,755)
 %dir %{_sysconfdir}/cli.d
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-cli.ini
-%attr(755,root,root) %{_bindir}/php.cli
-%{_mandir}/man1/php.cli.1*
+%attr(755,root,root) %{_bindir}/%{phpfn}
+%{_mandir}/man1/%{phpfn}.1*
 
 %files program
 %defattr(644,root,root,755)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php.git/commitdiff/c2d33e29ad925eddfa0bb8ccfcf59de75248460b



More information about the pld-cvs-commit mailing list