diff options
-rw-r--r-- | php-pecl-mongodb.spec | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/php-pecl-mongodb.spec b/php-pecl-mongodb.spec index eb27510..ffdc75d 100644 --- a/php-pecl-mongodb.spec +++ b/php-pecl-mongodb.spec @@ -49,8 +49,9 @@ Name: %{?scl_prefix}php-pecl-%{pecl_name} %global upstream_version 1.15.2 #global upstream_prever beta1 #global upstream_lower ~beta1 +%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever} Version: %{upstream_version}%{?upstream_lower} -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;')}} %if %{with syslib} License: Apache-2.0 %else @@ -126,14 +127,12 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -q -c -mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS - # Don't install/register tests sed -e 's/role="test"/role="src"/' \ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ -i package.xml -pushd NTS +pushd %{sources} %if %{with syslib} # Check our macro values @@ -154,9 +153,9 @@ fi popd +mkdir NTS %if %{with_zts} -# Duplicate source tree for NTS / ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif # Create configuration file @@ -169,21 +168,16 @@ extension=%{pecl_name}.so EOF +%global _configure ../%{sources}/configure + %build %{?dtsenable} peclbuild() { - %{_bindir}/${1}ize - -%if %{with syslib} - # Ensure we use system library - # Need to be removed only after phpize because of m4_include - rm -r src/libmongoc* - %configure \ +%if %{with syslib} --with-mongodb-system-libs \ %else - %configure \ --enable-mongodb-crypto-system-profile \ --with-mongodb-sasl=cyrus \ --with-mongodb-icu=yes \ @@ -196,7 +190,15 @@ peclbuild() { make %{?_smp_mflags} } -cd NTS +cd %{sources} +phpize +%if %{with syslib} + # Ensure we use system library + # Need to be removed only after phpize because of m4_include + rm -r src/libmongoc* +%endif + +cd ../NTS peclbuild php %if %{with_zts} @@ -224,7 +226,7 @@ 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 install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done @@ -290,7 +292,7 @@ if [ -s server.pid ] ; then : Run the test suite echo '{"STANDALONE": "mongodb://127.0.0.1:27017"}' | tee /tmp/PHONGO-SERVERS.json - pushd NTS + pushd %{sources} TEST_PHP_ARGS="$OPT -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ %{__php} -n run-tests.php -q -P --show-diff || ret=1 @@ -315,7 +317,7 @@ exit $ret %files -%{?_licensedir:%license NTS/LICENSE} +%{?_licensedir:%license %{sources}/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -329,6 +331,9 @@ exit $ret %changelog +* Tue Apr 25 2023 Remi Collet <remi@remirepo.net> - 1.15.2-2 +- build out of sources tree + * Sat Apr 22 2023 Remi Collet <remi@remirepo.net> - 1.15.2-1 - update to 1.15.2 (no change) - EL-7 use bundled libbson and libmongc 1.23.3 |