summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-pecl-xmlrpc.spec93
1 files changed, 44 insertions, 49 deletions
diff --git a/php-pecl-xmlrpc.spec b/php-pecl-xmlrpc.spec
index 6ee4d69..d814641 100644
--- a/php-pecl-xmlrpc.spec
+++ b/php-pecl-xmlrpc.spec
@@ -1,47 +1,48 @@
# remirepo spec file for php-pecl-xmlrpc
#
-# Copyright (c) 2020-2022 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2020-2023 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-# we don't want -z defs linker flag
-%undefine _strict_symbol_defs_build
-
-%if 0%{?scl:1}
-%scl_package php-pecl-xmlrpc
-%endif
+%{?scl:%scl_package php-pecl-xmlrpc}
# https://github.com/php/pecl-networking-xmlrpc/commits/master
-%global gh_commit e71da6ad6f86fd149de14e42b54019edf3e629b7
-%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
-%global gh_owner php
-%global gh_project pecl-networking-xmlrpc
-#global gh_date 20200602
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%global pecl_name xmlrpc
-%global with_tests 0%{!?_without_tests:1}
-%global upver 1.0.0
-%global rcver RC3
-%global lower rc3
+%global gh_commit e71da6ad6f86fd149de14e42b54019edf3e629b7
+%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
+%global gh_owner php
+%global gh_project pecl-networking-xmlrpc
+#global gh_date 20200602
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
+%global pecl_name xmlrpc
+%global with_tests 0%{!?_without_tests:1}
+%global upver 1.0.0
+%global rcver RC3
+%global rclower rc3
# After 20-xml
-%global ini_name 30-%{pecl_name}.ini
+%global ini_name 30-%{pecl_name}.ini
+%if 0%{?gh_date}
+%global sources %{gh_project}-%{gh_commit}
+%else
+%global sources %{pecl_name}-%{upver}%{?rcver}
+%endif
+%global _configure ../%{sources}/configure
Summary: Functions to write XML-RPC servers and clients
Name: %{?scl_prefix}php-pecl-%{pecl_name}
-Version: %{upver}%{?lower:~%{lower}}%{?gh_date:.%{gh_date}}
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Version: %{upver}%{?rclower:~%{rclower}}%{?gh_date:.%{gh_date}}
+Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
# Extension is PHP
-# Library is BSD
-License: PHP and BSD
+# Library is MIT
+License: PHP-3.01 AND MIT
URL: https://pecl.php.net/package/%{pecl_name}
%if 0%{?gh_date}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{upver}-%{gh_short}.tar.gz
%else
-Source0: https://pecl.php.net/get/%{pecl_name}-%{upver}%{?rcver}.tgz
+Source0: https://pecl.php.net/get/%{sources}.tgz
%endif
Patch0: %{pecl_name}-php82.patch
@@ -55,7 +56,6 @@ BuildRequires: %{?scl_prefix}php-xml
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
Requires: %{?scl_prefix}php-xml%{?_isa}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
# Set epoch so provides is > 0:8.0
Obsoletes: %{?scl_prefix}php-%{pecl_name} < 8.0.0
@@ -80,19 +80,14 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -qc
-%if 0%{?gh_date}
-mv %{gh_project}-%{gh_commit} NTS
-%else
-mv %{pecl_name}-%{upver}%{?rcver} NTS
-%endif
sed -e 's/role="test"/role="src"/' \
%{?_licensedir:-e '/COPYING/s/role="doc"/role="src"/' } \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
-cd NTS
-%patch0 -p1 -b .up
+cd %{sources}
+%patch -P0 -p1 -b .up
# Check version as upstream often forget to update this
extver=$(sed -n '/#define PHP_XMLRPC_VERSION/{s/.* "//;s/".*$//;p}' php_xmlrpc.h)
@@ -109,9 +104,9 @@ extension=%{pecl_name}
EOF
+mkdir NTS
%if %{with_zts}
-# duplicate for ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
@@ -124,15 +119,16 @@ peclconf() {
--with-php-config=$1
}
-cd NTS
-%{_bindir}/phpize
-peclconf %{_bindir}/php-config
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
+peclconf %{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
-peclconf %{_bindir}/zts-php-config
+peclconf %{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -155,22 +151,20 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
# Test & Documentation
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
%check
-cd NTS
+cd %{sources}
: Minimal load test for NTS extension
-%{_bindir}/php --no-php-ini \
+%{__php} --no-php-ini \
--define extension=xml \
--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=xml \
@@ -180,8 +174,6 @@ cd ../ZTS
%endif
%if %{with_tests}
-cd ../NTS
-
: Run upstream test suite
TEST_PHP_ARGS="-n -d extension=xml -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
%{__php} -n run-tests.php -q --show-diff
@@ -190,8 +182,8 @@ TEST_PHP_ARGS="-n -d extension=xml -d extension=%{buildroot}%{php_extdir}/%{pecl
%files
-%{?_licensedir:%license NTS/LICENSE}
-%{?_licensedir:%license NTS/libxmlrpc/COPYING}
+%{?_licensedir:%license %{sources}/LICENSE}
+%{?_licensedir:%license %{sources}/libxmlrpc/COPYING}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -205,6 +197,9 @@ TEST_PHP_ARGS="-n -d extension=xml -d extension=%{buildroot}%{php_extdir}/%{pecl
%changelog
+* Thu Aug 24 2023 Remi Collet <remi@remirepo.net> - 1.0.0~rc3-3
+- build out of sources tree
+
* Thu Sep 15 2022 Remi Collet <remi@remirepo.net> - 1.0.0~rc3-2
- add upstream patch for PHP 8.2