%define bzip2_version 1.0.2-4 %define curl_version 7.61.1-1 %define freetype2_version 2.9.1-1 %define libjpeg_version 9c-1 %define libiconv_version 1.15-1 %define libpng_version 1.6.35-1 %define libmcrypt_version 2.5.8-5 %define libtool_ltdl_version 2.4.6-1 %define libxml2_version 2.9.8-1 %define libXpm_version 3.5.12-1 %define openssl_version 1.0.2p-1 %define openldap_version 2.4.44-0.1 %define pcre_version 8.42-1 %define zlib_version 1.2.3-7 %define httpd_min_version 2.4.37-1 %define httpd_max_version 2.5 %define contentdir /var/www %define _libdir64 %{_prefix}/lib64 Summary: The PHP HTML-embedded scripting language Name: php Version: 7.0.29 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}7_64.conf Source2: %{name}.ini Patch0: %{name}-%{version}-aix.patch Patch1: %{name}-%{version}-xlc.patch Patch2: %{name}-7.0.31-aix-build.patch Patch3: %{name}-7.0.31-aix-trailing-slash.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: make, patch BuildRequires: bzip2 >= %{bzip2_version} BuildRequires: curl-devel >= %{curl_version} BuildRequires: freetype2-devel >= %{freetype2_version} BuildRequires: httpd_64-devel >= %{httpd_min_version} BuildRequires: httpd_64-devel < %{httpd_max_version} BuildRequires: libiconv >= %{libiconv_version} BuildRequires: libjpeg-devel >= %{libjpeg_version} BuildRequires: libmcrypt-devel >= %{libmcrypt_version} BuildRequires: libpng-devel >= %{libpng_version} BuildRequires: libtool-ltdl-devel >= %{libtool_ltdl_version} BuildRequires: libxml2-devel >= %{libxml2_version} BuildRequires: libXpm-devel >= %{libXpm_version} BuildRequires: openssl-devel >= %{openssl_version} BuildRequires: openldap-devel >= %{openldap_version} BuildRequires: pcre-devel >= %{pcre_version} BuildRequires: zlib-devel >= %{zlib_version} %description Dummy description to satisfy RPM. %package -n mod_php_ap24_64 Summary: The PHP HTML-embedded scripting language module for Apache V2.4.X (64-bit) Group: Development/Languages Requires: %{name}-common = %{version}-%{release} Requires: bzip2 >= %{bzip2_version} Requires: curl >= %{curl_version} Requires: freetype2 >= %{freetype2_version} Requires: httpd_64 >= %{httpd_min_version} Requires: httpd_64 < %{httpd_max_version} Requires: libgcc >= %{libgcc_version} Requires: libiconv >= %{libiconv_version} Requires: libjpeg >= %{libjpeg_version} Requires: libmcrypt >= %{libmcrypt_version} Requires: libpng >= %{libpng_version} Requires: libtool-ltdl >= %{libtool_ltdl_version} Requires: libxml2 >= %{libxml2_version} Requires: libXpm >= %{libXpm_version} Requires: openldap >= %{openldap_version} Requires: openssl >= %{openssl_version} Requires: pcre >= %{pcre_version} Requires: zlib >= %{zlib_version} Provides: mod_php_ap24 Provides: mod_php = %{version}-%{release} Provides: php = %{version}-%{release} %description -n mod_php_ap24_64 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 export PATH=/opt/freeware/bin:$PATH %setup -q %patch0 %patch1 %patch2 -p1 -b .build %patch3 -p1 -b .trailing-slash %build export OBJECT_MODE=64 export CC="xlc_r" # define CFLAGS export CFLAGS="-qmaxmem=262144 -DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include" # define LDFLAGS to force compiled-in libpath export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" # install extension modules in %{_libdir64}/php/modules. export EXTENSION_DIR=%{_libdir64}/php/modules export EXTRA_LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib" export EXTRA_LDFLAGS_PROGRAM="-L/opt/freeware/lib64 -L/opt/freeware/lib" export PHP_LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib" # shell function to configure and build a PHP tree buildphp() { ln -sf ../configure ./configure \ --cache-file=../config.cache \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --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-freetype-dir=%{_prefix} \ --with-jpeg-dir=%{_prefix} \ --with-ldap=%{_prefix} \ --with-png-dir=%{_prefix} \ --with-xpm-dir=%{_prefix} \ --with-zlib-dir=%{_prefix} \ --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} \ --enable-opcache=no\ $* # 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} export OBJECT_MODE=64 # install the DSO cd build-apache mkdir -p ${RPM_BUILD_ROOT}%{_libdir64}/httpd/modules chmod 755 ${RPM_BUILD_ROOT}%{_libdir64}/httpd/modules cp .libs/libphp7.so ${RPM_BUILD_ROOT}%{_libdir64}/httpd/modules chmod 755 ${RPM_BUILD_ROOT}%{_libdir64}/httpd/modules/libphp7.so cd .. # strip binaries /usr/bin/strip ${RPM_BUILD_ROOT}%{_libdir64}/httpd/modules/libphp7.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_64 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_64 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_64 %defattr(-,root,system) %{_libdir64}/httpd/modules/libphp7.so %attr(0770,root,apache) %dir /var/lib/php/session %config(noreplace) %{_sysconfdir}/httpd/conf/extra/httpd-php.conf %{contentdir}/icons/php.gif %changelog * Tue Nov 13 2018 Michael Perzl - 7.0.29-1 - updated to version 7.0.29 * Tue Nov 13 2018 Michael Perzl - 7.0.28-1 - updated to version 7.0.28 * Tue Nov 13 2018 Michael Perzl - 7.0.27-1 - updated to version 7.0.27 * Fri Dec 02 2016 Michael Perzl - 7.0.13-1 - updated to version 7.0.13 * Wed Nov 23 2016 Michael Perzl - 5.6.28-1 - updated to version 5.6.28 * Wed Nov 23 2016 Michael Perzl - 5.6.27-2 - recompiled against latest versions * Mon Oct 17 2016 Michael Perzl - 5.6.27-1 - updated to version 5.6.27 * Mon Sep 19 2016 Michael Perzl - 5.6.26-1 - updated to version 5.6.26 * Fri Aug 19 2016 Michael Perzl - 5.6.25-1 - updated to version 5.6.25 * Wed Jul 27 2016 Michael Perzl - 5.6.24-1 - updated to version 5.6.24 * Wed Jun 29 2016 Michael Perzl - 5.6.23-1 - updated to version 5.6.23 * Thu May 26 2016 Michael Perzl - 5.6.22-1 - updated to version 5.6.22 * Sun May 01 2016 Michael Perzl - 5.6.21-1 - updated to version 5.6.21 * Sun May 01 2016 Michael Perzl - 5.6.20-1 - updated to version 5.6.20 * Mon Mar 07 2016 Michael Perzl - 5.6.19-1 - updated to version 5.6.19 * Mon Mar 07 2016 Michael Perzl - 5.6.18-2 - recompiled against latest versions * Mon Feb 08 2016 Michael Perzl - 5.6.18-1 - updated to version 5.6.18 * Fri Jan 15 2016 Michael Perzl - 5.6.17-1 - updated to version 5.6.17 * Fri Jan 15 2016 Michael Perzl - 5.5.31-1 - updated to version 5.5.31 * Mon Oct 05 2015 Michael Perzl - 5.5.30-1 - updated to version 5.5.30 * Mon Sep 15 2015 Michael Perzl - 5.5.29-1 - updated to version 5.5.29 * Sat Aug 08 2015 Michael Perzl - 5.5.28-1 - updated to version 5.5.28 * Sat Aug 08 2015 Michael Perzl - 5.5.27-1 - updated to version 5.5.27 * Wed Jun 17 2015 Michael Perzl - 5.5.26-1 - updated to version 5.5.26 * Sat May 16 2015 Michael Perzl - 5.5.25-1 - updated to version 5.5.25 * Fri May 08 2015 Michael Perzl - 5.5.24-1 - updated to version 5.5.24 * Fri Mar 20 2015 Michael Perzl - 5.5.23-1 - updated to version 5.5.23 * Thu Feb 26 2015 Michael Perzl - 5.5.22-1 - updated to version 5.5.22 * Thu Feb 26 2015 Michael Perzl - 5.5.21-1 - updated to version 5.5.21 * Thu Feb 26 2015 Michael Perzl - 5.5.20-1 - updated to version 5.5.20 * Fri Dec 05 2014 Michael Perzl - 5.5.19-1 - updated to version 5.5.19 * Wed Nov 12 2014 Michael Perzl - 5.5.18-1 - updated to version 5.5.18 * Fri Sep 19 2014 Michael Perzl - 5.5.17-1 - updated to version 5.5.17 * Sat Aug 23 2014 Michael Perzl - 5.5.16-1 - updated to version 5.5.16 * Fri Aug 22 2014 Michael Perzl - 5.5.15-1 - updated to version 5.5.15 * Fri Aug 22 2014 Michael Perzl - 5.5.14-1 - updated to version 5.5.14 * Fri Aug 22 2014 Michael Perzl - 5.5.13-1 - updated to version 5.5.13 * Fri Aug 22 2014 Michael Perzl - 5.5.12-1 - updated to version 5.5.12 * Fri Aug 22 2014 Michael Perzl - 5.5.11-1 - updated to version 5.5.11 * Fri Aug 22 2014 Michael Perzl - 5.5.10-1 - updated to version 5.5.10 * Fri Aug 22 2014 Michael Perzl - 5.5.9-1 - updated to version 5.5.9 * Sat Jan 11 2014 Michael Perzl - 5.5.8-1 - updated to version 5.5.8 * Sat Jan 11 2014 Michael Perzl - 5.5.7-1 - updated to version 5.5.7 * Mon Nov 18 2013 Michael Perzl - 5.5.6-1 - updated to version 5.5.6 * 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 * Fri Jun 21 2013 Michael Perzl - 5.4.16-1 - updated to version 5.4.16 * Fri Jun 21 2013 Michael Perzl - 5.4.15-1 - rebuilt as 64-bit version and renamed to 'mod_php_ap24_64' * 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