diff options
Diffstat (limited to 'php-pecl-msgpack.spec')
-rw-r--r-- | php-pecl-msgpack.spec | 163 |
1 files changed, 72 insertions, 91 deletions
diff --git a/php-pecl-msgpack.spec b/php-pecl-msgpack.spec index 3fa4910..7f4da45 100644 --- a/php-pecl-msgpack.spec +++ b/php-pecl-msgpack.spec @@ -3,28 +3,26 @@ # # Fedora spec file for php-pecl-msgpack # -# Copyright (c) 2012-2022 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2012-2024 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%if 0%{?scl:1} -%scl_package php-pecl-msgpack -%endif +%{?scl:%scl_package php-pecl-msgpack} %global gh_commit 943d27267fbf6da6b4d225f344f4731aec0c671b %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner msgpack %global gh_project msgpack-php -#global gh_date 20171026 %global pecl_name msgpack %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global ini_name 40-%{pecl_name}.ini -%global upstream_version 2.2.0 -%global upstream_prever RC2 -%global upstream_lower RC2 +%global upstream_version 3.0.0 +#global upstream_prever RC1 +%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever} +%global _configure ../%{sources}/configure # to use system library %bcond_with msgpack @@ -34,21 +32,17 @@ Summary: API for communicating with MessagePack serialization Name: %{?scl_prefix}php-pecl-msgpack -License: BSD -Version: %{upstream_version}%{?upstream_lower:~%{upstream_lower}} +License: BSD-3-Clause +Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} URL: https://pecl.php.net/package/msgpack -%if 0%{?gh_date:1} -Release: 0.7.%{gh_date}.%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz -%else Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz -%endif BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.0 BuildRequires: %{?scl_prefix}php-pear +BuildRequires: %{?scl_prefix}php-pecl-apcu-devel %if %{with msgpack} BuildRequires: msgpack-devel %else @@ -57,26 +51,12 @@ Provides: bundled(msgpack) = 3.2.0 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 "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -%if "%{php_version}" > "7.3" -Obsoletes: php73-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.4" -Obsoletes: php74-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.0" -Obsoletes: php80-pecl-%{pecl_name} <= %{version} -%endif -%endif - %description This extension provide API for communicating with MessagePack serialization. @@ -91,8 +71,6 @@ If you ever wished to use JSON for convenience (storing an image with metadata) but could not for technical reasons (encoding, size, speed...), MessagePack is a perfect replacement. -This extension is still EXPERIMENTAL. - Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}. @@ -109,17 +87,10 @@ These are the files needed to compile programs using MessagePack serializer. %prep %setup -qc -%if 0%{?gh_date:1} -mv %{gh_project}-%{gh_commit} NTS -mv NTS/package.xml . -sed -e '/release/s/0.5.6/%{version}%{?gh_date:dev}/' -i package.xml -%else -mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS -%endif -%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} +sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml -cd NTS +cd %{sources} %if %{with msgpack} # use system library rm -rf msgpack @@ -133,9 +104,9 @@ if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}%{?gh_date:-dev} fi cd .. +mkdir NTS %if %{with_zts} -# duplicate for ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif # Drop in the bit of configuration @@ -146,45 +117,50 @@ extension = %{pecl_name}.so ; Configuration options ;msgpack.error_display = On -;msgpack.illegal_key_insert = Off ;msgpack.php_only = On +;msgpack.assoc = On +;msgpack.illegal_key_insert = Off +;msgpack.use_str8_serialization = On EOF %build %{?dtsenable} -cd NTS -%{_bindir}/phpize -%configure --with-php-config=%{_bindir}/php-config -make %{?_smp_mflags} +cd %{sources} +%{__phpize} +[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global +sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL + +cd ../NTS +%configure --with-php-config=%{__phpconfig} +%make_build %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize -%configure --with-php-config=%{_bindir}/zts-php-config -make %{?_smp_mflags} +%configure --with-php-config=%{__ztsphpconfig} +%make_build %endif %install %{?dtsenable} -# Install the NTS stuff -make -C NTS install INSTALL_ROOT=%{buildroot} +: Install the NTS stuff +%make_install -C NTS install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} %if %{with_zts} -# Install the ZTS stuff -make -C ZTS install INSTALL_ROOT=%{buildroot} +: Install the ZTS stuff +%make_install -C ZTS install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif -# Install the package XML file +: Install the package XML file install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml -# Test & Documentation -cd NTS +: install Test and Documentation +cd %{sources} for i in $(grep 'role="test"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') do [ -f tests/$i ] && install -Dpm 644 tests/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/tests/$i [ -f $i ] && install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i @@ -202,59 +178,41 @@ rm */tests/034.phpt rm */tests/035.phpt %endif -cd NTS +%if "%{php_version}" > "7.4" +OPT="-q -P --show-diff %{?_smp_mflags}" +%else +OPT="-q -P --show-diff" +export REPORT_EXIT_STATUS=1 +%endif + +cd %{sources} : Minimal load test for NTS extension %{__php} --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --modules | grep '^%{pecl_name}$' %if %{with tests} : Upstream test suite for NTS extension -TEST_PHP_EXECUTABLE=%{__php} \ -TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \ -REPORT_EXIT_STATUS=1 \ -%{__php} -n run-tests.php -q --show-diff +TEST_PHP_ARGS="-n -d extension=apcu.so -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \ +%{__php} -n run-tests.php $OPT %endif %if %{with_zts} -cd ../ZTS : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --modules | grep '^%{pecl_name}$' %if %{with tests} : Upstream test suite for ZTS extension -TEST_PHP_EXECUTABLE=%{__ztsphp} \ -TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \ -REPORT_EXIT_STATUS=1 \ -%{__ztsphp} -n run-tests.php -q --show-diff +TEST_PHP_ARGS="-n -d extension=apcu.so -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \ +%{__ztsphp} -n run-tests.php $OPT %endif %endif -%if 0%{?fedora} < 24 && 0%{?rhel} < 8 -# when pear installed alone, after us -%triggerin -- %{?scl_prefix}php-pear -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -# posttrans as pear can be installed after us -%posttrans -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -%postun -if [ $1 -eq 0 -a -x %{__pecl} ] ; then - %{pecl_uninstall} %{pecl_name} >/dev/null || : -fi -%endif - - %files -%{?_licensedir:%license NTS/LICENSE} +%license %{sources}/LICENSE %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -277,6 +235,29 @@ fi %changelog +* Thu Sep 26 2024 Remi Collet <remi@remirepo.net> - 3.0.0-1 +- update to 3.0.0 + +* Tue Sep 24 2024 Remi Collet <remi@remirepo.net> - 3.0.0~RC1-2 +- rebuild for 8.4.0RC1 + +* Mon Aug 26 2024 Remi Collet <remi@remirepo.net> - 3.0.0~RC1-1 +- update to 3.0.0RC1 +- drop patch merged upstream +- add APCu support + +* Fri Jul 5 2024 Remi Collet <remi@remirepo.net> - 2.2.0-3 +- fix test suite with 8.4 using patch from + https://github.com/msgpack/msgpack-php/pull/174 + +* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 2.2.0-2 +- rebuild for PHP 8.3.0RC1 + +* Fri Jun 2 2023 Remi Collet <remi@remirepo.net> - 2.2.0-1 +- update to 2.2.0 +- build out of sources tree +- use parallel execution for test suite + * Fri Oct 7 2022 Remi Collet <remi@remirepo.net> - 2.2.0~RC2-1 - update to 2.2.0RC2 |