From: Marcin Krol Date: Fri, 10 May 2013 14:27:50 +0000 (+0000) Subject: - fix php cli packaging with no php suffix defined X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=48dab252e0b71cafcbe1989bb25bc5c855d8bde9;p=packages%2Fphp.git - fix php cli packaging with no php suffix defined --- diff --git a/php.spec b/php.spec index 1dc5514..51f72dd 100644 --- a/php.spec +++ b/php.spec @@ -126,7 +126,7 @@ ERROR: You need to select at least one Apache SAPI to build shared modules. %define orgname php %define php_suffix %{nil} -%define rel 2 +%define rel 3 Summary: PHP: Hypertext Preprocessor Summary(fr.UTF-8): Le langage de script embarque-HTML PHP Summary(pl.UTF-8): Język skryptowy PHP @@ -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}/%{name} -cp -p sapi/cli/php.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1 -echo ".so %{name}.1" >$RPM_BUILD_ROOT%{_mandir}/man1/php.1 -ln -sf %{name} $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 @@ -2722,8 +2728,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}/%{name} -%{_mandir}/man1/%{name}.1* +%attr(755,root,root) %{_bindir}/%{phpfn} +%{_mandir}/man1/%{phpfn}.1* %files program %defattr(644,root,root,755)