diff options
Diffstat (limited to 'php.spec')
-rw-r--r-- | php.spec | 187 |
1 files changed, 117 insertions, 70 deletions
@@ -56,40 +56,39 @@ %endif %global oraclelib 19.1 -# Build for LiteSpeed Web Server (LSAPI) -%global with_lsws 1 +# Build for LiteSpeed Web Server (LSAPI), you can disable using --without tests +%bcond_without lsws # Regression tests take a long time, you can skip 'em with this -%bcond_without tests +%bcond_without tests # Use the arch-specific mysql_config binary to avoid mismatch with the # arch detection heuristic used by bindir/mysql_config. %global mysql_config %{_root_libdir}/mysql/mysql_config -# Optional components; pass "--with mssql" etc to rpmbuild. -%global with_oci8 %{?_with_oci8:1}%{!?_with_oci8:0} -%global with_imap 1 -# until firebird available in EPEL -%if 0%{?rhel} == 8 -%global with_interbase 0 -%else -%global with_interbase 1 -%endif -%global with_freetds 1 -%global with_tidy 1 -%global with_sqlite3 1 -%global with_enchant 1 +# Optional extensions; to enable: pass "--with xxx" etc to rpmbuild/mock. +%bcond_with oci8 +%bcond_with zip +# Optional extensions; to disable: pass "--without xxx" etc to rpmbuild/mock. +%bcond_without imap +%bcond_without firebird +%bcond_without freetds +%bcond_without tidy +%bcond_without sqlite3 +%bcond_without enchant %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -%global with_libpcre 1 +# switch to bundled library using --without libpcre +%bcond_without libpcre %else -%global with_libpcre 0 +# switch to system library using --with libpcre +%bcond_with libpcre %endif -%global with_dtrace 1 +%bcond_without dtrace # build with system libgd (gd-last in remi repo) -%global with_libgd 1 +%bcond_without libgd # httpd 2.4.10 with httpd-filesystem and sethandler support %if 0%{?fedora} >= 21 || 0%{?rhel} >= 8 @@ -98,8 +97,6 @@ %global with_httpd2410 0 %endif -%global with_zip 0 - %global gh_commit 18f2ef094af2b1ad961408fbaf222b9448df2750 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20200615 @@ -112,7 +109,7 @@ Summary: PHP scripting language for creating dynamic web sites Name: %{?scl_prefix}php Version: %{upver}%{?lower:~%{lower}}%{?gh_date:.%{gh_date}} -Release: 32%{?dist} +Release: 33%{?dist} # All files licensed under PHP version 3.01, except # Zend is licensed under Zend # TSRM is licensed under BSD @@ -197,7 +194,7 @@ BuildRequires: pkgconfig(sqlite3) >= 3.7.4 BuildRequires: pkgconfig(zlib) >= 1.2.0.4 BuildRequires: smtpdaemon BuildRequires: pkgconfig(libedit) -%if %{with_libpcre} +%if %{with libpcre} BuildRequires: pkgconfig(libpcre2-8) >= 10.30 %else Provides: bundled(pcre2) = 10.32 @@ -210,7 +207,7 @@ BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?dtsprefix}gcc-c++ BuildRequires: libtool BuildRequires: libtool-ltdl-devel -%if %{with_dtrace} +%if %{with dtrace} BuildRequires: %{?dtsprefix}systemtap-sdt-devel %endif %if 0%{?gh_date} @@ -313,7 +310,7 @@ PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites. -%if %{with_lsws} +%if %{with lsws} %package litespeed Summary: LiteSpeed Web Server PHP support Requires: %{?scl_prefix}php-common%{?_isa} = %{version}-%{release} @@ -396,7 +393,7 @@ Requires: libtool Requires: krb5-devel%{?_isa} Requires: libxml2-devel%{?_isa} Requires: openssl-devel%{?_isa} >= 1.0.1 -%if %{with_libpcre} +%if %{with libpcre} Requires: pcre2-devel%{?_isa} >= 10.30 %endif Requires: zlib-devel%{?_isa} @@ -425,7 +422,7 @@ bytecode in the shared memory. This eliminates the stages of reading code from the disk and compiling it on future access. In addition, it applies a few bytecode optimization patterns that make code execution faster. -%if %{with_imap} +%if %{with imap} %package imap Summary: A module for PHP applications that use IMAP # All files licensed under PHP version 3.01 @@ -465,7 +462,7 @@ Requires: %{?scl_prefix}php-common%{?_isa} = %{version}-%{release} # ABI/API check - Arch specific Provides: %{?scl_prefix}php-pdo-abi = %{pdover}-%{__isa_bits} Provides: %{?scl_prefix}php(pdo-abi) = %{pdover}-%{__isa_bits} -%if %{with_sqlite3} +%if %{with sqlite3} Provides: %{?scl_prefix}php-sqlite3, %{?scl_prefix}php-sqlite3%{?_isa} %endif Provides: %{?scl_prefix}php-pdo_sqlite, %{?scl_prefix}php-pdo_sqlite%{?_isa} @@ -561,7 +558,7 @@ BuildRequires: pkgconfig(libxml-2.0) The %{?scl_prefix}php-soap package contains a dynamic shared object that will add support to PHP for using the SOAP web services protocol. -%if %{with_interbase} +%if %{with firebird} %package pdo-firebird Summary: PDO driver for Interbase/Firebird databases # All files licensed under PHP version 3.01 @@ -586,7 +583,7 @@ Inprise Corp (now known as Borland Software Corp) under the InterBase Public License. %endif -%if %{with_oci8} +%if %{with oci8} %package oci8 Summary: A module for PHP applications that use OCI8 databases # All files licensed under PHP version 3.01 @@ -677,14 +674,14 @@ support for multi-byte string handling to PHP. %package gd Summary: A module for PHP applications for using the gd graphics library # All files licensed under PHP version 3.01 -%if %{with_libgd} +%if %{with libgd} License: PHP %else # bundled libgd is licensed under BSD License: PHP and BSD %endif Requires: %{?scl_prefix}php-common%{?_isa} = %{version}-%{release} -%if %{with_libgd} +%if %{with libgd} BuildRequires: pkgconfig(gdlib) >= 2.1.1 %if 0%{?fedora} <= 19 && 0%{?rhel} <= 7 Requires: gd-last%{?_isa} >= 2.1.1 @@ -742,7 +739,7 @@ Requires: %{?scl_prefix}php-common%{?_isa} = %{version}-%{release} The %{?scl_prefix}php-dba package contains a dynamic shared object that will add support for using the DBA database abstraction layer to PHP. -%if %{with_tidy} +%if %{with tidy} %package tidy Summary: Standard PHP module provides tidy library support # All files licensed under PHP version 3.01 @@ -755,7 +752,7 @@ The %{?scl_prefix}php-tidy package contains a dynamic shared object that will ad support for using the tidy library to PHP. %endif -%if %{with_freetds} +%if %{with freetds} %package pdo-dblib Summary: PDO driver for Microsoft SQL Server and Sybase databases # All files licensed under PHP version 3.01 @@ -794,7 +791,7 @@ BuildRequires: pkgconfig(icu-uc) >= 65 The %{?scl_prefix}php-intl package contains a dynamic shared object that will add support for using the ICU library to PHP. -%if %{with_enchant} +%if %{with enchant} %package enchant Summary: Enchant spelling extension for PHP applications # All files licensed under PHP version 3.0 @@ -807,7 +804,7 @@ The %{?scl_prefix}php-enchant package contains a dynamic shared object that will support for using the enchant library to PHP. %endif -%if %{with_zip} +%if %{with zip} %package zip Summary: ZIP archive management extension for PHP # All files licensed under PHP version 3.0.1 @@ -856,13 +853,57 @@ in pure PHP. %prep +: Building %{name}-%{version}-%{release} +%if %{with lsws} +: With Litespeed SAPI +%endif +%if %{with oci8} +: With Oracle extensions +%endif +%if %{with enchant} +: With Enchant extensions +%endif +%if %{with imap} +: With Imap extensions +%endif +%if %{with firebird} +: With pdo_firebird extension +%endif +%if %{with freetds} +: With pdo_dblib extension +%endif +%if %{with sqlite3} +: With Sqlite3 extension +%endif +%if %{with tidy} +: With Tidy extension +%endif +%if %{with zip} +: With Zip extension +%endif +%if %{with tests} +: Run Test suite +%endif +%if %{with libgd} +: Use System libgd +%else +: Use Bundled libgd +%endif +%if %{with libpcre} +: Use System libpcre +%else +: Use Bundled libpcre +%endif +%if %{with dtrace} +: Enable Dtrace build +%endif + %if 0%{?gh_date} : no gpg check for git snapshot %else %{?gpgverify:%{gpgverify} --keyring='%{SOURCE20}' --signature='%{SOURCE21}' --data='%{SOURCE0}'} %endif -: Building %{name}-%{version}-%{release} with imap=%{with_imap} freetds=%{with_freetds} sqlite3=%{with_sqlite3} tidy=%{with_tidy} zip=%{with_zip} %if 0%{?gh_date} %setup -q -n %{gh_project}-%{gh_commit} %else @@ -1095,7 +1136,7 @@ ln -sf ../configure --without-gdbm \ --with-openssl \ --with-system-ciphers \ -%if %{with_libpcre} +%if %{with libpcre} --with-external-pcre \ %endif --with-zlib \ @@ -1107,7 +1148,7 @@ ln -sf ../configure %endif --with-mhash \ --without-password-argon2 \ -%if %{with_dtrace} +%if %{with dtrace} --enable-dtrace \ %endif $* @@ -1128,13 +1169,13 @@ build --libdir=%{_libdir}/php \ --enable-opcache \ --enable-opcache-file \ --enable-phpdbg \ -%if %{with_imap} +%if %{with imap} --with-imap=shared --with-imap-ssl \ %endif --enable-mbstring=shared \ --enable-mbregex \ --enable-gd=shared \ -%if %{with_libgd} +%if %{with libgd} --with-external-gd \ %else --with-webp \ @@ -1160,11 +1201,11 @@ build --libdir=%{_libdir}/php \ --enable-mysqlnd=shared \ --with-mysqli=shared,mysqlnd \ --with-mysql-sock=%{mysql_sock} \ -%if %{with_oci8} +%if %{with oci8} --with-oci8=shared,instantclient,%{_root_libdir}/oracle/%{oraclever}/client64/lib,%{oraclever} \ --with-pdo-oci=shared,instantclient,%{_root_libdir}/oracle/%{oraclever}/client64/lib,%{oraclever} \ %endif -%if %{with_interbase} +%if %{with firebird} --with-pdo-firebird=shared \ %endif --enable-dom=shared \ @@ -1181,22 +1222,22 @@ build --libdir=%{_libdir}/php \ --with-pdo-mysql=shared,mysqlnd \ --with-pdo-pgsql=shared,%{_root_prefix} \ --with-pdo-sqlite=shared \ -%if %{with_sqlite3} +%if %{with sqlite3} --with-sqlite3=shared \ %else --without-sqlite3 \ %endif -%if %{with_zip} +%if %{with zip} --with-zip=shared \ %endif --without-readline \ --with-libedit \ --with-pspell=shared \ --enable-phar=shared \ -%if %{with_tidy} +%if %{with tidy} --with-tidy=shared,%{_root_prefix} \ %endif -%if %{with_freetds} +%if %{with freetds} --with-pdo-dblib=shared,%{_root_prefix} \ %endif --enable-sysvmsg=shared --enable-sysvshm=shared --enable-sysvsem=shared \ @@ -1204,7 +1245,7 @@ build --libdir=%{_libdir}/php \ --enable-posix=shared \ --with-unixODBC=shared,%{_root_prefix} \ --enable-intl=shared \ -%if %{with_enchant} +%if %{with enchant} --with-enchant=shared \ %endif --enable-fileinfo=shared \ @@ -1231,7 +1272,7 @@ without_shared="--disable-gd \ pushd build-apache build --with-apxs2=%{_httpd_apxs} \ --libdir=%{_libdir}/php \ -%if %{with_lsws} +%if %{with lsws} --enable-litespeed \ %endif --without-mysqli \ @@ -1347,7 +1388,7 @@ install -m 755 -d $RPM_BUILD_ROOT%{_docdir}/pecl install -m 755 -d $RPM_BUILD_ROOT%{_datadir}/tests/pecl %endif -%if %{with_lsws} +%if %{with lsws} install -m 755 build-apache/sapi/litespeed/php $RPM_BUILD_ROOT%{_bindir}/lsphp %endif @@ -1420,7 +1461,7 @@ ln -s %{_bindir}/php $RPM_BUILD_ROOT%{_root_bindir}/%{scl} ln -s %{_bindir}/php-cgi $RPM_BUILD_ROOT%{_root_bindir}/%{scl}-cgi ln -s %{_bindir}/phar.phar $RPM_BUILD_ROOT%{_root_bindir}/%{scl_prefix}phar ln -s %{_bindir}/phpdbg $RPM_BUILD_ROOT%{_root_bindir}/%{scl_prefix}phpdbg -%if %{with_lsws} +%if %{with lsws} ln -s %{_bindir}/lsphp $RPM_BUILD_ROOT%{_root_bindir}/ls%{scl} %endif %endif @@ -1437,38 +1478,38 @@ TESTCMD="$TESTCMD --define extension_dir=$RPM_BUILD_ROOT%{_libdir}/php/modules" # Generate files lists and stub .ini files for each subpackage for mod in pgsql odbc ldap snmp \ mysqlnd mysqli \ -%if %{with_imap} +%if %{with imap} imap \ %endif mbstring gd dom xsl soap bcmath dba \ simplexml bz2 calendar ctype exif ftp gettext gmp iconv \ sockets tokenizer opcache \ pdo \ -%if %{with_sqlite3} +%if %{with sqlite3} sqlite3 \ %endif -%if %{with_enchant} +%if %{with enchant} enchant \ %endif ffi \ phar fileinfo intl \ -%if %{with_tidy} +%if %{with tidy} tidy \ %endif -%if %{with_zip} +%if %{with zip} zip \ %endif sodium \ pspell curl xml \ posix shmop sysvshm sysvsem sysvmsg \ pdo_mysql pdo_pgsql pdo_odbc pdo_sqlite \ -%if %{with_oci8} +%if %{with oci8} oci8 pdo_oci \ %endif -%if %{with_interbase} +%if %{with firebird} pdo_firebird \ %endif -%if %{with_freetds} +%if %{with freetds} pdo_dblib \ %endif xmlreader xmlwriter @@ -1518,7 +1559,7 @@ cat files.mysqli \ # Split out the PDO modules cat files.pdo_pgsql >> files.pgsql cat files.pdo_odbc >> files.odbc -%if %{with_oci8} +%if %{with oci8} cat files.pdo_oci >> files.oci8 %endif @@ -1528,7 +1569,7 @@ cat files.shmop files.sysv* files.posix > files.process # Package sqlite3 and pdo_sqlite with pdo; isolating the sqlite dependency # isn't useful at this time since rpm itself requires sqlite. cat files.pdo_sqlite >> files.pdo -%if %{with_sqlite3} +%if %{with sqlite3} cat files.sqlite3 >> files.pdo %endif @@ -1697,7 +1738,7 @@ fi %dir %{_datadir}/fpm %{_datadir}/fpm/status.html -%if %{with_lsws} +%if %{with lsws} %files litespeed %{_bindir}/lsphp %if 0%{?scl:1} @@ -1718,7 +1759,7 @@ fi %files pgsql -f files.pgsql %files odbc -f files.odbc -%if %{with_imap} +%if %{with imap} %files imap -f files.imap %endif %files ldap -f files.ldap @@ -1733,28 +1774,28 @@ fi %files gmp -f files.gmp %files dba -f files.dba %files pdo -f files.pdo -%if %{with_tidy} +%if %{with tidy} %files tidy -f files.tidy %endif -%if %{with_freetds} +%if %{with freetds} %files pdo-dblib -f files.pdo_dblib %endif %files pspell -f files.pspell %files intl -f files.intl %files process -f files.process -%if %{with_interbase} +%if %{with firebird} %files pdo-firebird -f files.pdo_firebird %endif -%if %{with_enchant} +%if %{with enchant} %files enchant -f files.enchant %endif %files mysqlnd -f files.mysqlnd %files opcache -f files.opcache %config(noreplace) %{_sysconfdir}/php.d/opcache-default.blacklist -%if %{with_oci8} +%if %{with oci8} %files oci8 -f files.oci8 %endif -%if %{with_zip} +%if %{with zip} %files zip -f files.zip %endif %files sodium -f files.sodium @@ -1763,6 +1804,12 @@ fi %changelog +* Thu Sep 17 2020 Remi Collet <remi@remirepo.net> - 8.0.0~beta4-33 +- use %%bcond_without for dtrace, libgd, firebird, lsws, libpcre, imap + tidy, freetds, sqlite3, enchant so can be disabled during rebuild +- use %%bcond_with for libgd, libpcre, oci8, and zip + so can be enabled during rebuild + * Wed Sep 16 2020 Remi Collet <remi@remirepo.net> - 8.0.0~beta4-32 - update to 8.0.0beta4 |