summaryrefslogtreecommitdiffstats
path: root/php-pecl-mysql-xdevapi.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-mysql-xdevapi.spec')
-rw-r--r--php-pecl-mysql-xdevapi.spec59
1 files changed, 28 insertions, 31 deletions
diff --git a/php-pecl-mysql-xdevapi.spec b/php-pecl-mysql-xdevapi.spec
index dad3fbc..848ea1d 100644
--- a/php-pecl-mysql-xdevapi.spec
+++ b/php-pecl-mysql-xdevapi.spec
@@ -1,19 +1,13 @@
# remirepo spec file for php-pecl-mysql-xdevapi
#
-# Copyright (c) 2016-2022 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2016-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}
-%global sub_prefix %{scl_prefix}
-%scl_package php-pecl-mysql-xdevapi
-%endif
+%{?scl:%scl_package php-pecl-mysql-xdevapi}
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name mysql_xdevapi
@@ -21,15 +15,18 @@
%bcond_with tests
# After 20-json, 20-mysqlnd
%global ini_name 40-%{pecl_name}.ini
+%global sources %{pecl_name}-%{version}
+%global _configure ../%{sources}/configure
+
Summary: MySQL database access functions
-Name: %{?sub_prefix}php-pecl-mysql-xdevapi
+Name: %{?scl_prefix}php-pecl-mysql-xdevapi
Version: 8.0.30
-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: PHP
+License: PHP-3.0.1
URL: https://pecl.php.net/package/%{pecl_name}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
+Source0: https://pecl.php.net/get/%{sources}.tgz
Patch0: 0001-link-with-libresolv-for-ns_parserr.patch
@@ -55,7 +52,6 @@ Requires: %{?scl_prefix}php(api) = %{php_core_api}
Requires: %{?scl_prefix}php-mysqlnd%{?_isa}
Requires: %{?scl_prefix}php-json%{?_isa}
Requires: %{?scl_prefix}php-hash%{?_isa}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
@@ -116,15 +112,14 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -qc
-mv %{pecl_name}-%{version} NTS
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
-cd NTS
-%patch0 -p1
+cd %{sources}
+%patch -P0 -p1
# Check version as upstream often forget to update this
extver=$(sed -n '/#define PHP_MYSQL_XDEVAPI_VERSION/{s/.* "//;s/".*$//;p}' php_mysql_xdevapi.h)
@@ -134,10 +129,9 @@ if test "x${extver}" != "x%{version}%{?prever}%{?gh_date:-dev}"; then
fi
cd ..
-
+mkdir NTS
%if %{with_zts}
-# duplicate for ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
# Create configuration file
@@ -166,15 +160,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
@@ -197,22 +192,22 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
# Documentation
for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do [ -f NTS/$i ] && install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
+do [ -f %{sources}/$i ] && install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
%check
-cd NTS
+cd %{sources}
+
OPT="-n -d extension=mysqlnd.so"
[ -f %{php_extdir}/json.so ] && OPT="$OPT -d extension=json.so"
: Minimal load test for NTS extension
-%{_bindir}/php $OPT \
+%{__php} $OPT \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
%if %{with_zts}
-cd ../ZTS
: Minimal load test for ZTS extension
%{__ztsphp} $OPT \
@@ -222,7 +217,6 @@ cd ../ZTS
%endif
%if %{with tests}
-cd ../NTS
RET=0
: Running a server
@@ -297,7 +291,7 @@ fi
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -311,6 +305,9 @@ fi
%changelog
+* Fri Sep 1 2023 Remi Collet <remi@remirepo.net> - 8.0.30-2
+- build out of sources tree
+
* Tue Jul 26 2022 Remi Collet <remi@remirepo.net> - 8.0.30-1
- update to 8.0.30