File dba-apa24-php-7424-zip.spec of Package dba-apa24-php-7424-zip
#
# spec file for package dba-apa24-php-731
#
%define version 7.4.24
%define vers 7424
%define apavers 2.4.52
%define apapack 2452
%define dbassl 1
%define run_tests 0
%define autoconf213 0
%define with_dbaxml 1
%define with_dynsess 0
%define with_fpm 1
%define with_gmp 1
%define with_intl 1
%define with_ldap 1
%define with_imap 1
%define with_mbregex 1
%define with_mime 1
%define with_ming 0
%define with_mssql 1
%define with_mysql 1
%define with_pear 0
%define with_pg 1
%define with_pg9 0
%define with_qdbm 1
%define with_readline 1
%define with_sasl 1
%if 0%{?rhel_version} == 406
%define with_snmp 0
%else
%define with_snmp 1
%endif
%define with_spell 1
%define with_sqlite 1
%define with_tidy 1
%define with_unixodbc 1
%define with_xpm 1
%define prefix /DBA/apache24/PHP/%{version}
%define peardir /DBA/apache24/PEAR/%{version}
%define apahome /DBA/apache24/WWW/%{apavers}
%define extension_dir %{prefix}/lib/php/extensions/
Name: dba-apa24-php-%{vers}-zip
Summary: PHP scripting language Version 7.4.24
License: PHP-3.01
Group: Development/Languages/Other
%define realver %{version}
Version: %{version}
Release: 0
Source0: php-%{version}.tar.bz2
Source1: dba-php-rpmlintrc
Source2: php-%{version}.tar.bz2.asc
Source3: copy_files.pl
Source4: filter-requires-php.sh
Source5: php71.keys
Source6: set_php_7.4.latest.sh
Patch1: isinf0.patch
Patch2: ssldir.patch
Url: http://www.php.net/
AutoReqProv: no
BuildRequires: dba-apache-%{apapack} pkg-config
BuildRequires: gnupg
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define _use_internal_dependency_generator 0
%define __find_requires %{SOURCE4}
%if 0%{?suse_version} >= 1200
BuildRequires: automake libtool
%endif
BuildRequires: gcc-c++ libstdc++-devel
%if 0%{?suse_version} >= 1100
BuildRequires: -post-build-checks
%define autoconf213 1
%endif
%define apxs %{apahome}/bin/apxs
%if 0%{?sles_version} == 9
%define with_readline 0
%endif
%if 0%{?sles_version} == 10
%define with_unixodbc 0
%define with_gmp 0
%endif
%if 0%{?suse_version} >= 1100 || 0%{?centos_version} >= 700 || 0%{?rhel_version} >= 700
%define with_intl 1
%endif
%if 0%{?centos_version} == 600 || 0%{?rhel_version} == 600
%define with_intl 0
%endif
%if 0%{?sles_version} == 11
%define with_sqlite 1
%define with_intl 0
%endif
%if 0%{?rhel_version} == 406
%define with_sqlite 0
%define with_pg 0
%endif
%if %{with_unixodbc}
BuildRequires: unixODBC-devel
%endif
%if 0%{?rhel_version} >= 600 || 0%{?sle_version} >= 1500
%define with_imap 0
%endif
%if %{with_imap}
%if 0%{?suse_version}
BuildRequires: imap-devel
%if 0%{?suse_version} >= 1200
BuildRequires: libc-client2007e_suse
%endif
%else
%if 0%{?centos_version} >= 800 || 0%{?rhel_version} >= 800
BuildRequires: dovecot libc-client-devel
%else
BuildRequires: libc-client-devel
%endif
%endif
%endif
%if %{with_intl}
BuildRequires: libicu-devel gettext-devel
%endif
%if %{autoconf213}
BuildRequires: autoconf213
%endif
%if 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora_version}
%define with_dbaxml 0
%endif
%if %{with_dbaxml}
BuildRequires: dba-libxml2-299-static
BuildRequires: libxml2-devel
%define xmlpath /DBA/libxml2/2.9.9
%else
BuildRequires: libxml2-devel
%endif
%if 0%{?sles_version} == 11
%define dbassl 1
%endif
%if %{dbassl}
%if 0%{?sles_version} == 11
#!BuildIgnore: openssl-devel libopenssl-devel openssl
BuildRequires: dba-openssl-102k-static
%define ssldir /DBA/openssl/1.0.2k
%else
BuildRequires: dba-openssl-111t-static
%define ssldir /DBA/openssl/1.1.1t
%endif
%else
BuildRequires: openssl-devel
%endif
# for all dists
BuildRequires: net-snmp-devel mhash-devel libmcrypt-devel
%if %{with_pg9}
BuildRequires: dba-postgresql-9115
%define pg_home /DBA/postgresql/9.1.15
%else
%if %{with_pg}
%define pg_home %{_usr}
BuildRequires: postgresql-devel
%endif
%endif
%if %{with_mbregex}
BuildRequires: dba-oniguruma-694
%define oni_home /DBA/oniguruma/6.9.4
%endif
#!BuildIgnore: dba-postgresql-839 dba-postgresql-8319 dba-postgresql-842 dba-postgresql-845 dba-postgresql-846 dba-postgresql-8412
#!BuildIgnore: dba-postgresql-901 dba-postgresql-902 dba-postgresql-904 dba-postgresql-905 dba-postgresql-906 dba-postgresql-908
#!BuildIgnore: dba-postgresql-909 dba-postgresql-9011
#!BuildIgnore: dba-postgresql-910 dba-postgresql-911 dba-postgresql-912 dba-postgresql-914 dba-postgresql-915
#!BuildIgnore: dba-postgresql-920
#!BuildIgnore: dba-openssl-098o dba-openssl-098r dba-openssl-098x dba-openssl-101c dba-openssl-101e dba-openssl-101g-static
#!BuildIgnore: dba-libxml2-290 dba-net-snmp-572
#!BuildIgnore: nspr dba-geoip-148 dba-geoip-160 dba-git-2191
%if 0%{?suse_version}
BuildRequires: bison curl-devel db-devel gmp-devel libtiff-devel libxslt-devel ncurses-devel openldap2 openldap2-devel pam-devel pkgconfig postfix tcpd-devel zip libapr-util1-devel libapr1-devel
BuildRequires: libjpeg-devel libpng-devel
BuildRequires: libzip-devel
Requires: libzip2
%if 0%{?sle_version} <= 1500
BuildRequires: imap-devel
%endif
%if 0%{?suse_version} >= 1120
BuildRequires: orbit2-devel gtk2-devel
%else
BuildRequires: orbit-devel gtk-devel
%endif
%if 0%{?suse_version} == 1315 || 0%{?sle_version} >= 1500
%define with_tidy 0
%define with_xpm 0
%else
BuildRequires: mm-devel qt3-devel libtidy-devel
%endif
%if 0%{?sles_version} == 9
%define with_mysql 0
%else
BuildRequires: mysql-devel
%endif
%if 0%{?sle_version} >= 1500
%define with_spell 0
%endif
%if 0%{?suse_version} < 930
%define with_spell 0
BuildRequires: heimdal-devel
%else
BuildRequires: krb5-devel
%endif
%if 0%{?suse_version} < 1100
BuildRequires: mhash-devel imap
%else
BuildRequires: libbz2-devel
%if 0%{?sles_version} == 11
# Requires: imap-lib-2006c1_suse
%else
%if 0%{?suse_version} <= 1120
BuildRequires: imap-lib
# Requires: imap-lib
%endif
%endif
%endif
%if 0%{?suse_version} >= 1000
%if 0%{?sles_version} != 10 && 0%{?sle_version} <= 1500
BuildRequires: flex-old krb5-devel krb5
%endif
# I would like this to become a hard dependency, as PHP is
# documented to have this modules by default (no addtional libs are needed)
%else
# BuildRequires: flex libgcrypt-devel rpm-devel
BuildRequires: libgcrypt-devel rpm-devel
BuildRequires: libjpeg libjpeg-devel
%endif
%if 0%{?sles_version} == 9
%define with_mysql 0
%else
BuildRequires: mysql-devel
%endif
%if 0%{?sle_version} >= 1500
%define with_spell 0
%endif
%if 0%{?suse_version} < 930
%define with_spell 0
BuildRequires: heimdal-devel
%else
BuildRequires: krb5-devel
%endif
%if 0%{?suse_version} < 1100
BuildRequires: mhash-devel imap
%else
BuildRequires: libbz2-devel
%if 0%{?sles_version} == 11
# Requires: imap-lib-2006c1_suse
%else
%if 0%{?suse_version} <= 1120
BuildRequires: imap-lib
# Requires: imap-lib
%endif
%endif
%endif
%if 0%{?suse_version} >= 1000
%if 0%{?sles_version} != 10 && 0%{?sle_version} <= 1500
BuildRequires: flex-old krb5-devel krb5
%endif
# I would like this to become a hard dependency, as PHP is
# documented to have this modules by default (no addtional libs are needed)
%else
# BuildRequires: flex libgcrypt-devel rpm-devel
BuildRequires: libgcrypt-devel rpm-devel
BuildRequires: libjpeg libjpeg-devel
%endif
%if 0%{?sles_version} == 9
BuildRequires: xinetd
%else
# BuildRequires: libedit-devel update-alternatives
BuildRequires: update-alternatives
%endif
%else
# CentOS, RHEL
%if 0%{?rhel_version} >= 700 || 0%{?centos_version} >= 700
BuildRequires: libdb
%define with_tidy 0
%else
%if 0%{?rhel_version} == 600
%define with_tidy 0
%else
BuildRequires: db4-devel libtidy-devel
%endif
%endif
%if 0%{?centos_version} < 700
%define with_sasl 0
%endif
BuildRequires: bzip2-devel, curl-devel >= 7.9, expat-devel pam-devel gmp-devel
BuildRequires: libstdc++-devel
%if 0%{?with_sqlite}
%if 0%{?centos_version} == 600
BuildRequires: dba-sqlite-383-static
%define sqlitedir /DBA/sqlite/3.8.3
%else
BuildRequires: sqlite-devel sqlite
%endif
%endif
# no xmp for rhel-4
%if 0%{?rhel_version} == 406
%define with_xpm 0
BuildRequires: pcre-devel
%else
BuildRequires: pcre-devel >= 6.6
BuildRequires: libXpm libXpm-devel
%endif
%if 0%{?centos_version} >= 800 || 0%{?rhel_version} >= 800
BuildRequires: dba-mysql-8020
%define mysqldir /DBA/mysql/8.0.20
%else
BuildRequires: mysql mysql-devel tcp_wrappers
%endif
%if 0%{?centos_version} >= 700 || 0%{?rhel_version} >= 700
BuildRequires: dba-libzip-173
#Requires: dba-libzip-173
%define libzipdir /DBA/libzip/1.7.3
%else
BuildRequires: libzip-devel
%endif
BuildRequires: zlib-devel, postfix, readline-devel, flex
BuildRequires: bzip2, perl, libtool >= 1.4.3
BuildRequires: openldap-devel openldap krb5-devel krb5
BuildRequires: libacl-devel libattr-devel
BuildRequires: libjpeg libjpeg-devel libpng-devel freetype-devel
BuildRequires: libtiff-devel libxslt-devel
BuildRequires: apr-util-devel apr-devel
#BuildRequires: libreadline-dev
%if 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
%define with_spell 0
# BuildRequires: apr-util-ldap
%else
%if 0%{?rhel_version} == 406 || 0%{?rhel_version} == 505 || 0%{?centos_version} == 505
BuildRequires: libc-client-devel
%define with_gmp 0
%endif
%endif
%endif
%if %{with_spell}
BuildRequires: aspell-devel
%endif
# use system PCRE and sqlite on 10.2 an up only, previous versions will not work.
%if 0%{?suse_version} >= 1010
BuildRequires: pcre-devel sqlite-devel
%if 0%{?sles_version} != 11
%if 0%{?sle_version} >= 1500
BuildRequires: sqlite3-devel
%else
BuildRequires: sqlite2-devel
%endif
%else
BuildRequires: libsqlite3-0
%endif
%endif
#%if 0%{?suse_version} == 1030
#BuildRequires: sqlite2-devel
#%endif
%if %{with_mssql}
BuildRequires: dba-freetds-100080-static
%define tdsdir /DBA/freetds/1.00.80
%endif
#support t1lib in gd in 10.3 or later
%if 0%{?suse_version} > 1020
BuildRequires: re2c
#10.3 does not install sendmail binary with the minimal system
Requires: smtp_daemon
%endif
%if 0%{?suse_version} >= 1300
%define with_sasl 0
%endif
%if 0%{?sles_version} == 11
%define with_sasl 0
%define with_ldap 0
%define with_pg 0
%define with_snmp 0
%endif
%if %{with_ming}
BuildRequires: ming-devel
%endif
#if %{with_qdbm}
#BuildRequires: qdbm-devel
#endif
#libXpm needed as requirement für RHEL7, CENTOS7
%if 0%{?rhel_version} >= 700 || 0%{?centos_version} >= 700
Requires: libXpm
%endif
%description
This package contains the PHP5 core files, including PHP binary (CLI)
and PHP configuration (php.ini). This package must be installed in
order to use PHP. Additionally, extension modules and server modules
(e.g. for Apache) may be installed.
Authors:
--------
The PHP Group
See http://www.php.net/credits.php for more details
%if %{with_mssql}
%package mssql
Summary: Mssql extension for php
Group: Productivity/Networking/Ftp/Servers
Requires: %{name} = %{version}
%description mssql
Mssql extension for php based on freetds
%endif
%prep
#
# O/ ._ .__ ._
# /O |_)|(/_|_)
# | |
#
# gpg --recv-keys 33CFC8B3
# gpg --import %{S:5}
# gpg --verify %{S:2}
%setup -q -n php-%{version}
%patch1 -p0
%if 0%{?sles_version} == 11
# # %patch2 -p0
%endif
%{__chmod} +x %{SOURCE4}
%build
#
# O/ |_ o| _|
# /O |_)|_|||(_|
#
%if 0%{?with_sqlite}
#%if 0%{?suse_version} > 1010
#%{__rm} -rf ext/pcre/pcrelib ext/pdo_sqlite/sqlite
#%{__rm} -rf ext/pdo_sqlite/sqlite
#%endif
%endif
%if %{autoconf213}
export PHP_AUTOCONF=`which autoconf-2.13`
export PHP_AUTOHEADER=`which autoheader-2.13`
%endif
# regenerate configure etc.
# workaround: suhosin-patch updates timestamp of configure, confusing buildconf
# - %{__rm} configure
# - ./buildconf --force
# export flags
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -pipe"
CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -pipe"
%if 0%{?suse_version} > 1000
CFLAGS="$CFLAGS -fstack-protector"
CXXFLAGS="$CXXFLAGS -fstack-protector"
%endif
%if %{dbassl}
CFLAGS="$CFLAGS -I%{ssldir}/include"
LDFLAGS="$LDFLAGS -L%{ssldir}/lib"
%endif
%if %{with_mbregex}
CFLAGS="$CFLAGS -I%{oni_home}/include"
LDFLAGS="$LDFLAGS -L%{oni_home}/lib"
export ONIG_CFLAGS="-I%{oni_home}/include"
export ONIG_LIBS="-L%{oni_home}/lib -lonig"
export KERBEROS_CFLAGS="-I/usr/include/krb5"
export KERBEROS_LIBS="-L/usr/lib64/krb5"
%endif
%if %{with_sqlite}
%if 0%{?centos_version} == 600
CFLAGS="$CFLAGS -I%{sqlitedir}/include"
LDFLAGS="$LDFLAGS -L%{sqlitedir}/lib"
%endif
%endif
%if %{with_mysql}
%if 0%{?centos_version} >= 800 || 0%{?rhel_version} >= 800
CFLAGS="$CFLAGS -I%{mysqldir}/include"
LDFLAGS="$LDFLAGS -L%{mysqldir}/lib"
%endif
%endif
%if 0%{?centos_version} >= 700 || 0%{?rhel_version} >= 800
CFLAGS="$CFLAGS -I%{libzipdir}/include"
LDFLAGS="$LDFLAGS -L%{libzipdir}/lib64"
export LIBZIP_CFLAGS="-I%{libzipdir}/include"
export LIBZIP_LIBDIR="-L%{libzipdir}/lib64"
export PKG_CONFIG_PATH="%{libzipdir}/lib64/pkgconfig:$PKG_CONFIG_PATH"
%endif
export CFLAGS
export CXXFLAGS
export LDFLAGS
export NO_INTERACTION=true
%if 0%{?suse_version} < 1200 || 0%{?centos_version} < 800 || 0%{?rhel_version} < 800 || 0%{?sle_version} < 1200
JPEG_CFLAGS="-I/usr/include"
JPEG_LIBS="-ljpeg"
export JPEG_CFLAGS
export JPEG_LIBS
%endif
# where to install extensions
PEAR_HOME=%{peardir}
EXTENSION_DIR=%{extension_dir}
export EXTENSION_DIR
# sh -vx ./configure
./configure \
--prefix=%{prefix} \
--with-apxs2=%{apxs} \
--with-libdir=%{_lib} \
--enable-cli \
%if %{with_pear}
--with-pear=%{peardir} \
%else
--without-pear \
%endif
--enable-cgi \
--enable-phpdbg \
--enable-fileinfo \
--enable-bcmath \
--enable-calendar=shared \
--enable-calendar=shared \
--enable-ctype \
--enable-exif=shared \
--enable-ftp=shared \
%if %{with_fpm}
--enable-fpm \
%endif
--enable-mbstring \
%if %{with_mbregex}
--enable-mbregex \
%endif
--enable-pcntl=shared \
--enable-phar=shared \
--enable-posix=shared \
--enable-shmop=shared \
--enable-soap=shared \
--enable-sockets=shared \
--enable-sysvmsg=shared \
--enable-sysvsem=shared \
--enable-sysvshm=shared \
--enable-tokenizer=shared \
--with-zip=shared \
--enable-zip \
--with-bz2 \
--enable-simplexml \
%if %{with_intl}
--enable-intl=shared \
%else
--without-icu \
%endif
--with-zlib \
%if 0%{?sles_version} == 9 || 0%{?rhel_version} == 406 || 0%{?sles_version} == 11
--without-curl \
%else
--with-curl \
%endif
--enable-gd \
%if %{with_xpm}
--with-xpm \
%endif
--with-freetype \
--with-jpeg \
--with-gettext=shared \
%if %{with_gmp}
--with-gmp=shared \
%else
--without-gmp \
%endif
%if %{with_dynsess}
--enable-session=shared \
%else
--enable-session \
--enable-hash \
%endif
--with-iconv \
--with-kerberos \
%if %{with_imap}
--with-imap=shared \
--with-imap-ssl \
%else
--without-imap \
%endif
--enable-json=shared \
%if 0%{?sles_version} == 9 || 0%{?rhel_version} == 406 || 0%{?sles_version} == 11
--without-ldap \
%endif
%if %{with_ldap}
--with-ldap=shared \
%endif
%if %{with_sasl}
--with-ldap-sasl=%{_usr} \
%endif
--with-mhash \
%if 0%{?_with_ming:1}
--with-ming=shared,%{_usr} \
%endif
%if %{with_mssql}
--with-mssql=shared,%{tdsdir} \
--with-pdo_dblib=shared,%{tdsdir} \
%else
--without-mssql \
%endif
%if %{with_mysql}
%if 0%{?centos_version} >= 800 || 0%{?rhel_version} >= 800
--with-mysql=shared \
%else
--with-mysql=shared \
%endif
--with-mysql-sock=/var/lib/mysql/mysql.sock \
--with-mysqli=shared \
%else
--without-mysql \
%endif
%if %{with_unixodbc}
--with-unixODBC=shared,%{_usr} \
%endif
%if %{dbassl}
--with-openssl-dir=%{ssldir} \
%endif
--with-openssl=shared \
%if %{with_pg}
--with-pgsql=shared,%{pg_home} \
--with-pdo-pgsql=shared,%{pg_home} \
%else
--without-pgsql \
%endif
%if %{with_spell}
--with-pspell=shared \
%endif
%if %{with_snmp}
--with-snmp=shared \
%else
--without-snmp \
%endif
--with-xmlrpc=shared \
--with-libxml \
--enable-simplexml=shared \
--enable-xmlreader=shared \
--enable-xmlwriter=shared \
--with-xsl=shared \
%if 0%{?with_tidy}
--with-tidy=shared,%{_usr} \
%endif
--enable-dba=shared \
--enable-dom=shared \
--with-db4=%{_usr} \
--without-gdbm \
--with-cdb \
--enable-pdo=shared,%{_usr} \
%if 0%{?with_sqlite}
%if 0%{?centos_version} == 600
--with-sqlite3 \
--with-pdo_sqlite=shared,%{sqlitedir} \
%else
--with-sqlite3 \
--with-pdo_sqlite=shared,%{_usr} \
%endif
%else
--without-pdo-sqlite \
--without-sqlite \
%endif
%if %{with_mysql}
--with-pdo-mysql=shared \
%endif
%if %{with_unixodbc}
--with-pdo-odbc=shared,unixODBC,%{_usr} \
%endif
# Bug in ARP
%if 0%{?sles_version} == 10
perl -pi -e 's|apr-1 64/include|apr-1|g' *
perl -pi -e 's|apr-1 /include|apr-1|g' *
%endif
make CFLAGS="$RPM_OPT_FLAGS -fPIC \
-fno-strict-aliasing \
-Wall " \
%{?jobs:-j%jobs}
%install
#
# O/ o._ __|_ _.||
# /O || |_> |_(_|||
#
#
# (most installation (to build root) has already been done in %%build)
#
# prevent rpath problem on suse
export NO_BRP_CHECK_RPATH=true
mkdir -p %{buildroot}%{extension_dir}
%{__install} -m 0755 ./modules/zip.so %{buildroot}%{extension_dir}
%post
%files
# _
# O/ _|_o| _ _
# /O | ||(/__>
#
%defattr(-,root,root)
%dir %{prefix}/lib/php/extensions
%{prefix}/lib/php/extensions/zip.so
%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
%changelog
* Wed Feb 15 2023 Dennis Hampe <dennis.hampe@bertelsmann.de>
- update openssl
* Thu Jul 07 2022 Dennis Hampe <dennis.hampe@bertelsmann.de>
- OpenSSL update openssl/1.1.1t
* Tue Jun 28 2022 Dennis Hampe <dennis.hampe@bertelsmann.de>
- OpenSSL update openssl/1.1.1p
* Wed Mar 16 2022 Sebastian Roth <sebastian.roth@bertelsmann.de>
- OpenSSL update openssl/1.1.1n
* Wed Oct 13 2021 Dennis Hampe <dennis.hampe@bertelsmann.de>
- inital package