%define contentdir /var/www Summary: The PHP HTML-embedded scripting language Name: php Version: 5.5.5 Release: 1 License: The PHP License v3.01 Group: Development/Languages URL: http://www.php.net/ Source0: http://www.php.net/distributions/%{name}-%{version}.tar.bz2 Source1: %{name}.conf Source2: %{name}.ini Patch0: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: make BuildRequires: bzip2 >= 1.0.2-4 BuildRequires: curl-devel >= 7.19.7 BuildRequires: gd-devel >= 2.0.35 BuildRequires: httpd-devel >= 2.4.1-3 BuildRequires: httpd-devel < 2.5 BuildRequires: libiconv >= 1.14-2 BuildRequires: libmcrypt-devel >= 2.5.8-2 BuildRequires: libtool-ltdl-devel >= 1.5.26-1 BuildRequires: libxml2-devel >= 2.7.8-3 BuildRequires: libXpm-devel >= 3.5.7 BuildRequires: openldap-devel >= 2.4.23 BuildRequires: openssl-devel >= 1.0.1 BuildRequires: pcre-devel >= 7.9-2 BuildRequires: t1lib-devel >= 5.1.2-1 BuildRequires: zlib-devel >= 1.2.3-3 %description Dummy description to satisfy RPM. %package -n mod_php_ap24 Summary: The PHP HTML-embedded scripting language module for Apache V2.4.X Group: Development/Languages Requires: %{name}-common = %{version}-%{release} Requires: bzip2 >= 1.0.2-4 Requires: curl >= 7.19.7-1 Requires: gd >= 2.0.35 Requires: httpd >= 2.4.1-3 Requires: httpd < 2.5 Requires: libiconv >= 1.14-2 Requires: libmcrypt >= 2.5.8-2 Requires: libtool-ltdl >= 1.5.26-1 Requires: libxml2 >= 2.7.8-3 Requires: libXpm >= 3.5.7 Requires: openldap >= 2.4.23 Requires: openssl >= 1.0.1 Requires: pcre >= 7.9-2 Requires: t1lib >= 5.1.2-1 Requires: zlib >= 1.2.3-3 Provides: mod_php = %{version}-%{release} Provides: php = %{version}-%{release} %description -n mod_php_ap24 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 mod_php_ap24 package contains the module which adds support for the PHP language to Apache HTTP Server V2.4.X. %prep %setup -q %patch0 %build export CC="xlc_r" # install extension modules in %{_libdir}/php/modules. export EXTENSION_DIR=%{_libdir}/php/modules # shell function to configure and build a PHP tree buildphp() { ln -sf ../configure ./configure \ --cache-file=../config.cache \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --with-config-file-path=%{_sysconfdir} \ --with-config-file-scan-dir=%{_sysconfdir}/php.d \ --disable-debug \ --enable-shared --enable-static \ --without-pear \ --with-gd \ --with-openssl=%{_prefix} \ --with-zlib \ --with-bz2 \ --with-curl=%{_prefix} \ --with-t1lib=%{_prefix} \ --with-freetype-dir=%{_prefix} \ --with-jpeg-dir=%{_prefix} \ --with-ldap=%{_prefix} \ --with-png-dir=%{_prefix} \ --with-xpm-dir=%{_prefix} \ --with-zlib-dir=%{_prefix} \ --enable-pdo \ --enable-zip \ --enable-soap \ --enable-bcmath \ --enable-ftp \ --enable-sockets \ --with-iconv \ --with-iconv-dir=%{_prefix} \ --enable-mbstring \ --with-mcrypt=%{_prefix} \ --with-mysqli=mysqlnd \ --enable-dom \ --enable-json \ --with-pcre-regex=%{_prefix} \ $* # required since PHP V5.4.0, check out https://bugs.php.net/bug.php?id=61751 cat Makefile | \ sed 's|PHP_CLI_OBJS =|PHP_CLI_OBJS = $(PHP_BINARY_OBJS) |g' | \ sed 's|PHP_CGI_OBJS =|PHP_CGI_OBJS = main/internal_functions.lo |g' \ > Makefile.tmp mv -f Makefile.tmp Makefile gmake %{?_smp_mflags} } # build the Apache module thread-safe mkdir build-apache cd build-apache # for Apache 2.2: --with-apxs2=%{_sbindir}/apxs # for Apache 2.4: --with-apxs2=%{_bindir}/apxs buildphp \ --with-apxs2=%{_bindir}/apxs \ --enable-maintainer-zts cd .. %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} # install the DSO cd build-apache mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/httpd/modules chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/httpd/modules cp .libs/libphp5.so ${RPM_BUILD_ROOT}%{_libdir}/httpd/modules chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/httpd/modules/libphp5.so cd .. # strip binaries /usr/bin/strip ${RPM_BUILD_ROOT}%{_libdir}/httpd/modules/libphp5.so # install the Apache httpd config file for PHP mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra chmod 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra cp %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra/httpd-php.conf chmod 644 ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra/httpd-php.conf # install the default icons mkdir -p ${RPM_BUILD_ROOT}%{contentdir}/icons chmod 755 ${RPM_BUILD_ROOT}%{contentdir}/icons cp php.gif ${RPM_BUILD_ROOT}%{contentdir}/icons # for third-party packaging: mkdir -p ${RPM_BUILD_ROOT}/var/lib/php chmod 755 ${RPM_BUILD_ROOT}/var/lib/php mkdir -p ${RPM_BUILD_ROOT}/var/lib/php/session chmod 700 ${RPM_BUILD_ROOT}/var/lib/php/session %preun -n mod_php_ap24 if [ "$1" = 0 ]; then cat %{_sysconfdir}/httpd/conf/httpd.conf | \ grep -v "# PHP settings" | \ grep -v "Include conf/extra/httpd-php.conf" \ > %{_sysconfdir}/httpd/conf/tmp_httpd.conf mv -f %{_sysconfdir}/httpd/conf/tmp_httpd.conf %{_sysconfdir}/httpd/conf/httpd.conf echo "Please restart your web server using: '/opt/freeware/sbin/apachectl restart'" fi %post -n mod_php_ap24 cat %{_sysconfdir}/httpd/conf/httpd.conf | \ grep -v "# PHP settings" | \ grep -v "Include conf/extra/httpd-php.conf" \ > %{_sysconfdir}/httpd/conf/tmp_httpd.conf mv -f %{_sysconfdir}/httpd/conf/tmp_httpd.conf %{_sysconfdir}/httpd/conf/httpd.conf echo "# PHP settings" >> %{_sysconfdir}/httpd/conf/httpd.conf echo "Include conf/extra/httpd-php.conf" >> %{_sysconfdir}/httpd/conf/httpd.conf echo "Please restart your web server using: '/opt/freeware/sbin/apachectl restart'" %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files -n mod_php_ap24 %defattr(-,root,system) %{_libdir}/httpd/modules/libphp5.so %attr(0770,root,apache) %dir /var/lib/php/session %config(noreplace) %{_sysconfdir}/httpd/conf/extra/httpd-php.conf %{contentdir}/icons/php.gif %changelog * Wed Oct 23 2013 Michael Perzl - 5.5.5-1 - updated to version 5.5.5 * Wed Oct 09 2013 Michael Perzl - 5.5.4-1 - updated to version 5.5.4 * Wed Oct 09 2013 Michael Perzl - 5.5.3-1 - updated to version 5.5.3 * Wed Oct 09 2013 Michael Perzl - 5.5.2-1 - updated to version 5.5.2 * Wed Oct 09 2013 Michael Perzl - 5.5.1-2 - enabled '--enable-pdo'' option * Tue Jul 23 2013 Michael Perzl - 5.5.1-1 - updated to version 5.5.1 * Mon Jun 24 2013 Michael Perzl - 5.5.0-1 - updated to version 5.5.0 * Thu Jun 20 2013 Michael Perzl - 5.4.16-1 - updated to version 5.4.16 * Fri May 24 2013 Michael Perzl - 5.4.15-1 - updated to version 5.4.15 * Mon Apr 15 2013 Michael Perzl - 5.4.14-1 - updated to version 5.4.14 * Mon Apr 15 2013 Michael Perzl - 5.4.14-1 - updated to version 5.4.14 * Mon Mar 18 2013 Michael Perzl - 5.4.13-1 - updated to version 5.4.13 * Mon Feb 25 2013 Michael Perzl - 5.4.12-1 - updated to version 5.4.12 * Wed Jan 23 2013 Michael Perzl - 5.4.11-1 - updated to version 5.4.11 * Tue Jan 08 2013 Michael Perzl - 5.4.10-1 - updated to version 5.4.10 * Tue Dec 18 2012 Michael Perzl - 5.4.9-2 - enabled Zip read/write support - changed OpenSSL dependency to latest version to avoid version mismatches * Thu Dec 06 2012 Michael Perzl - 5.4.9-1 - added LDAP support and thus introduced a dependency on openldap - updated to version 5.4.9 * Fri Nov 23 2012 Michael Perzl - 5.4.8-2 - fixed wrong dependency on libbz2.so * Fri Nov 16 2012 Michael Perzl - 5.4.8-1 - updated to version 5.4.8 * Mon Sep 17 2012 Michael Perzl - 5.4.7-1 - updated to version 5.4.7 * Tue Aug 28 2012 Michael Perzl - 5.4.6-1 - updated to version 5.4.6 * Tue Aug 28 2012 Michael Perzl - 5.4.5-1 - updated to version 5.4.5 * Tue Aug 28 2012 Michael Perzl - 5.4.4-1 - updated to version 5.4.4 * Tue Aug 28 2012 Michael Perzl - 5.4.3-2 - restructured package to better adapt to different Apache (httpd) versions * Mon Jun 04 2012 Michael Perzl - 5.4.3-1 - updated to version 5.4.3 - removed dependency on external GD library as PHP can only be compiled with the packaged (and modified) GD library * Tue Apr 03 2012 Michael Perzl - 5.3.10-2 - enabled multibyte string support and mcrypt support * Fri Feb 17 2012 Michael Perzl - 5.3.10-1 - updated to version 5.3.10 * Wed Aug 24 2011 Michael Perzl - 5.3.8-1 - updated to version 5.3.8 * Tue Aug 23 2011 Michael Perzl - 5.3.7-1 - updated to version 5.3.7, added patch for php_crypt_r() * Tue Aug 23 2011 Michael Perzl - 5.3.6-2 - added "--enable-sockets" and "--with-mysqli=mysqlnd" to configure options * Wed May 18 2011 Michael Perzl - 5.3.6-1 - updated to version 5.3.6 * Wed May 18 2011 Michael Perzl - 5.3.5-2 - fixed wrong dependency on bzip2-devel of php-devel (needs bzip2 only) * Fri Jan 07 2011 Michael Perzl - 5.3.5-1 - updated to version 5.3.5 * Tue Dec 14 2010 Michael Perzl - 5.3.4-1 - updated to version 5.3.4 * Fri Jul 23 2010 Michael Perzl - 5.3.3-1 - updated to version 5.3.3 * Tue Apr 13 2010 Michael Perzl - 5.3.2-1 - updated to version 5.3.2 * Tue Mar 02 2010 Michael Perzl - 5.2.13-1 - updated to version 5.2.13 * Thu Feb 18 2010 Michael Perzl - 5.2.12-2 - enable fastcgi for the CLI version * Tue Jan 19 2010 Michael Perzl - 5.2.12-1 - updated to version 5.2.12 * Fri Nov 27 2009 Michael Perzl - 5.2.11-1 - updated to version 5.2.11 * Thu Nov 26 2008 Michael Perzl - 5.2.8-1 - updated to version 5.2.8 * Fri May 02 2008 Michael Perzl - 5.2.6-1 - updated to version 5.2.6 * Wed Apr 23 2008 Michael Perzl - 5.2.5-2 - some minor spec file fixes * Mon Dec 03 2007 Michael Perzl - 5.2.5-1 - first version for AIX V5.1 and higher