%define _build_pkgcheck_set %{nil} %define _build_pkgcheck_srpm %{nil} # LTO causes a build failure because something forces a linking step of # libphp7_common to barf because libtool foolishly takes -flto out of # compiler flags #define _disable_lto 1 %define build_test 0 %{?_with_test: %{expand: %%global build_test 1}} %{?_without_test: %{expand: %%global build_test 0}} %define build_libmagic 0 %{?_with_libmagic: %{expand: %%global build_libmagic 1}} %{?_without_libmagic: %{expand: %%global build_libmagic 0}} %define php7_common_major 5 %define libname %mklibname php7_common %{php7_common_major} %global __requires_exclude '.*/bin/awk|.*/bin/gawk' # API/ABI check %define apiver 20190902 %define zendver 20190902 %define pdover 20170320 Summary: The PHP7 scripting language Name: php Version: 7.4.33 Release: 7 Source0: http://ch1.php.net/distributions/php-%{version}.tar.gz Source1: macros.php Group: Development/PHP License: PHP License URL: http://www.php.net Source2: maxlifetime Source3: php.crond Source4: php-fpm.service Source5: php-fpm.sysconf Source6: php-fpm.logrotate # S7 comes from ext/fileinfo/create_data_file.php but could be removed someday Source7: create_data_file.php Source9: php-fpm-tmpfiles.conf Source10: php.ini Patch0: php-7.3.4-libtool-2.4.6.patch Patch1: php-shared.diff Patch3: php-7.4.1-missing-symbols.patch Patch4: https://src.fedoraproject.org/rpms/php/raw/master/f/php-7.4.0-phpize.patch Patch5: php-phpbuilddir.diff # http://www.outoforder.cc/projects/apache/mod_transform/ # http://www.outoforder.cc/projects/apache/mod_transform/patches/php7-apache2-filters.patch Patch6: php5-apache2-filters.diff Patch8: php-xmlrpc_epi.patch Patch10: php-7.3.0rc1-compile.patch Patch11: php-5.3.8-bdb-5.2.diff Patch12: php-5.5.6-db-6.0.patch Patch13: php-7.0.1-clang-warnings.patch Patch14: php-7.2.0-visibility.patch ##################################################################### # Stolen from PLD Patch20: php-mail.diff Patch22: php-dba-link.patch Patch23: php-zlib-for-getimagesize.patch # for kolab2 # P50 was rediffed from PLD (php-5.3.3-8.src.rpm) which merges the annotation and status-current patches Patch27: php-imap-annotation+status-current.diff # P51 was taken from http://kolab.org/cgi-bin/viewcvs-kolab.cgi/server/php/patches/php-5.3.2/ Patch28: php-imap-myrights.diff Patch29: php-5.3.x-fpm-0.6.5-shared.diff Patch30: php-5.3.x-fpm-0.6.5-mdv_conf.diff ##################################################################### # stolen from debian Patch50: php-session.save_path.diff ##################################################################### # Stolen from fedora Patch102: php-install.diff Patch105: php-umask.diff # Fixes for extension modules Patch113: php-libc-client.diff Patch114: php-no_pam_in_c-client.diff # Fix bugs Patch121: php-bug43221.diff Patch122: php-not-use-libgd-const.patch # Sauce fixes Patch127: php-7.4.30-svace-fixes.patch Patch128: 0001-Revert-Throw-notice-on-array-access-on-illegal-type.patch Patch200: fix-include-e2k.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: bison BuildRequires: byacc BuildRequires: file BuildRequires: flex BuildRequires: lemon BuildRequires: libtool BuildRequires: openssl BuildRequires: systemd BuildRequires: re2c >= 0.13.4 BuildRequires: pkgconfig(enchant) BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(libpcre) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libwebp) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(libxslt) BuildRequires: pkgconfig(libzip) BuildRequires: pkgconfig(ncurses) BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(uuid) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xpm) BuildRequires: pkgconfig(libxcrypt) BuildRequires: pkgconfig(libpcre2-posix) BuildRequires: pkgconfig(libpcre2-8) BuildRequires: pkgconfig(libpcre2-16) BuildRequires: pkgconfig(libpcre2-32) BuildRequires: pkgconfig(xmlrpc) BuildRequires: apache-devel >= 2.2.0 BuildRequires: aspell-devel BuildRequires: bzip2-devel BuildRequires: c-client-devel >= 2007 BuildRequires: db-devel BuildRequires: elfutils-devel BuildRequires: freetds-devel >= 0.63 BuildRequires: gdbm-devel BuildRequires: gd-devel >= 2.0.33 BuildRequires: gettext-devel BuildRequires: gmp-devel BuildRequires: gpm-devel BuildRequires: icu-devel >= 49.0 BuildRequires: jpeg-devel BuildRequires: openldap-devel BuildRequires: sasl-devel BuildRequires: libtool-devel BuildRequires: mysql-devel >= 4.1.7 BuildRequires: lm_sensors-devel BuildRequires: net-snmp-devel BuildRequires: net-snmp-mibs BuildRequires: onig-devel >= 5.9.2 BuildRequires: pam-devel BuildRequires: postgresql-devel BuildRequires: readline-devel BuildRequires: recode-devel BuildRequires: tidy-devel BuildRequires: unixODBC-devel >= 2.2.1 BuildRequires: xmlrpc-epi-devel %if %{build_libmagic} BuildRequires: magic-devel %endif Epoch: 3 # stupid postgresql... stupid build system... # this is needed due to the postgresql packaging and due to bugs like this: # https://qa.mandriva.com/show_bug.cgi?id=52527 %define postgresql_version %(pg_config &>/dev/null && pg_config 2>/dev/null | grep "^VERSION" | awk '{ print $4 }' 2>/dev/null || echo 0) %description PHP7 is an HTML-embeddable scripting language. PHP7 offers built-in database integration for several commercial and non-commercial database management systems, so writing a database-enabled script with PHP7 is fairly simple. The most common use of PHP7 coding is probably as a replacement for CGI scripts. %package cli Summary: PHP7 CLI interface Group: Development/Other Requires: %{libname} >= %{EVRD} Requires: %{name}-ctype >= %{EVRD} Requires: %{name}-filter >= %{EVRD} Requires: %{name}-ftp >= %{EVRD} Requires: %{name}-gettext >= %{EVRD} Requires: %{name}-ini >= %{version} Requires: %{name}-json >= %{EVRD} Requires: %{name}-openssl >= %{EVRD} Requires: %{name}-posix >= %{EVRD} Requires: %{name}-session >= %{EVRD} # Suggests: %{name}-suhosin >= 0.9.33 Requires: %{name}-sysvsem >= %{EVRD} Requires: %{name}-sysvshm >= %{EVRD} Requires: %{name}-timezonedb >= 3:2009.10 Requires: %{name}-tokenizer >= %{EVRD} Requires: %{name}-xmlreader >= %{EVRD} Requires: %{name}-xmlwriter >= %{EVRD} Requires: %{name}-zlib >= %{EVRD} Requires: %{name}-xml >= %{EVRD} Provides: %{name} = %{EVRD} Provides: /usr/bin/php %description cli PHP7 is an HTML-embeddable scripting language. PHP7 offers built-in database integration for several commercial and non-commercial database management systems, so writing a database-enabled script with PHP7 is fairly simple. The most common use of PHP7 coding is probably as a replacement for CGI scripts. This package contains a command-line (CLI) version of php. You must also install libphp7_common. If you need apache module support, you also need to install the apache-mod_php package. %package dbg Summary: Debugging version of the PHP7 CLI interface Group: Development/Other Requires: %{libname} >= %{EVRD} Requires: %{name}-ctype >= %{EVRD} Requires: %{name}-filter >= %{EVRD} Requires: %{name}-ftp >= %{EVRD} Requires: %{name}-gettext >= %{EVRD} Requires: %{name}-ini >= %{version} Requires: %{name}-json >= %{EVRD} Requires: %{name}-openssl >= %{EVRD} Requires: %{name}-posix >= %{EVRD} Requires: %{name}-session >= %{EVRD} # Suggests: %{name}-suhosin >= 0.9.33 Requires: %{name}-sysvsem >= %{EVRD} Requires: %{name}-sysvshm >= %{EVRD} Requires: %{name}-timezonedb >= 3:2009.10 Requires: %{name}-tokenizer >= %{EVRD} Requires: %{name}-xmlreader >= %{EVRD} Requires: %{name}-xmlwriter >= %{EVRD} Requires: %{name}-zlib >= %{EVRD} Requires: %{name}-xml >= %{EVRD} Provides: %{name} = %{EVRD} %description dbg PHP7 is an HTML-embeddable scripting language. PHP7 offers built-in database integration for several commercial and non-commercial database management systems, so writing a database-enabled script with PHP7 is fairly simple. The most common use of PHP7 coding is probably as a replacement for CGI scripts. This package contains a debugging version of php. You must also install libphp7_common. If you need apache module support, you also need to install the apache-mod_php package. %package cgi Summary: PHP7 CGI interface Group: Development/Other Requires: %{libname} >= %{EVRD} Requires: %{name}-ctype >= %{EVRD} Requires: %{name}-filter >= %{EVRD} Requires: %{name}-ftp >= %{EVRD} Requires: %{name}-gettext >= %{EVRD} Requires: %{name}-ini >= %{version} Requires: %{name}-json >= %{EVRD} Requires: %{name}-openssl >= %{EVRD} Requires: %{name}-posix >= %{EVRD} Requires: %{name}-session >= %{EVRD} # Suggests: %{name}-suhosin >= 0.9.33 Requires: %{name}-sysvsem >= %{EVRD} Requires: %{name}-sysvshm >= %{EVRD} Requires: %{name}-timezonedb >= 3:2009.10 Requires: %{name}-tokenizer >= %{EVRD} Requires: %{name}-xmlreader >= %{EVRD} Requires: %{name}-xmlwriter >= %{EVRD} Requires: %{name}-zlib >= %{EVRD} Requires: %{name}-xml >= %{EVRD} Provides: %{name} = %{EVRD} Provides: %{name}-fcgi = %{EVRD} Obsoletes: %{name}-fcgi < %{EVRD} %description cgi PHP7 is an HTML-embeddable scripting language. PHP7 offers built-in database integration for several commercial and non-commercial database management systems, so writing a database-enabled script with PHP7 is fairly simple. The most common use of PHP7 coding is probably as a replacement for CGI scripts. This package contains a standalone (CGI) version of php with FastCGI support. You must also install libphp7_common. If you need apache module support, you also need to install the apache-mod_php package. %package -n %{libname} Summary: Shared library for PHP7 Group: Development/Other Provides: %{name}-pcre = %{EVRD} Provides: %{name}-simplexml = %{EVRD} Provides: php(api) = %{apiver} Provides: php(zend-abi) = %{zendver} Requires: systemd-units Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units %description -n %{libname} This package provides the common files to run with different implementations of PHP7. You need this package if you install the php standalone package or a webserver with php support (ie: apache-mod_php). %package devel Summary: Development package for PHP7 Group: Development/C Requires: %{libname} >= %{EVRD} Requires: autoconf automake libtool Requires: bison Requires: byacc Requires: chrpath Requires: dos2unix Requires: flex Requires: openssl Requires: re2c >= 0.9.11 Requires: tcl Requires: pam-devel Requires: pkgconfig(libpcre) Requires: pkgconfig(libxml-2.0) Requires: pkgconfig(libxslt) Requires: pkgconfig(openssl) %description devel The php-devel package lets you compile dynamic extensions to PHP7. Included here is the source for the php extensions. Instead of recompiling the whole php binary to add support for, say, oracle, install this package and use the new self-contained extensions support. For more information, read the file SELF-CONTAINED-EXTENSIONS. %package openssl Summary: OpenSSL extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description openssl This is a dynamic shared object (DSO) for PHP that will add OpenSSL support. %package zlib Summary: Zlib extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description zlib This is a dynamic shared object (DSO) for PHP that will add zlib compression support to PHP. %package doc Summary: Documentation for PHP Group: Development/PHP %description doc Documentation for php. %package bcmath Summary: The bcmath module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description bcmath This is a dynamic shared object (DSO) for PHP that will add bc style precision math functions support. For arbitrary precision mathematics PHP offers the Binary Calculator which supports numbers of any size and precision, represented as strings. %package bz2 Summary: Bzip2 extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description bz2 This is a dynamic shared object (DSO) for PHP that will add bzip2 compression support to PHP. The bzip2 functions are used to transparently read and write bzip2 (.bz2) compressed files. %package calendar Summary: Calendar extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description calendar This is a dynamic shared object (DSO) for PHP that will add calendar support. The calendar extension presents a series of functions to simplify converting between different calendar formats. The intermediary or standard it is based on is the Julian Day Count. The Julian Day Count is a count of days starting from January 1st, 4713 B.C. To convert between calendar systems, you must first convert to Julian Day Count, then to the calendar system of your choice. Julian Day Count is very different from the Julian Calendar! For more information on Julian Day Count, visit http://www.hermetic.ch/cal_stud/jdn.htm. For more information on calendar systems visit http://www.boogle.com/info/cal-overview.html. Excerpts from this page are included in these instructions, and are in quotes. %package ctype Summary: Ctype extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description ctype This is a dynamic shared object (DSO) for PHP that will add ctype support. The functions provided by this extension check whether a character or string falls into a certain character class according to the current locale (see also setlocale()). %package curl Summary: Curl extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description curl This is a dynamic shared object (DSO) for PHP that will add curl support. PHP supports libcurl, a library created by Daniel Stenberg, that allows you to connect and communicate to many different types of servers with many different types of protocols. libcurl currently supports the http, https, ftp, gopher, telnet, dict, file, and ldap protocols. libcurl also supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading (this can also be done with PHP's ftp extension), HTTP form based upload, proxies, cookies, and user+password authentication. %package dba Summary: DBA extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description dba This is a dynamic shared object (DSO) for PHP that will add flat-file databases (DBA) support. These functions build the foundation for accessing Berkeley DB style databases. This is a general abstraction layer for several file-based databases. As such, functionality is limited to a common subset of features supported by modern databases such as Sleepycat Software's DB2. (This is not to be confused with IBM's DB2 software, which is supported through the ODBC functions.) %package dom Summary: Dom extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description dom This is a dynamic shared object (DSO) for PHP that will add dom support. The DOM extension is the replacement for the DOM XML extension from PHP 4. The extension still contains many old functions, but they should no longer be used. In particular, functions that are not object-oriented should be avoided. The extension allows you to operate on an XML document with the DOM API. %package enchant Summary: Libenchant binder, support near all spelling tools Group: Development/PHP Requires: %{libname} >= %{EVRD} %description enchant Enchant is a binder for libenchant. Libenchant provides a common API for many spell libraries: - aspell/pspell (intended to replace ispell) - hspell (hebrew) - ispell - myspell (OpenOffice project, mozilla) - uspell (primarily Yiddish, Hebrew, and Eastern European languages) A plugin system allows to add custom spell support. see www.abisource.com/enchant/ %package exif Summary: EXIF extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} Requires: %{name}-mbstring >= %{EVRD} %description exif This is a dynamic shared object (DSO) for PHP that will add EXIF tags support in image files. With the exif extension you are able to work with image meta data. For example, you may use exif functions to read meta data of pictures taken from digital cameras by working with information stored in the headers of the JPEG and TIFF images. %package fileinfo Summary: Fileinfo extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description fileinfo This extension allows retrieval of information regarding vast majority of file. This information may include dimensions, quality, length etc... Additionally it can also be used to retrieve the mime type for a particular file and for text files proper language encoding. %package filter Summary: Extension for safely dealing with input parameters Group: Development/PHP Requires: %{libname} >= %{EVRD} %description filter The Input Filter extension is meant to address this issue by implementing a set of filters and mechanisms that users can use to safely access their input data. %package ftp Summary: FTP extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description ftp This is a dynamic shared object (DSO) for PHP that will add FTP support. The functions in this extension implement client access to file servers speaking the File Transfer Protocol (FTP) as defined in http://www.faqs.org/rfcs/rfc959. This extension is meant for detailed access to an FTP server providing a wide range of control to the executing script. If you only wish to read from or write to a file on an FTP server, consider using the ftp:// wrapper with the filesystem functions which provide a simpler and more intuitive interface. %package gd Summary: GD extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description gd This is a dynamic shared object (DSO) for PHP that will add GD support, allowing you to create and manipulate images with PHP using the gd library. PHP is not limited to creating just HTML output. It can also be used to create and manipulate image files in a variety of different image formats, including gif, png, jpg, wbmp, and xpm. Even more convenient, PHP can output image streams directly to a browser. You will need to compile PHP with the GD library of image functions for this to work. GD and PHP may also require other libraries, depending on which image formats you want to work with. You can use the image functions in PHP to get the size of JPEG, GIF, PNG, SWF, TIFF and JPEG2000 images. %package gettext Summary: Gettext extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description gettext This is a dynamic shared object (DSO) for PHP that will add gettext support. The gettext functions implement an NLS (Native Language Support) API which can be used to internationalize your PHP applications. Please see the gettext documentation for your system for a thorough explanation of these functions or view the docs at http://www.gnu.org/software/gettext/manual/gettext.html. %package gmp Summary: Gmp extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description gmp This is a dynamic shared object (DSO) for PHP that will add arbitrary length number support using the GNU MP library. %package hash Summary: HASH Message Digest Framework Group: Development/PHP Requires: %{libname} >= %{EVRD} %description hash Native implementations of common message digest algorithms using a generic factory method. Message Digest (hash) engine. Allows direct or incremental processing of arbitrary length messages using a variety of hashing algorithms. %package iconv Summary: Iconv extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description iconv This is a dynamic shared object (DSO) for PHP that will add iconv support. This module contains an interface to iconv character set conversion facility. With this module, you can turn a string represented by a local character set into the one represented by another character set, which may be the Unicode character set. Supported character sets depend on the iconv implementation of your system. Note that the iconv function on some systems may not work as you expect. In such case, it'd be a good idea to install the GNU libiconv library. It will most likely end up with more consistent results. %package imap Summary: IMAP extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description imap This is a dynamic shared object (DSO) for PHP that will add IMAP support. These functions are not limited to the IMAP protocol, despite their name. The underlying c-client library also supports NNTP, POP3 and local mailbox access methods. %package intl Summary: Internationalization extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description intl This is a dynamic shared object (DSO) for PHP that will add Internationalization support. Internationalization extension implements ICU library functionality in PHP. %package json Summary: JavaScript Object Notation Group: Development/PHP Requires: %{libname} >= %{EVRD} %description json Support for JSON (JavaScript Object Notation) serialization. %package ldap Summary: LDAP extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description ldap This is a dynamic shared object (DSO) for PHP that will add LDAP support. LDAP is the Lightweight Directory Access Protocol, and is a protocol used to access "Directory Servers". The Directory is a special kind of database that holds information in a tree structure. The concept is similar to your hard disk directory structure, except that in this context, the root directory is "The world" and the first level subdirectories are "countries". Lower levels of the directory structure contain entries for companies, organisations or places, while yet lower still we find directory entries for people, and perhaps equipment or documents. %package mbstring Summary: MBstring extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} # To make it easier to find for e.g. Roundcube requesting php-multibyte Provides: %{name}-multibyte = %{EVRD} %description mbstring This is a dynamic shared object (DSO) for PHP that will add multibyte string support. mbstring provides multibyte specific string functions that help you deal with multibyte encodings in PHP. In addition to that, mbstring handles character encoding conversion between the possible encoding pairs. mbstring is designed to handle Unicode-based encodings such as UTF-8 and UCS-2 and many single-byte encodings for convenience. %package mysqli Summary: MySQL database module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} # mysqlnd must be loaded before mysqli (undefined symbol: mysqlnd_global_stats) Requires: %{name}-mysqlnd = %{EVRD} Provides: %{name}-mysql = %{EVRD} Obsoletes: %{name}-mysql < %{EVRD} %description mysqli This is a dynamic shared object (DSO) for PHP that will add MySQL database support. The mysqli extension allows you to access the functionality provided by MySQL 4.1 and above. It is an improved version of the older PHP MySQL driver, offering various benefits. The developers of the PHP programming language recommend using MySQLi when dealing with MySQL server versions 4.1.3 and newer (takes advantage of new functionality) More information about the MySQL Database server can be found at http://www.mysql.com/ Documentation for MySQL can be found at http://dev.mysql.com/doc/. Documentation for MySQLi can be found at http://www.php.net/manual/en/mysqli.overview.php. %package mysqlnd Summary: MySQL native database module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description mysqlnd This is a dynamic shared object (DSO) for PHP that will add MySQL native database support. These functions allow you to access MySQL database servers. More information about MySQL can be found at http://www.mysql.com/. Documentation for MySQL can be found at http://dev.mysql.com/doc/. %package odbc Summary: ODBC extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description odbc This is a dynamic shared object (DSO) for PHP that will add ODBC support. In addition to normal ODBC support, the Unified ODBC functions in PHP allow you to access several databases that have borrowed the semantics of the ODBC API to implement their own API. Instead of maintaining multiple database drivers that were all nearly identical, these drivers have been unified into a single set of ODBC functions. %package opcache Summary: Opcode cache for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description opcache Opcode cache for PHP %package pcntl Summary: Process Control extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description pcntl This is a dynamic shared object (DSO) for PHP that will add process spawning and control support. It supports functions like fork(), waitpid(), signal() etc. Process Control support in PHP implements the Unix style of process creation, program execution, signal handling and process termination. Process Control should not be enabled within a webserver environment and unexpected results may happen if any Process Control functions are used within a webserver environment. %package pdo Summary: PHP Data Objects Interface Group: Development/PHP Requires: %{libname} >= %{EVRD} Provides: %{name}-pdo-abi = %{pdover} Provides: php(pdo-abi) = %{pdover} %description pdo PDO provides a uniform data access interface, sporting advanced features such as prepared statements and bound parameters. PDO drivers are dynamically loadable and may be developed independently from the core, but still accessed using the same API. Read the documentation at http://www.php.net/pdo for more information. %package pdo_dblib Summary: Sybase Interface driver for PDO Group: Development/PHP Requires: freetds >= 0.63 Requires: %{name}-pdo >= %{EVRD} Requires: %{libname} >= %{EVRD} %description pdo_dblib PDO_DBLIB is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to Microsoft SQL Server and Sybase databases through the FreeTDS libary. %package pdo_mysql Summary: MySQL Interface driver for PDO Group: Development/PHP Requires: %{name}-pdo >= %{EVRD} Requires: %{libname} >= %{EVRD} %description pdo_mysql PDO_MYSQL is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to MySQL 3.x and 4.x databases. PDO_MYSQL will take advantage of native prepared statement support present in MySQL 4.1 and higher. If you're using an older version of the mysql client libraries, PDO will emulate them for you. %package pdo_odbc Summary: ODBC v3 Interface driver for PDO Group: Development/PHP Requires: %{name}-pdo >= %{EVRD} Requires: %{libname} >= %{EVRD} %description pdo_odbc PDO_ODBC is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to databases through ODBC drivers or through the IBM DB2 Call Level Interface (DB2 CLI) library. PDO_ODBC currently supports three different "flavours" of database drivers: o ibm-db2 - Supports access to IBM DB2 Universal Database, Cloudscape, and Apache Derby servers through the free DB2 client. o unixODBC - Supports access to database servers through the unixODBC driver manager and the database's own ODBC drivers. o generic - Offers a compile option for ODBC driver managers that are not explicitly supported by PDO_ODBC. %package pdo_pgsql Summary: PostgreSQL interface driver for PDO Group: Development/PHP Requires: %{name}-pdo >= %{EVRD} Requires: %{libname} >= %{EVRD} Requires: postgresql-libs >= %{postgresql_version} %description pdo_pgsql PDO_PGSQL is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to PostgreSQL databases. %package pdo_sqlite Summary: SQLite v3 Interface driver for PDO Group: Development/PHP Requires: %{name}-pdo >= %{EVRD} Requires: %{libname} >= %{EVRD} %description pdo_sqlite PDO_SQLITE is a driver that implements the PHP Data Objects (PDO) interface to enable access to SQLite 3 databases. This extension provides an SQLite v3 driver for PDO. SQLite V3 is NOT compatible with the bundled SQLite 2 in PHP 7, but is a significant step forwards, featuring complete utf-8 support, native support for blobs, native support for prepared statements with bound parameters and improved concurrency. %package pgsql Summary: PostgreSQL database module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} Requires: postgresql-libs >= %{postgresql_version} %description pgsql This is a dynamic shared object (DSO) for PHP that will add PostgreSQL database support. PostgreSQL database is Open Source product and available without cost. Postgres, developed originally in the UC Berkeley Computer Science Department, pioneered many of the object-relational concepts now becoming available in some commercial databases. It provides SQL92/SQL99 language support, transactions, referential integrity, stored procedures and type extensibility. PostgreSQL is an open source descendant of this original Berkeley code. %package phar Summary: Allows running of complete applications out of .phar files Group: Development/PHP Requires: %{libname} >= %{EVRD} Requires: %{name}-bz2 %description phar This is the extension version of PEAR's PHP_Archive package. Support for zlib, bz2 and crc32 is achieved without any dependency other than the external zlib or bz2 extension. .phar files can be read using the phar stream, or with the Phar class. If the SPL extension is available, a Phar object can be used as an array to iterate over a phar's contents or to read files directly from the phar. Phar archives can be created using the streams API or with the Phar class, if the phar.readonly ini variable is set to false. Full support for MD5 and SHA1 signatures is possible. Signatures can be required if the ini variable phar.require_hash is set to true. When PECL extension hash is avaiable then SHA-256 and SHA-512 signatures are supported as well. %package posix Summary: POSIX extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description posix This is a dynamic shared object (DSO) for PHP that will add POSIX functions support to PHP. This module contains an interface to those functions defined in the IEEE 1003.1 (POSIX.1) standards document which are not accessible through other means. POSIX.1 for example defined the open(), read(), write() and close() functions, too, which traditionally have been part of PHP 3 for a long time. Some more system specific functions have not been available before, though, and this module tries to remedy this by providing easy access to these functions. %package pspell Summary: Pspell extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description pspell This is a dynamic shared object (DSO) for PHP that will add pspell support to PHP. These functions allow you to check the spelling of a word and offer suggestions. %package readline Summary: Readline extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description readline This PHP module adds support for readline functions (only for cli and cgi SAPIs). The readline() functions implement an interface to the GNU Readline library. These are functions that provide editable command lines. An example being the way Bash allows you to use the arrow keys to insert characters or scroll through command history. Because of the interactive nature of this library, it will be of little use for writing Web applications, but may be useful when writing scripts used from a command line. %package recode Summary: Recode extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description recode This is a dynamic shared object (DSO) for PHP that will add recode support using the recode library. This module contains an interface to the GNU Recode library. The GNU Recode library converts files between various coded character sets and surface encodings. When this cannot be achieved exactly, it may get rid of the offending characters or fall back on approximations. The library recognises or produces nearly 150 different character sets and is able to convert files between almost any pair. Most RFC 1345 character sets are supported. %package session Summary: Session extension module for PHP Group: Development/PHP Requires(pre): user(apache) Requires(pre): group(apache) Requires: %{libname} >= %{EVRD} %description session This is a dynamic shared object (DSO) for PHP that will add session support. Session support in PHP consists of a way to preserve certain data across subsequent accesses. This enables you to build more customized applications and increase the appeal of your web site. A visitor accessing your web site is assigned a unique id, the so-called session id. This is either stored in a cookie on the user side or is propagated in the URL. %package shmop Summary: Shared Memory Operations extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description shmop This is a dynamic shared object (DSO) for PHP that will add Shared Memory Operations support. Shmop is an easy to use set of functions that allows PHP to read, write, create and delete Unix shared memory segments. %package snmp Summary: NET-SNMP extension module for PHP Group: Development/PHP Requires: net-snmp-mibs Requires: %{libname} >= %{EVRD} %description snmp This is a dynamic shared object (DSO) for PHP that will add SNMP support using the NET-SNMP libraries. In order to use the SNMP functions you need to install the NET-SNMP package. %package soap Summary: Soap extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description soap This is a dynamic shared object (DSO) for PHP that will add soap support. The SOAP extension can be used to write SOAP Servers and Clients. It supports subsets of SOAP 1.1, SOAP 1.2 and WSDL 1.1 specifications. %package sockets Summary: Sockets extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description sockets This is a dynamic shared object (DSO) for PHP that will add sockets support. The socket extension implements a low-level interface to the socket communication functions based on the popular BSD sockets, providing the possibility to act as a socket server as well as a client. %package sqlite3 Summary: SQLite database bindings for PHP Group: Development/PHP Requires: %{name}-pdo >= %{EVRD} Requires: %{libname} >= %{EVRD} Obsoletes: %name-sqlite < %{EVRD} %description sqlite3 This is an extension for the SQLite Embeddable SQL Database Engine. SQLite is a C library that implements an embeddable SQL database engine. Programs that link with the SQLite library can have SQL database access without running a separate RDBMS process. SQLite is not a client library used to connect to a big database server. SQLite is the server. The SQLite library reads and writes directly to and from the database files on disk. %package sysvmsg Summary: SysV msg extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description sysvmsg This is a dynamic shared object (DSO) for PHP that will add SysV message queues support. %package sysvsem Summary: SysV sem extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description sysvsem This is a dynamic shared object (DSO) for PHP that will add SysV semaphores support. %package sysvshm Summary: SysV shm extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description sysvshm This is a dynamic shared object (DSO) for PHP that will add SysV Shared Memory support. %package tidy Summary: Tidy HTML Repairing and Parsing for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description tidy Tidy is a binding for the Tidy HTML clean and repair utility which allows you to not only clean and otherwise manipluate HTML documents, but also traverse the document tree using the Zend Engine 2 OO semantics. %package tokenizer Summary: Tokenizer extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description tokenizer This is a dynamic shared object (DSO) for PHP that will add Tokenizer support. The tokenizer functions provide an interface to the PHP tokenizer embedded in the Zend Engine. Using these functions you may write your own PHP source analyzing or modification tools without having to deal with the language specification at the lexical level. %package xml Summary: XML extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description xml This is a dynamic shared object (DSO) for PHP that will add XML support. This extension lets you create XML parsers and then define handlers for different XML events. %package xmlreader Summary: Xmlreader extension module for PHP Group: Development/PHP Requires: %{name}-dom Requires: %{libname} >= %{EVRD} %description xmlreader XMLReader represents a reader that provides non-cached, forward-only access to XML data. It is based upon the xmlTextReader api from libxml %package xmlrpc Summary: Xmlrpc extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description xmlrpc This is a dynamic shared object (DSO) for PHP that will add XMLRPC support. These functions can be used to write XML-RPC servers and clients. You can find more information about XML-RPC at http://www.xmlrpc.com/, and more documentation on this extension and its functions at http://xmlrpc-epi.sourceforge.net/. %package xmlwriter Summary: Provides fast, non-cached, forward-only means to write XML data Group: Development/PHP Requires: %{libname} >= %{EVRD} %description xmlwriter This extension wraps the libxml xmlWriter API. Represents a writer that provides a non-cached, forward-only means of generating streams or files containing XML data. %package xsl Summary: Xsl extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} %description xsl This is a dynamic shared object (DSO) for PHP that will add xsl support. The XSL extension implements the XSL standard, performing XSLT transformations using the libxslt library %package zip Summary: A zip management extension for PHP Group: Development/PHP %description zip This is a dynamic shared object (DSO) for PHP that will add zip support to create and read zip files using the libzip library. %package fpm Summary: PHP7 FastCGI Process Manager Group: Development/Other Requires: %{libname} >= %{EVRD} Requires: %{name}-ctype >= %{EVRD} Requires: %{name}-filter >= %{EVRD} Requires: %{name}-ftp >= %{EVRD} Requires: %{name}-gettext >= %{EVRD} Requires: %{name}-ini >= %{version} Requires: %{name}-json >= %{EVRD} Requires: %{name}-openssl >= %{EVRD} Requires: %{name}-posix >= %{EVRD} Requires: %{name}-session >= %{EVRD} # Suggests: %{name}-suhosin >= 0.9.33 Requires: %{name}-sysvsem >= %{EVRD} Requires: %{name}-sysvshm >= %{EVRD} Requires: %{name}-timezonedb >= 3:2009.10 Requires: %{name}-tokenizer >= %{EVRD} Requires: %{name}-xmlreader >= %{EVRD} Requires: %{name}-xmlwriter >= %{EVRD} Requires: %{name}-zlib >= %{EVRD} Requires: %{name}-xml >= %{EVRD} Requires(pre): user(apache) Requires(pre): group(apache) %if %{mdvver} >= 202310 Requires(post): /usr/bin/systemd-tmpfiles %else Requires(post): /bin/systemd-tmpfiles %endif Provides: %{name} = %{EVRD} %description fpm PHP7 is an HTML-embeddable scripting language. PHP7 offers built-in database integration for several commercial and non-commercial database management systems, so writing a database-enabled script with PHP7 is fairly simple. The most common use of PHP7 coding is probably as a replacement for CGI scripts. This package contains the FastCGI Process Manager. You must also install libphp7_common. %package -n apache-mod_php Summary: The PHP HTML-embedded scripting language for use with apache Group: System/Servers Requires: %{libname} = %{EVRD} Requires: apache-base >= 2.4.0 Requires: apache-modules >= 2.4.0 Requires: apache-mpm >= 2.4.0 Requires: %{name}-ctype = %{EVRD} Requires: %{name}-filter = %{EVRD} Requires: %{name}-ftp = %{EVRD} Requires: %{name}-gettext = %{EVRD} Requires: %{name}-ini >= %{version} Requires: %{name}-json = %{EVRD} Requires: %{name}-openssl = %{EVRD} Requires: %{name}-pcre = %{EVRD} Requires: %{name}-posix = %{EVRD} Requires: %{name}-session = %{EVRD} Requires: %{name}-sysvsem = %{EVRD} Requires: %{name}-tokenizer = %{EVRD} Requires: %{name}-xmlreader = %{EVRD} Requires: %{name}-xmlwriter = %{EVRD} Requires: %{name}-zlib = %{EVRD} Requires: %{name}-xml = %{EVRD} Requires: %{name}-timezonedb >= 3:2009.10 # Suggests: %{name}-suhosin >= 0.9.29 Conflicts: %{name}-suhosin < 0.9.29 Conflicts: apache-mpm-worker >= 2.4.0 # mod_php with the event mpm is not an recommended by php devs, but # is (at least somewhat) working. Let's not do a hard conflict. # Conflicts: apache-mpm-event >= 2.4.0 Provides: mod_php = %{EVRD} BuildRequires: dos2unix %description -n apache-mod_php PHP7 is an HTML-embedded scripting language. PHP7 attempts to make it easy for developers to write dynamically generated web pages. PHP7 also offers built-in database integration for several commercial and non-commercial database management systems, so writing a database-enabled web page with PHP7 is fairly simple. The most common use of PHP coding is probably as a replacement for CGI scripts. The %{name} module enables the apache web server to understand and process the embedded PHP language in web pages. This package contains PHP version 7. You'll also need to install the apache web server. %package -n php-ini Summary: INI files for PHP Group: Development/Other %description -n php-ini The php-ini package contains the ini file required for PHP. %prep export LC_ALL=en_US.utf-8 export LANG=en_US.utf-8 export LANGUAGE=en_US.utf-8 export LANGUAGES=en_US.utf-8 %setup -qn %{name}-%{version} # Safety check for API version change. vapi=`sed -n '/#define PHP_API_VERSION/{s/.* //;p}' main/php.h` if test "x${vapi}" != "x%{apiver}"; then : Error: Upstream API version is now ${vapi}, expecting %{apiver}. : Update the apiver macro and rebuild. exit 1 fi vzend=`sed -n '/#define ZEND_MODULE_API_NO/{s/^[^0-9]*//;p;}' Zend/zend_modules.h` if test "x${vzend}" != "x%{zendver}"; then : Error: Upstream Zend ABI version is now ${vzend}, expecting %{zendver}. : Update the zendver macro and rebuild. exit 1 fi # Safety check for PDO ABI version change vpdo=`sed -n '/#define PDO_DRIVER_API/{s/.*[ ]//;p}' ext/pdo/php_pdo_driver.h` if test "x${vpdo}" != "x%{pdover}"; then : Error: Upstream PDO ABI version is now ${vpdo}, expecting %{pdover}. : Update the pdover macro and rebuild. exit 1 fi %if %{build_libmagic} if ! [ -f %{_datadir}/misc/magic.mgc ]; then echo "ERROR: the %{_datadir}/misc/magic.mgc file is needed" exit 1 fi %endif # the ".droplet" suffix is here to nuke the backups later..., we don't want those in php-devel # (same goes for the more common "~" suffix) %patch0 -p1 -b .libtool246~ %patch1 -p1 -b .shared.droplet %patch3 -p1 -b .missingsym~ %patch4 -p1 -b .phpize~ %patch5 -p1 -b .phpbuilddir.droplet %patch6 -p1 -b .apache2-filters.droplet %patch8 -p1 -b .xmlrpc_epi_header %patch10 -p1 -b .compile~ %patch11 -p1 -b .bdb-5.2.droplet %patch12 -p1 -b .db60~ %patch13 -p1 -b .clangwarn~ %patch14 -p1 -b .0014~ ##################################################################### # Stolen from PLD # FIXME needs porting #patch20 -p1 -b .mail.droplet %patch22 -p1 -b .dba-link.droplet %patch23 -p1 -b .zlib-for-getimagesize.droplet # for kolab2 # FIXME needs porting #patch27 -p1 -b .imap-annotation.droplet #patch28 -p1 -b .imap-myrights.droplet # fpm stuff %patch29 -p1 -b .shared-fpm.droplet %patch30 -p1 -b .fpmmdv.droplet ##################################################################### # stolen from debian %patch50 -p1 -b .session.save_path.droplet ##################################################################### # Stolen from fedora %patch102 -p1 -b .install.droplet %patch105 -p1 -b .umask.droplet %patch113 -p1 -b .libc-client-php.droplet %patch114 -p1 -b .no_pam_in_c-client.droplet # upstream fixes %patch121 -p0 -b .bug43221.droplet %patch122 -p1 %patch127 -p1 %patch128 -p1 %ifarch %{e2k} %patch200 -p1 %endif cp %{SOURCE2} maxlifetime cp %{SOURCE3} php.crond cp %{SOURCE4} php-fpm.service cp %{SOURCE5} php-fpm.sysconf cp %{SOURCE6} php-fpm.logrotate cp %{SOURCE7} create_data_file.php # lib64 hack perl -p -i -e "s|/usr/lib|%{_libdir}|" php.crond # nuke bogus checks becuase i fixed this years ago in our recode package rm -f ext/recode/config9.m4 # Change perms otherwise rpm would get fooled while finding requires find -name "*.inc" | xargs chmod 644 find -name "*.php*" | xargs chmod 644 find -name "*README*" | xargs chmod 644 # php7_module -> php_module to ease upgrades find -type f |xargs sed -i -e 's,php7_module,php_module,g' sed -i -e 's,APLOG_USE_MODULE(php7,APLOG_USE_MODULE(php,g' sapi/apache2handler/* mkdir -p php-devel/extensions mkdir -p php-devel/sapi # Install test files in php-devel cp -a tests php-devel cp -dpR ext/* php-devel/extensions/ rm -f php-devel/extensions/informix/stub.c rm -f php-devel/extensions/standard/.deps rm -f php-devel/extensions/skeleton/EXPERIMENTAL # SAPI cp -dpR sapi/* php-devel/sapi/ rm -f php-devel/sapi/thttpd/stub.c rm -f php-devel/sapi/cgi/php.sym rm -f php-devel/sapi/fastcgi/php.sym rm -f php-devel/sapi/pi3web/php.sym # cleanup find php-devel -name "*.droplet" -o -name "*~" | xargs rm -f # don't ship MS Windows source rm -rf php-devel/extensions/com_dotnet # likewise with these: find php-devel -name "*.dsp" | xargs rm -f find php-devel -name "*.mak" | xargs rm -f find php-devel -name "*.w32" | xargs rm # maek sure using system libs rm -rf ext/pcre/pcrelib rm -rf ext/pdo_sqlite/sqlite rm -rf ext/xmlrpc/libxmlrpc # Included ltmain.sh is obsolete and breaks lto rm -f ltmain.sh libtoolize --force aclocal %build %config_update %serverbuild cp -f %{_datadir}/libtool/build-aux/config.* . # it does not work with -fPIE and someone added that to the serverbuild macro... CFLAGS=`echo $CFLAGS|sed -e 's|-fPIE||g'` CXXFLAGS=`echo $CXXFLAGS|sed -e 's|-fPIE||g'` #export CFLAGS="`echo ${CFLAGS} | sed s/O2/O0/` -fPIC -L%{_libdir} -fno-strict-aliasing" export CFLAGS="${CFLAGS} -fPIC -L%{_libdir} -fno-strict-aliasing" export CXXFLAGS="${CFLAGS}" export RPM_OPT_FLAGS="${CFLAGS}" cat > php-devel/buildext < ext/fileinfo/data_file.c rm -rf ext/fileinfo/.libs ext/fileinfo/*.lo ext/fileinfo/*.la modules/fileinfo.so modules/fileinfo.la cp -p ext/fileinfo/data_file.c php-devel/extensions/fileinfo/data_file.c %make CXX=%{__cxx} PHPDBG_EXTRA_LIBS="-lreadline" %endif # make php-cgi cp -af php_config.h.cgi main/php_config.h make -f Makefile.cgi sapi/cgi/php-cgi CXX=%{__cxx} PHPDBG_EXTRA_LIBS="-lreadline" cp -af php_config.h.apxs main/php_config.h # make php-fpm cp -af php_config.h.fpm main/php_config.h make -f Makefile.fpm sapi/fpm/php-fpm CXX=%{__cxx} PHPDBG_EXTRA_LIBS="-lreadline" cp -af php_config.h.apxs main/php_config.h # make apache-mod_php mkdir mod_php cd mod_php cp -dpR ../php-devel/sapi/apache2handler/* . cp ../main/internal_functions.c . cp ../ext/date/lib/timelib_config.h . mv mod_php7.c mod_php.c find . -type f |xargs dos2unix apxs \ `apr-1-config --link-ld --libs` \ `xml2-config --cflags` \ -I. -I.. -I../main -I../Zend -I../TSRM \ -L../libs -lphp7_common \ -c mod_php.c sapi_apache2.c apache_config.c \ php_functions.c internal_functions.c %install install -d %{buildroot}%{_libdir} install -d %{buildroot}%{_bindir} install -d %{buildroot}%{_sysconfdir}/php.d install -d %{buildroot}%{_libdir}/php/extensions install -d %{buildroot}%{_usrsrc}/php-devel install -d %{buildroot}%{_mandir}/man1 install -d %{buildroot}%{_sysconfdir}/cron.d install -d %{buildroot}/var/lib/php make -f Makefile.apxs install \ PHPDBG_EXTRA_LIBS="-lreadline" \ INSTALL_ROOT=%{buildroot} \ INSTALL_IT="\$(LIBTOOL) --mode=install install libphp7_common.la %{buildroot}%{_libdir}/" # borked autopoo rm -f %{buildroot}%{_bindir}/php %{buildroot}%{_bindir}/php-cgi ./libtool --silent --mode=install install sapi/cli/php %{buildroot}%{_bindir}/php ./libtool --silent --mode=install install sapi/cgi/php-cgi %{buildroot}%{_bindir}/php-cgi # compat php-fcgi symink ln -s php-cgi %{buildroot}%{_bindir}/php-fcgi cp -dpR php-devel/* %{buildroot}%{_usrsrc}/php-devel/ install -m0644 run-tests*.php %{buildroot}%{_usrsrc}/php-devel/ install -m0644 main/internal_functions.c %{buildroot}%{_usrsrc}/php-devel/ install -m0644 sapi/cli/php.1 %{buildroot}%{_mandir}/man1/ install -m0644 scripts/man1/phpize.1 %{buildroot}%{_mandir}/man1/ install -m0644 scripts/man1/php-config.1 %{buildroot}%{_mandir}/man1/ # fpm install -d %{buildroot}%{_unitdir} install -d %{buildroot}%{_sysconfdir}/logrotate.d install -d %{buildroot}%{_sysconfdir}/sysconfig install -d %{buildroot}%{_sysconfdir}/php-fpm.d install -d %{buildroot}%{_sbindir} install -d %{buildroot}%{_mandir}/man8 install -d %{buildroot}/var/lib/php-fpm install -d %{buildroot}/var/log/php-fpm install -d %{buildroot}/run/php-fpm install -D -p -m 0644 %{SOURCE9} %{buildroot}%{_tmpfilesdir}/php-fpm.conf # a small bug here... echo "; place your config here" > %{buildroot}%{_sysconfdir}/php-fpm.d/default.conf ./libtool --silent --mode=install install sapi/fpm/php-fpm %{buildroot}%{_sbindir}/php-fpm install -m0644 sapi/fpm/php-fpm.8 %{buildroot}%{_mandir}/man8/ install -m0644 sapi/fpm/php-fpm.conf %{buildroot}%{_sysconfdir}/ install -m0644 php-fpm.service %{buildroot}%{_unitdir}/ install -m0644 php-fpm.sysconf %{buildroot}%{_sysconfdir}/sysconfig/php-fpm install -m0644 php-fpm.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/php-fpm perl -pi -e "s|^pid.*|pid = /run/php-fpm/php-fpm.pid|g" %{buildroot}%{_sysconfdir}/php-fpm.conf ln -snf extensions %{buildroot}%{_usrsrc}/php-devel/ext # extensions echo "extension = openssl.so" > %{buildroot}%{_sysconfdir}/php.d/21_openssl.ini echo "extension = zlib.so" > %{buildroot}%{_sysconfdir}/php.d/21_zlib.ini echo "extension = bcmath.so" > %{buildroot}%{_sysconfdir}/php.d/66_bcmath.ini echo "extension = bz2.so" > %{buildroot}%{_sysconfdir}/php.d/10_bz2.ini echo "extension = calendar.so" > %{buildroot}%{_sysconfdir}/php.d/11_calendar.ini echo "extension = ctype.so" > %{buildroot}%{_sysconfdir}/php.d/12_ctype.ini echo "extension = curl.so" > %{buildroot}%{_sysconfdir}/php.d/13_curl.ini echo "extension = dba.so" > %{buildroot}%{_sysconfdir}/php.d/14_dba.ini echo "extension = dom.so" > %{buildroot}%{_sysconfdir}/php.d/18_dom.ini echo "extension = exif.so" > %{buildroot}%{_sysconfdir}/php.d/19_exif.ini echo "extension = filter.so" > %{buildroot}%{_sysconfdir}/php.d/81_filter.ini echo "extension = ftp.so" > %{buildroot}%{_sysconfdir}/php.d/22_ftp.ini echo "extension = gd.so" > %{buildroot}%{_sysconfdir}/php.d/23_gd.ini echo "extension = gettext.so" > %{buildroot}%{_sysconfdir}/php.d/24_gettext.ini echo "extension = gmp.so" > %{buildroot}%{_sysconfdir}/php.d/25_gmp.ini #echo "extension = hash.so" > %{buildroot}%{_sysconfdir}/php.d/54_hash.ini echo "extension = iconv.so" > %{buildroot}%{_sysconfdir}/php.d/26_iconv.ini echo "extension = imap.so" > %{buildroot}%{_sysconfdir}/php.d/27_imap.ini echo "extension = intl.so" > %{buildroot}%{_sysconfdir}/php.d/27_intl.ini echo "extension = ldap.so" > %{buildroot}%{_sysconfdir}/php.d/28_ldap.ini echo "extension = mbstring.so" > %{buildroot}%{_sysconfdir}/php.d/29_mbstring.ini echo "extension = fileinfo.so" > %{buildroot}%{_sysconfdir}/php.d/32_fileinfo.ini # mysqlnd must be loaded before mysqli (undefined symbol: mysqlnd_global_stats) echo "extension = mysqlnd.so" > %{buildroot}%{_sysconfdir}/php.d/36_mysqlnd.ini echo "extension = mysqli.so" > %{buildroot}%{_sysconfdir}/php.d/37_mysqli.ini echo "extension = enchant.so" > %{buildroot}%{_sysconfdir}/php.d/38_enchant.ini echo "extension = odbc.so" > %{buildroot}%{_sysconfdir}/php.d/39_odbc.ini echo "extension = pcntl.so" > %{buildroot}%{_sysconfdir}/php.d/40_pcntl.ini echo "extension = pdo.so" > %{buildroot}%{_sysconfdir}/php.d/70_pdo.ini echo "extension = pdo_dblib.so" > %{buildroot}%{_sysconfdir}/php.d/71_pdo_dblib.ini echo "extension = pdo_mysql.so" > %{buildroot}%{_sysconfdir}/php.d/73_pdo_mysql.ini echo "extension = pdo_odbc.so" > %{buildroot}%{_sysconfdir}/php.d/75_pdo_odbc.ini echo "extension = pdo_pgsql.so" > %{buildroot}%{_sysconfdir}/php.d/76_pdo_pgsql.ini echo "extension = pdo_sqlite.so" > %{buildroot}%{_sysconfdir}/php.d/77_pdo_sqlite.ini echo "extension = pgsql.so" > %{buildroot}%{_sysconfdir}/php.d/42_pgsql.ini echo "extension = posix.so" > %{buildroot}%{_sysconfdir}/php.d/43_posix.ini echo "extension = pspell.so" > %{buildroot}%{_sysconfdir}/php.d/44_pspell.ini echo "extension = readline.so" > %{buildroot}%{_sysconfdir}/php.d/45_readline.ini #echo "extension = recode.so" > %{buildroot}%{_sysconfdir}/php.d/46_recode.ini echo "extension = session.so" > %{buildroot}%{_sysconfdir}/php.d/47_session.ini echo "extension = shmop.so" > %{buildroot}%{_sysconfdir}/php.d/48_shmop.ini echo "extension = snmp.so" > %{buildroot}%{_sysconfdir}/php.d/50_snmp.ini echo "extension = soap.so" > %{buildroot}%{_sysconfdir}/php.d/51_soap.ini echo "extension = sockets.so" > %{buildroot}%{_sysconfdir}/php.d/52_sockets.ini echo "extension = sqlite3.so" > %{buildroot}%{_sysconfdir}/php.d/78_sqlite3.ini echo "extension = sysvmsg.so" > %{buildroot}%{_sysconfdir}/php.d/56_sysvmsg.ini echo "extension = sysvsem.so" > %{buildroot}%{_sysconfdir}/php.d/57_sysvsem.ini echo "extension = sysvshm.so" > %{buildroot}%{_sysconfdir}/php.d/58_sysvshm.ini echo "extension = tidy.so" > %{buildroot}%{_sysconfdir}/php.d/59_tidy.ini echo "extension = tokenizer.so" > %{buildroot}%{_sysconfdir}/php.d/60_tokenizer.ini echo "extension = xml.so" > %{buildroot}%{_sysconfdir}/php.d/62_xml.ini echo "extension = xmlreader.so" > %{buildroot}%{_sysconfdir}/php.d/63_xmlreader.ini echo "extension = xmlrpc.so" > %{buildroot}%{_sysconfdir}/php.d/62_xmlrpc.ini echo "extension = xmlwriter.so" > %{buildroot}%{_sysconfdir}/php.d/64_xmlwriter.ini echo "extension = xsl.so" > %{buildroot}%{_sysconfdir}/php.d/63_xsl.ini echo "extension = json.so" > %{buildroot}%{_sysconfdir}/php.d/82_json.ini echo "extension = zip.so" > %{buildroot}%{_sysconfdir}/php.d/83_zip.ini echo "extension = phar.so" > %{buildroot}%{_sysconfdir}/php.d/84_phar.ini cat >%{buildroot}%{_sysconfdir}/php.d/85_opcache.ini <<"EOF" zend_extension = %{_libdir}/php/extensions/opcache.so opcache.memory_consumption=128 opcache.interned_strings_buffer=8 opcache.max_accelerated_files=4000 opcache.revalidate_freq=60 opcache.fast_shutdown=1 opcache.enable_cli=1 EOF install -m0755 maxlifetime %{buildroot}%{_libdir}/php/maxlifetime install -m0644 php.crond %{buildroot}%{_sysconfdir}/cron.d/php # mod_php install -d %{buildroot}%{_libdir}/apache install -d %{buildroot}%{_sysconfdir}/httpd/modules.d install -m 755 mod_php/.libs/*.so %{buildroot}%{_libdir}/apache/ cat > %{buildroot}%{_sysconfdir}/httpd/modules.d/170_mod_php.conf << EOF LoadModule php_module %{_libdir}/apache/mod_php.so AddType application/x-httpd-php .php AddType application/x-httpd-php .phtml AddType application/x-httpd-php-source .phps DirectoryIndex index.php index.phtml EOF # phar fixes if [ -L %{buildroot}%{_bindir}/phar ]; then rm -f %{buildroot}%{_bindir}/phar mv %{buildroot}%{_bindir}/phar.phar %{buildroot}%{_bindir}/phar fi # inis install -d -m 755 %{buildroot}%{_sysconfdir}/php.d install -d -m 755 %{buildroot}%{_libdir}/php/extensions install -d -m 755 %{buildroot}%{_datadir}/php sed -e 's,/usr/lib,%{_libdir},g' %{SOURCE10} >%{buildroot}%{_sysconfdir}/php.ini cp %{buildroot}%{_sysconfdir}/php.ini %{buildroot}%{_sysconfdir}/php-cgi-fcgi.ini # house cleaning rm -f %{buildroot}%{_bindir}/pear rm -f %{buildroot}%{_libdir}/*.*a # don't pack useless stuff rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/bcmath rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/bz2 rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/calendar rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/ctype rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/curl rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/dba rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/dom rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/enchant rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/ereg rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/exif rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/fileinfo rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/filter rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/ftp rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/gettext rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/gmp rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/hash rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/iconv rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/imap rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/intl rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/json rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/ldap rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/libxml rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/mbstring rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/mysql rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/mysqli rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/mysqlnd rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/odbc rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/openssl rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/pcntl rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/pcre rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/pdo rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/pdo_dblib rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/pdo_mysql rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/pdo_odbc rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/pdo_pgsql rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/pdo_sqlite rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/pgsql rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/phar rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/posix rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/pspell rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/readline rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/recode rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/shmop rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/snmp rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/soap rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/sockets rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/spl rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/sqlite rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/sqlite3 rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/standard rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/sysvmsg rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/sysvsem rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/sysvshm rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/tidy rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/tokenizer rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/xml rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/xmlreader rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/xmlrpc rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/xmlwriter rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/xsl rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/zip rm -rf %{buildroot}%{_usrsrc}/php-devel/extensions/zlib # php-devel.i586: E: zero-length /usr/src/php-devel/extensions/pdo_firebird/EXPERIMENTAL find %{buildroot}%{_usrsrc}/php-devel -type f -size 0 -exec rm -f {} \; mkdir -p %{buildroot}%{_sysconfdir}/rpm/macros.d/ # Install the macros file: sed -e "s/@PHP_APIVER@/%{apiver}/" \ -e "s/@PHP_ZENDVER@/%{zendver}/g" \ -e "s/@PHP_PDOVER@/%{pdover}/" \ -e "s/@PHP_VERSION@/%{version}/" \ < %{SOURCE1} > macros.php %install_macro %{name} macros.php # update libtool.m4 file cp -f %{_datadir}/aclocal/libtool.m4 %{buildroot}%{_libdir}/php/build cat %{_datadir}/aclocal/ltoptions.m4 %{_datadir}/aclocal/ltversion.m4 \ %{_datadir}/aclocal/ltsugar.m4 %{_datadir}/aclocal/lt~obsolete.m4 >> %{buildroot}%{_libdir}/php/build/libtool.m4 %if %{build_test} # do a make test export NO_INTERACTION=1 export PHPRC="." export REPORT_EXIT_STATUS=2 export TEST_PHP_DETAILED=0 export TEST_PHP_ERROR_STYLE=EMACS export TEST_PHP_LOG_FORMAT=LEODC export PHP_INI_SCAN_DIR=/dev/null # FAILING TESTS: # unknown errors with ext/date/tests/oo_002.phpt probably because of php-5.2.5-systzdata.patch # http://bugs.php.net/bug.php?id=22414 (claimed to be fixed in 2003, but seems not) # unknown errors with ext/standard/tests/general_functions/phpinfo.phpt # unknown errors with ext/standard/tests/strings/setlocale_* disable_tests="ext/date/tests/oo_002.phpt \ ext/standard/tests/file/bug22414.phpt \ ext/standard/tests/general_functions/phpinfo.phpt \ ext/standard/tests/strings/setlocale_basic1.phpt \ ext/standard/tests/strings/setlocale_basic2.phpt \ ext/standard/tests/strings/setlocale_basic3.phpt \ ext/standard/tests/strings/setlocale_variation1.phpt \ ext/standard/tests/strings/setlocale_variation3.phpt \ ext/standard/tests/strings/setlocale_variation4.phpt \ ext/standard/tests/strings/setlocale_variation5.phpt" [[ -n "$disable_tests" ]] && \ for f in $disable_tests; do [[ -f "$f" ]] && mv $f $f.disabled done cat >php-test.ini <>php-test.ini ;; xsl.so) # Unresolved symbols, need fixing ;; # ctype.so|dom.so|openssl.so|zlib.so|ftp.so|gettext.so|posix.so|session.so|hash.so|sysvsem.so|sysvshm.so|tokenizer.so|xml.so|xmlreader.so|xmlwriter.so|filter.so|json.so) # Apparently loaded by default without a need to mention them in the ini file # ;; *) echo extension=$B >>php-test.ini ;; esac done cat >>php-test.ini <