Search
j0ke.net Open Build Service
>
Projects
>
internetx
:
php5
:
EL5
>
php-5.2.8
> php.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File php.spec of Package php-5.2.8
%define contentdir /var/www %define apiver 20041225 %define zendver 20060613 %define pdover 20060511 %define _default_patch_fuzz 2 Summary: PHP scripting language for creating dynamic web sites Name: php Version: 5.2.8 Release: 30 License: PHP Group: Development/Languages URL: http://www.php.net/ Source0: http://www.php.net/distributions/php-%{version}.tar.bz2 Source1: php.conf Source2: php.ini Source3: macros.php ##Source4: php-fpm.init ##Source5: php-fpm.conf ##Source6: php-fpm.sysconfig Patch1: php-5.2.6-gnusrc.patch Patch2: php-4.3.3-install.patch Patch3: php-5.2.4-norpath.patch Patch5: php-5.0.2-phpize64.patch Patch8: php-5.2.0-includedir.patch Patch9: php-5.2.4-embed.patch # Fixes for extension modules Patch21: php-5.2.4-odbc.patch Patch22: php-4.3.11-shutdown.patch Patch24: php-5.2.3-macropen.patch # Functional changes Patch30: php-5.0.4-dlopen.patch Patch31: php-5.2.4-easter.patch Patch32: php-5.2.6-systzdata.patch # Fixes for tests Patch50: php-5.2.7-tests-dashn.patch Patch51: php-5.0.4-tests-wddx.patch # ART Patch1000: php-5.2.9-bug46889.patch # CVE Patch70: php-5.2.17-CVE-2011-4885.patch Patch71: php-5.1.6-CVE-2012-0830.patch # PHP-FPM patch ##Patch101: unofficial-php-5.2.9-fpm-0.5.10.diff ##Patch102: php-fpm-config.patch # Patch103: php-fpm-initdir.patch # Patch104: suhosin-patch-5.2.9-0.9.7.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: bzip2-devel, curl-devel >= 7.9, db4-devel, expat-devel BuildRequires: gmp-devel BuildRequires: httpd-devel >= 2.0.46-1, pam-devel BuildRequires: libstdc++-devel, openssl-devel, sqlite-devel >= 3.0.0 BuildRequires: zlib-devel, pcre-devel >= 6.6, mailx, readline-devel BuildRequires: bzip2, perl, libtool >= 1.4.3, gcc-c++ Obsoletes: php-dbg, php3, phpfi, stronghold-php # Enforce Apache module ABI compatibility Requires: httpd-mmn = %(cat %{_includedir}/httpd/.mmn || echo missing-httpd-devel) Provides: mod_php = %{version}-%{release} Requires: php-common = %{version}-%{release} # For backwards-compatibility, require php-cli for the time being: Requires: php-cli = %{version}-%{release} # To ensure correct /var/lib/php/session ownership: Requires(pre): httpd %description PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers to write dynamically generated webpages. PHP also offers built-in database integration for several commercial and non-commercial database management systems, so writing a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding is probably as a replacement for CGI scripts. The php package contains the module which adds support for the PHP language to Apache HTTP Server. %package cli Group: Development/Languages Summary: Command-line interface for PHP Requires: php-common = %{version}-%{release} Provides: php-cgi = %{version}-%{release} Provides: php-pcntl, php-readline %description cli The php-cli package contains the command-line interface executing PHP scripts, /usr/bin/php, and the CGI interface. %package common Group: Development/Languages Summary: Common files for PHP Provides: php-api = %{apiver}, php-zend-abi = %{zendver} Provides: php(api) = %{apiver}, php(zend-abi) = %{zendver} # Provides for all builtin modules: Provides: php-bz2, php-calendar, php-ctype, php-curl, php-date, php-exif Provides: php-ftp, php-gettext, php-gmp, php-hash, php-iconv, php-libxml Provides: php-openssl, php-pcre, php-posix Provides: php-reflection, php-session, php-shmop, php-simplexml, php-sockets Provides: php-spl, php-sysvsem, php-sysvshm, php-sysvmsg, php-tokenizer Provides: php-wddx, php-zlib, php-json, php-zip, php-dbase Obsoletes: php-openssl, php-pecl-zip, php-json, php-dbase %description common The php-common package contains files used by both the php package and the php-cli package. %package devel Group: Development/Libraries Summary: Files needed for building PHP extensions Requires: php = %{version}-%{release}, autoconf, automake Obsoletes: php-pecl-pdo-devel %description devel The php-devel package contains the files needed for building PHP extensions. If you need to compile your own PHP extensions, you will need to install this package. %package imap Summary: A module for PHP applications that use IMAP Group: Development/Languages Requires: php-common = %{version}-%{release} Obsoletes: mod_php3-imap, stronghold-php-imap BuildRequires: krb5-devel, openssl-devel, libc-client-devel %description imap The php-imap package contains a dynamic shared object (DSO) for the Apache Web server. When compiled into Apache, the php-imap module will add IMAP (Internet Message Access Protocol) support to PHP. IMAP is a protocol for retrieving and uploading e-mail messages on mail servers. PHP is an HTML-embedded scripting language. If you need IMAP support for PHP applications, you will need to install this package and the php package. %package ldap Summary: A module for PHP applications that use LDAP Group: Development/Languages Requires: php-common = %{version}-%{release} Obsoletes: mod_php3-ldap, stronghold-php-ldap BuildRequires: cyrus-sasl-devel, openldap-devel, openssl-devel %description ldap The php-ldap package is a dynamic shared object (DSO) for the Apache Web server that adds Lightweight Directory Access Protocol (LDAP) support to PHP. LDAP is a set of protocols for accessing directory services over the Internet. PHP is an HTML-embedded scripting language. If you need LDAP support for PHP applications, you will need to install this package in addition to the php package. %package pdo Summary: A database access abstraction module for PHP applications Group: Development/Languages Requires: php-common = %{version}-%{release} Obsoletes: php-pecl-pdo-sqlite, php-pecl-pdo Provides: php-pdo-abi = %{pdover} %description pdo The php-pdo package contains a dynamic shared object that will add a database access abstraction layer to PHP. This module provides a common interface for accessing MySQL, PostgreSQL or other databases. %package mysql Summary: A module for PHP applications that use MySQL databases Group: Development/Languages Requires: php-common = %{version}-%{release}, php-pdo Provides: php_database, php-mysqli Obsoletes: mod_php3-mysql, stronghold-php-mysql BuildRequires: mysql-devel >= 4.1.0 %description mysql The php-mysql package contains a dynamic shared object that will add MySQL database support to PHP. MySQL is an object-relational database management system. PHP is an HTML-embeddable scripting language. If you need MySQL support for PHP applications, you will need to install this package and the php package. %package pgsql Summary: A PostgreSQL database module for PHP Group: Development/Languages Requires: php-common = %{version}-%{release}, php-pdo Provides: php_database Obsoletes: mod_php3-pgsql, stronghold-php-pgsql BuildRequires: krb5-devel, openssl-devel, postgresql-devel %description pgsql The php-pgsql package includes a dynamic shared object (DSO) that can be compiled in to the Apache Web server to add PostgreSQL database support to PHP. PostgreSQL is an object-relational database management system that supports almost all SQL constructs. PHP is an HTML-embedded scripting language. If you need back-end support for PostgreSQL, you should install this package in addition to the main php package. %package odbc Group: Development/Languages Requires: php-common = %{version}-%{release}, php-pdo Summary: A module for PHP applications that use ODBC databases Provides: php_database Obsoletes: stronghold-php-odbc BuildRequires: unixODBC-devel %description odbc The php-odbc package contains a dynamic shared object that will add database support through ODBC to PHP. ODBC is an open specification which provides a consistent API for developers to use for accessing data sources (which are often, but not always, databases). PHP is an HTML-embeddable scripting language. If you need ODBC support for PHP applications, you will need to install this package and the php package. %package soap Group: Development/Languages Requires: php-common = %{version}-%{release} Summary: A module for PHP applications that use the SOAP protocol BuildRequires: libxml2-devel %description soap The php-soap package contains a dynamic shared object that will add support to PHP for using the SOAP web services protocol. %package snmp Summary: A module for PHP applications that query SNMP-managed devices Group: Development/Languages Requires: php-common = %{version}-%{release}, net-snmp BuildRequires: net-snmp-devel %description snmp The php-snmp package contains a dynamic shared object that will add support for querying SNMP devices to PHP. PHP is an HTML-embeddable scripting language. If you need SNMP support for PHP applications, you will need to install this package and the php package. %package xml Summary: A module for PHP applications which use XML Group: Development/Languages Requires: php-common = %{version}-%{release} Obsoletes: php-domxml, php-dom Provides: php-dom, php-xsl, php-domxml BuildRequires: libxslt-devel >= 1.0.18-1, libxml2-devel >= 2.4.14-1 %description xml The php-xml package contains dynamic shared objects which add support to PHP for manipulating XML documents using the DOM tree, and performing XSL transformations on XML documents. %package xmlrpc Summary: A module for PHP applications which use the XML-RPC protocol Group: Development/Languages Requires: php-common = %{version}-%{release} BuildRequires: expat-devel %description xmlrpc The php-xmlrpc package contains a dynamic shared object that will add support for the XML-RPC protocol to PHP. %package mbstring Summary: A module for PHP applications which need multi-byte string handling Group: Development/Languages Requires: php-common = %{version}-%{release} %description mbstring The php-mbstring package contains a dynamic shared object that will add support for multi-byte string handling to PHP. %package ncurses Summary: A module for PHP applications for using ncurses interfaces Group: Development/Languages Requires: php-common = %{version}-%{release} BuildRequires: ncurses-devel %description ncurses The php-ncurses package contains a dynamic shared object that will add support for using the ncurses terminal output interfaces. %package gd Summary: A module for PHP applications for using the gd graphics library Group: Development/Languages Requires: php-common = %{version}-%{release} # Required to build the bundled GD library BuildRequires: libjpeg-devel, libpng-devel, freetype-devel, t1lib-devel #ART - includedir trick isnt working #BuildRequires: %{_includedir}/X11/xpm.h #BuildRequires: libXpm-devel %if 0%{?el4}%{?fc4} BuildRequires: xorg-x11-devel %else BuildRequires: libXaw-devel %endif %description gd The php-gd package contains a dynamic shared object that will add support for using the gd graphics library to PHP. %package bcmath Summary: A module for PHP applications for using the bcmath library Group: Development/Languages Requires: php-common = %{version}-%{release} %description bcmath The php-bcmath package contains a dynamic shared object that will add support for using the bcmath library to PHP. %package dba Summary: A database abstraction layer module for PHP applications Group: Development/Languages Requires: php-common = %{version}-%{release} %description dba The php-dba package contains a dynamic shared object that will add support for using the DBA database abstraction layer to PHP. %package mcrypt Summary: Standard PHP module provides mcrypt library support Group: Development/Languages Requires: php-common = %{version}-%{release} BuildRequires: libmcrypt-devel %description mcrypt The php-mcrypt package contains a dynamic shared object that will add support for using the mcrypt library to PHP. %package mhash Summary: Standard PHP module provides mhash support Group: Development/Languages Requires: php-common = %{version}-%{release} BuildRequires: mhash-devel %description mhash The php-mhash package contains a dynamic shared object that will add support for using the mhash library to PHP. %package tidy Summary: Standard PHP module provides tidy library support Group: Development/Languages Requires: php-common = %{version}-%{release} BuildRequires: libtidy-devel %description tidy The php-tidy package contains a dynamic shared object that will add support for using the tidy library to PHP. %package mssql Summary: MSSQL database module for PHP Group: Development/Languages Requires: php-common = %{version}-%{release}, php-pdo BuildRequires: freetds-devel %description mssql The php-mssql package contains a dynamic shared object that will add MSSQL database support to PHP. It uses the TDS (Tabular DataStream) protocol through the freetds library, hence any database server which supports TDS can be accessed. %package embedded Summary: PHP library for embedding in applications Group: System Environment/Libraries Requires: php-common = %{version}-%{release} # doing a real -devel package for just the .so symlink is a bit overkill Provides: php-embedded-devel = %{version}-%{release} %description embedded The php-embedded package contains a library which can be embedded into applications to provide PHP scripting language support. %package pspell Summary: A module for PHP applications for using pspell interfaces Group: System Environment/Libraries Requires: php-common = %{version}-%{release} BuildRequires: aspell-devel >= 0.50.0 %description pspell The php-pspell package contains a dynamic shared object that will add support for using the pspell library to PHP. ##%package fpm ##Summary: A module for PHP applications for using php-fpm interfaces ##Group: System Environment/Libraries ##Requires: php-common = %{version}-%{release} ## ##%description fpm ##The php-fpm package contains a php-fpm extention. %prep %setup -q %patch1 -p1 -b .gnusrc %patch2 -p1 -b .install %patch3 -p1 -b .norpath %patch5 -p1 -b .phpize64 %patch8 -p1 -b .includedir %patch9 -p1 -b .embed %patch21 -p1 -b .odbc %patch22 -p1 -b .shutdown %patch24 -p1 -b .macropen %patch30 -p1 -b .dlopen %patch31 -p1 -b .easter %patch32 -p1 -b .systzdata %patch50 -p1 -b .tests-dashn %patch51 -p1 -b .tests-wddx %patch70 -p1 -b .cve2011-4885 %patch71 -p1 -b .cve2012-0830 ##%patch101 -p1 -b .fpm ##%patch102 -p1 -b .fpmfix1 # %patch103 -p1 -b .fpmfix2 # %patch104 -p1 -b .suhosin # ART patches #%patch1000 -p0 # Prevent %%doc confusion over LICENSE files cp Zend/LICENSE Zend/ZEND_LICENSE cp TSRM/LICENSE TSRM_LICENSE cp regex/COPYRIGHT regex_COPYRIGHT cp ext/gd/libgd/README gd_README # Source is built trice: once for /usr/bin/php, once for the Apache DSO # and once for inclusion as embedded script language into other programs mkdir build-cgi build-apache build-embedded # Remove bogus test; position of read position after fopen(, "a+") # is not defined by C standard, so don't presume anything. rm -f ext/standard/tests/file/bug21131.phpt # Tests that fail. rm -f ext/standard/tests/file/bug22414.phpt \ ext/iconv/tests/bug16069.phpt # 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 %build # aclocal workaround - to be improved #cat `aclocal --print-ac-dir`/{libtool,ltoptions,ltsugar,ltversion,lt~obsolete}.m4 >>aclocal.m4 cat `aclocal --print-ac-dir`/libtool.m4 >build/libtool.m4 # Force use of system libtool: libtoolize --force --copy #cat `aclocal --print-ac-dir`/{libtool,ltoptions,ltsugar,ltversion,lt~obsolete}.m4 >build/libtool.m4 2>/dev/null cat `aclocal --print-ac-dir`/libtool.m4 >build/libtool.m4 # Regenerate configure scripts (patches change config.m4's) ./buildconf --force %if 0%{!?el4} CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-pointer-sign" export CFLAGS %endif # Install extension modules in %{_libdir}/php/modules. EXTENSION_DIR=%{_libdir}/php/modules; export EXTENSION_DIR # Set PEAR_INSTALLDIR to ensure that the hard-coded include_path # includes the PEAR directory even though pear is packaged # separately. PEAR_INSTALLDIR=%{_datadir}/pear; export PEAR_INSTALLDIR # Shell function to configure and build a PHP tree. build() { # bison-1.875-2 seems to produce a broken parser; workaround. mkdir Zend && cp ../Zend/zend_{language,ini}_{parser,scanner}.[ch] Zend ln -sf ../configure %configure \ --cache-file=../config.cache \ --with-libdir=%{_lib} \ --with-config-file-path=%{_sysconfdir} \ --with-config-file-scan-dir=%{_sysconfdir}/php.d \ --disable-debug \ --with-pic \ --disable-rpath \ --without-pear \ --with-bz2 \ --with-curl \ --with-exec-dir=%{_bindir} \ --with-freetype-dir=%{_prefix} \ --with-png-dir=%{_prefix} \ --with-xpm-dir=%{_prefix} \ --enable-gd-native-ttf \ --with-t1lib=%{_prefix} \ --without-gdbm \ --with-gettext \ --with-gmp \ --with-iconv \ --with-jpeg-dir=%{_prefix} \ --with-openssl \ --with-png \ --with-expat-dir=%{_prefix} \ --with-pcre-regex=%{_prefix} \ --with-zlib \ --with-layout=GNU \ --enable-exif \ --enable-ftp \ --enable-magic-quotes \ --enable-sockets \ --enable-sysvsem --enable-sysvshm --enable-sysvmsg \ --enable-track-vars \ --enable-trans-sid \ --enable-yp \ --enable-wddx \ --with-kerberos \ --enable-ucd-snmp-hack \ --with-unixODBC=shared,%{_prefix} \ --enable-memory-limit \ --enable-shmop \ --enable-calendar \ --enable-dbx \ --enable-dio \ --without-mime-magic \ --without-sqlite \ --with-libxml-dir=%{_prefix} \ --with-xml \ --with-system-tzdata \ $* if test $? != 0; then tail -500 config.log : configure failed exit 1 fi make %{?_smp_mflags} } # Build /usr/bin/php-cgi with the CGI SAPI, and all the shared extensions pushd build-cgi build --enable-force-cgi-redirect \ --enable-pcntl \ --with-imap=shared --with-imap-ssl \ --enable-mbstring=shared --enable-mbstr-enc-trans \ --enable-mbregex \ --with-ncurses=shared \ --with-gd=shared \ --enable-bcmath=shared \ --enable-dba=shared --with-db4=%{_prefix} \ --with-xmlrpc=shared \ --with-ldap=shared --with-ldap-sasl \ --with-mysql=shared,%{_prefix} \ --with-mysqli=shared,%{_bindir}/mysql_config \ --enable-dom=shared \ --with-dom-xslt=%{_prefix} --with-dom-exslt=%{_prefix} \ --with-pgsql=shared \ --with-snmp=shared,%{_prefix} \ --enable-soap=shared \ --with-xsl=shared,%{_prefix} \ --enable-xmlreader=shared --enable-xmlwriter=shared \ --enable-fastcgi \ --enable-pdo=shared \ --with-pdo-odbc=shared,unixODBC,%{_prefix} \ --with-pdo-mysql=shared,%{_prefix} \ --with-pdo-pgsql=shared,%{_prefix} \ --with-pdo-sqlite=shared,%{_prefix} \ --with-pdo-dblib=shared,%{_prefix} \ --enable-json=shared \ --enable-zip=shared \ --with-readline \ --enable-dbase=shared \ --with-pspell=shared \ --with-mcrypt=shared,%{_prefix} \ --with-mhash=shared,%{_prefix} \ --with-tidy=shared,%{_prefix} \ --with-mssql=shared,%{_prefix} popd without_shared="--without-mysql --without-gd \ --without-odbc --disable-dom \ --disable-dba --without-unixODBC \ --disable-pdo --disable-xmlreader --disable-xmlwriter \ --disable-json --without-pspell" # Build Apache module, and the CLI SAPI, /usr/bin/php pushd build-apache build --with-apxs2=%{_sbindir}/apxs ${without_shared} popd # Build for inclusion as embedded script language into applications, # /usr/lib[64]/libphp5.so pushd build-embedded build --enable-embed ${without_shared} popd %check cd build-apache # Run tests, using the CLI SAPI export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2 unset TZ LANG LC_ALL if ! make test; then set +x for f in `find .. -name \*.diff -type f -print`; do echo "TEST FAILURE: $f --" cat "$f" echo "-- $f result ends." done set -x #exit 1 fi unset NO_INTERACTION REPORT_EXIT_STATUS MALLOC_CHECK_ %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT # Install the version for embedded script language in applications + php_embed.h make -C build-embedded install-sapi install-headers INSTALL_ROOT=$RPM_BUILD_ROOT # Install everything from the CGI SAPI build make -C build-cgi install INSTALL_ROOT=$RPM_BUILD_ROOT # Install the Apache module make -C build-apache install-sapi INSTALL_ROOT=$RPM_BUILD_ROOT # Install the default configuration file and icons install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/ install -m 644 $RPM_SOURCE_DIR/php.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.ini install -m 755 -d $RPM_BUILD_ROOT%{contentdir}/icons install -m 644 *.gif $RPM_BUILD_ROOT%{contentdir}/icons/ # For third-party packaging: install -m 755 -d $RPM_BUILD_ROOT%{_libdir}/php/pear \ $RPM_BUILD_ROOT%{_datadir}/php # install the DSO install -m 755 -d $RPM_BUILD_ROOT%{_libdir}/httpd/modules install -m 755 build-apache/libs/libphp5.so $RPM_BUILD_ROOT%{_libdir}/httpd/modules # Apache config fragment install -m 755 -d $RPM_BUILD_ROOT/etc/httpd/conf.d install -m 644 $RPM_SOURCE_DIR/php.conf $RPM_BUILD_ROOT/etc/httpd/conf.d install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/php.d install -m 755 -d $RPM_BUILD_ROOT%{_localstatedir}/lib/php install -m 700 -d $RPM_BUILD_ROOT%{_localstatedir}/lib/php/session # Generate files lists and stub .ini files for each subpackage for mod in pgsql mysql mysqli odbc ldap snmp xmlrpc imap \ mbstring ncurses gd dom xsl soap bcmath dba xmlreader xmlwriter \ pdo pdo_mysql pdo_pgsql pdo_odbc pdo_sqlite json zip \ dbase mcrypt mhash tidy pdo_dblib mssql pspell; do cat > $RPM_BUILD_ROOT%{_sysconfdir}/php.d/${mod}.ini <<EOF ; Enable ${mod} extension module extension=${mod}.so EOF cat > files.${mod} <<EOF %attr(755,root,root) %{_libdir}/php/modules/${mod}.so %config(noreplace) %attr(644,root,root) %{_sysconfdir}/php.d/${mod}.ini EOF done ##%{__rm} $RPM_BUILD_ROOT%{_sbindir}/php-fpm ##%{__install} -D -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/php-fpm ##%{__install} -D -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.conf ##%{__install} -D -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/php-fpm # The dom, xsl and xml* modules are all packaged in php-xml cat files.dom files.xsl files.xml{reader,writer} > files.xml # The mysql and mysqli modules are both packaged in php-mysql cat files.mysqli >> files.mysql # Split out the PDO modules cat files.pdo_dblib >> files.mssql cat files.pdo_mysql >> files.mysql cat files.pdo_pgsql >> files.pgsql cat files.pdo_odbc >> files.odbc # Package 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 # Package json, dbase and zip in -common. cat files.json files.dbase files.zip > files.common # Install the macros file: install -d $RPM_BUILD_ROOT%{_sysconfdir}/rpm sed -e "s/@PHP_APIVER@/%{apiver}/;s/@PHP_ZENDVER@/%{zendver}/;s/@PHP_PDOVER@/%{pdover}/" \ < $RPM_SOURCE_DIR/macros.php > macros.php install -m 644 -c macros.php \ $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.php # Remove unpackaged files rm -rf $RPM_BUILD_ROOT%{_libdir}/php/modules/*.a \ $RPM_BUILD_ROOT%{_bindir}/{phptar} \ $RPM_BUILD_ROOT%{_datadir}/pear \ $RPM_BUILD_ROOT%{_libdir}/libphp5.la # Remove irrelevant docs rm -f README.{Zeus,QNX,CVS-RULES} %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT rm files.* macros.php %post embedded -p /sbin/ldconfig %postun embedded -p /sbin/ldconfig ##%post fpm ##/sbin/chkconfig --add php-fpm ##%preun fpm ##if [ $1 = 0 ]; then ##/sbin/service php-fpm stop >/dev/null 2>&1 ##/sbin/chkconfig --del php-fpm ##fi %files %defattr(-,root,root) %{_libdir}/httpd/modules/libphp5.so %attr(0770,root,apache) %dir %{_localstatedir}/lib/php/session %config(noreplace) %{_sysconfdir}/httpd/conf.d/php.conf %{contentdir}/icons/php.gif %files common -f files.common %defattr(-,root,root) %doc CODING_STANDARDS CREDITS EXTENSIONS INSTALL LICENSE NEWS README* %doc Zend/ZEND_* TSRM_LICENSE regex_COPYRIGHT %config(noreplace) %{_sysconfdir}/php.ini %dir %{_sysconfdir}/php.d %dir %{_libdir}/php %dir %{_libdir}/php/modules %dir %{_localstatedir}/lib/php %dir %{_libdir}/php/pear %dir %{_datadir}/php %files cli %defattr(-,root,root) %{_bindir}/php %{_bindir}/php-cgi %{_mandir}/man1/php.1* %doc sapi/cgi/README* sapi/cli/README %files devel %defattr(-,root,root) %{_bindir}/php-config %{_bindir}/phpize %{_includedir}/php %{_libdir}/php/build %{_mandir}/man1/php-config.1* %{_mandir}/man1/phpize.1* %config %{_sysconfdir}/rpm/macros.php %files embedded %defattr(-,root,root,-) %{_libdir}/libphp5.so %{_libdir}/libphp5-%{version}.so ##%files fpm ##%defattr(-,root,root,-) ##%config(noreplace) %{_sysconfdir}/php-fpm.conf ##%config(noreplace) %{_sysconfdir}/sysconfig/php-fpm ##%{_sysconfdir}/init.d/php-fpm ##%{_bindir}/php-cgi %files pgsql -f files.pgsql %files mysql -f files.mysql %files odbc -f files.odbc %files imap -f files.imap %files ldap -f files.ldap %files snmp -f files.snmp %files xml -f files.xml %files xmlrpc -f files.xmlrpc %files mbstring -f files.mbstring %files ncurses -f files.ncurses %files gd -f files.gd %doc gd_README %files soap -f files.soap %files bcmath -f files.bcmath %files dba -f files.dba %files pdo -f files.pdo %files mcrypt -f files.mcrypt %files mhash -f files.mhash %files tidy -f files.tidy %files mssql -f files.mssql %files pspell -f files.pspell %changelog * Thu May 06 2010 Carsten Schoene <cs@linux-administrator.com> - 5.2.8-15 - import EL5