%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
%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
%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)