From 0de65cb84ed33d6702fd42a4201b4e20c4c2d4cc Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 7 Jul 2023 14:23:26 +0200 Subject: build out of sources tree --- REFLECTION | 2 +- php-pecl-krb5.spec | 51 +++++++++++++++++++++++++-------------------------- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/REFLECTION b/REFLECTION index 327859a..3c0fea3 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #80 krb5 version 1.1.5 ] { +Extension [ extension #79 krb5 version 1.1.5 ] { - Constants [14] { Constant [ int GSS_C_DELEG_FLAG ] { 1 } diff --git a/php-pecl-krb5.spec b/php-pecl-krb5.spec index 51af8a0..6a2b43e 100644 --- a/php-pecl-krb5.spec +++ b/php-pecl-krb5.spec @@ -10,17 +10,19 @@ # Please, preserve the changelog entries # -# we don't want -z defs linker flag -%undefine _strict_symbol_defs_build - %if 0%{?scl:1} -%global sub_prefix %{scl_prefix} %scl_package php-pecl-krb5 %else %global _root_includedir %{_includedir} %global _root_bindir %{_bindir} %endif +# For PHP < 5.6 and EPEL-9 +%{!?__phpize: %global __phpize %{_bindir}/phpize} +%{!?__ztsphpize: %global __ztsphpize %{_bindir}/zts-phpize} +%{!?__phpconfig: %global __phpconfig %{_bindir}/php-config} +%{!?__ztsphpconfig:%global __ztsphpconfig %{_bindir}/zts-php-config} + %global pecl_name krb5 %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %if "%{php_version}" < "5.6" @@ -28,11 +30,13 @@ %else %global ini_name 40-%{pecl_name}.ini %endif +%global sources %{pecl_name}-%{version} +%global _configure ../%{sources}/configure Summary: Kerberos authentification extension -Name: %{?sub_prefix}php-pecl-%{pecl_name} +Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: 1.1.5 -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: MIT URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz @@ -46,18 +50,13 @@ BuildRequires: %{?scl_prefix}php-pear Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} Provides: %{?scl_prefix}php-%{pecl_name} = %{version} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} -%if "%{?scl_prefix}" != "%{?sub_prefix}" -Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} -%endif -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} +%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} == 7 # Other third party repo stuff %if "%{php_version}" > "5.6" Obsoletes: php56u-pecl-%{pecl_name} <= %{version} @@ -88,11 +87,10 @@ These are the files needed to compile programs using the Kerberos extension. %prep %setup -q -c -mv %{pecl_name}-%{version} NTS %{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} -cd NTS +cd %{sources} # Sanity check, really often broken extver=$(sed -n '/#define PHP_KRB5_VERSION/{s/.* "//;s/".*$//;p}' php_krb5.h) if test "x${extver}" != "x%{version}"; then @@ -101,9 +99,9 @@ if test "x${extver}" != "x%{version}"; then fi cd .. +mkdir NTS %if %{with_zts} -# Duplicate source tree for NTS / ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif # Create configuration file @@ -126,15 +124,15 @@ peclbuild() { --with-php-config=$1 make %{?_smp_mflags} } -cd NTS +cd %{sources} +%{__phpize} -%{_bindir}/phpize -peclbuild %{_bindir}/php-config +cd ../NTS +peclbuild %{__phpconfig} %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize -peclbuild %{_bindir}/zts-php-config +peclbuild %{__ztsphpconfig} %endif @@ -157,10 +155,10 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} # Test & Documentation for i in $(grep 'role="test"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i +do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i done for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done @@ -185,14 +183,12 @@ fi %check -cd NTS : Minimal load test for NTS extension %{__php} --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep '^%{pecl_name}$' %if %{with_zts} -cd ../ZTS : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ @@ -201,7 +197,7 @@ cd ../ZTS %files -%{?_licensedir:%license NTS/LICENSE} +%{?_licensedir:%license %{sources}/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -225,6 +221,9 @@ cd ../ZTS %changelog +* Fri Jul 7 2023 Remi Collet - 1.1.5-2 +- build out of sources tree + * Mon Feb 13 2023 Remi Collet - 1.1.5-1 - update to 1.1.5 -- cgit