#+ereg
# libxml
# Reflection
-#
+#
# Conditional build:
+%bcond_with default_php # use this PHP as default PHP in distro
%bcond_with interbase_inst # use InterBase install., not Firebird (BR: proprietary libs)
%bcond_with oci8 # with Oracle oci8 extension module (BR: proprietary libs)
%bcond_with instantclient # build Oracle oci8 extension module against oracle-instantclient package
%undefine with_filter
%endif
+%define rel 2
%define orgname php
-%define php_suffix 53
-
-%define rel 1
+%define ver_suffix 53
+%define php_suffix %{!?with_default_php:%{ver_suffix}}
Summary: PHP: Hypertext Preprocessor
Summary(fr.UTF-8): Le langage de script embarque-HTML PHP
Summary(pl.UTF-8): Język skryptowy PHP
%define jsonver 1.2.1
%define pharver 2.0.1
%define sqlitever 2.0-dev
+%define sqlite3ver 0.7-dev
%define zipver 1.11.0
%define zend_zts %{!?with_zts:0}%{?with_zts:1}
Summary(pl.UTF-8): PHP jako interpreter działający z linii poleceń
Group: Development/Languages/PHP
Requires: %{name}-common = %{epoch}:%{version}-%{release}
+Obsoletes: php-program
%description cli
PHP as CLI interpreter.
Ten pakiet zawiera bibliotekę, którą można osadzać w aplikacjach w
celu obsługi PHP jako języka skryptowego.
-%package program
-Summary: /usr/bin/php symlink
-Summary(pl.UTF-8): Dowiązanie symboliczne /usr/bin/php
-Group: Development/Languages/PHP
-Requires: %{name}-cli = %{epoch}:%{version}-%{release}
-Obsoletes: /usr/bin/php
-
-%description program
-Package providing /usr/bin/php symlink to PHP CLI.
-
-%description program -l pl.UTF-8
-Pakiet dostarczający dowiązanie symboliczne /usr/bin/php do PHP CLI.
-
%package fpm
Summary: PHP FastCGI Process Manager
Summary(pl.UTF-8): PHP FastCGI Process Manager - zarządca procesów FastCGI
Group: Libraries
URL: http://php.net/manual/en/book.sqlite3.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
-Provides: php(sqlite3)
+Provides: php(sqlite3) = %{sqlite3ver}
%description sqlite3
SQLite is a C library that implements an embeddable SQL database
: Update the pharver macro and rebuild.
exit 1
fi
+ver=$(sed -n '/#define PHP_SQLITE3_VERSION/{s/.* "//;s/".*$//;p}' ext/sqlite3/php_sqlite3.h)
+if test "$ver" != "%{sqlite3ver}"; then
+ : Error: Upstream Sqlite3 version is now ${ver}, expecting %{sqlite3ver}.
+ : Update the sqlite3ver macro and rebuild.
+ exit 1
+fi
ver=$(sed -n '/#define PHP_ZIP_VERSION_STRING /{s/.* "//;s/".*$//;p}' ext/zip/php_zip.h)
if test "$ver" != "%{zipver}"; then
: Error: Upstream ZIP version is now ${ver}, expecting %{zipver}.
%endif
# install CLI
-# without suffix, install as php.cli
-%if "%{?php_suffix}" == ""
-%define phpfn %{name}.cli
-%else
-%define phpfn %{name}
+# versioned suffix is always installed
+libtool --mode=install install -p sapi/cli/php $RPM_BUILD_ROOT%{_bindir}/php%{ver_suffix}
+cp -p sapi/cli/php.1 $RPM_BUILD_ROOT%{_mandir}/man1/php%{ver_suffix}.1
+
+%if %{with default_php}
+# man for php
+echo ".so php%{ver_suffix}.1" >$RPM_BUILD_ROOT%{_mandir}/man1/php.1
+# link as /usr/bin/php
+ln -sf php%{ver_suffix} $RPM_BUILD_ROOT%{_bindir}/php
+# php.cli link for backward compatibility
+ln -sf php $RPM_BUILD_ROOT%{_bindir}/php.cli
%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}/%{phpfn}
-%{_mandir}/man1/%{phpfn}.1*
-
-%files program
-%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/php%{ver_suffix}
+%{_mandir}/man1/php%{ver_suffix}.1*
+%if %{with default_php}
%attr(755,root,root) %{_bindir}/php
+%attr(755,root,root) %{_bindir}/php.cli
%{_mandir}/man1/php.1*
+%endif
%if %{with fpm}
%files fpm
%files dba
%defattr(644,root,root,755)
+%doc ext/dba/{CREDITS,README}
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/dba.ini
%attr(755,root,root) %{php_extensiondir}/dba.so