summaryrefslogtreecommitdiffstats
path: root/php-pecl-bitset.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-bitset.spec')
-rw-r--r--php-pecl-bitset.spec140
1 files changed, 67 insertions, 73 deletions
diff --git a/php-pecl-bitset.spec b/php-pecl-bitset.spec
index 5710d7c..b3ed613 100644
--- a/php-pecl-bitset.spec
+++ b/php-pecl-bitset.spec
@@ -1,29 +1,37 @@
# remirepo spec file for php-pecl-bitset
#
-# Copyright (c) 2014-2018 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2014-2023 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
%{?scl: %scl_package php-pecl-bitset}
+# Defined in Fedora >= 37 and RHEL >= 10, in PHP >= 7.4 for remirepo
+%{!?__phpize: %global __phpize %{_bindir}/phpize}
+%{!?__ztsphpize: %global __ztsphpize %{_bindir}/zts-phpize}
+%{!?__phpconfig: %global __phpconfig %{_bindir}/php-config}
+%{!?__ztsphpconfig:%global __ztsphpconfig %{_bindir}/zts-php-config}
+
+%bcond_without tests
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name bitset
-%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
%global ini_name 40-%{pecl_name}.ini
+%global sources %{pecl_name}-%{version}
+%global _configure ../%{sources}/configure
-Summary: BITSET library
+Summary: BITSET extension
Name: %{?scl_prefix}php-pecl-%{pecl_name}
-Version: 3.0.1
+Version: 3.2.0
Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-License: PHP
-Group: Development/Languages
-URL: http://pecl.php.net/package/%{pecl_name}
-Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+License: PHP-3.01
+URL: https://pecl.php.net/package/%{pecl_name}
+Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel > 7
+BuildRequires: %{?scl_prefix}php-devel >= 7.0
BuildRequires: %{?scl_prefix}php-pear
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
@@ -34,61 +42,25 @@ 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 "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-# Other third party repo stuff
-Obsoletes: php53-pecl-%{pecl_name} <= %{version}
-Obsoletes: php53u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php54-pecl-%{pecl_name} <= %{version}
-Obsoletes: php54w-pecl-%{pecl_name} <= %{version}
-Obsoletes: php55u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php55w-pecl-%{pecl_name} <= %{version}
-Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
-Obsoletes: php70u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php70w-pecl-%{pecl_name} <= %{version}
-%if "%{php_version}" > "7.1"
-Obsoletes: php71u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php71w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.2"
-Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.3"
-Obsoletes: php73u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
-
-%if 0%{?fedora} < 20 && 0%{?rhel} < 7
-# Filter shared private
-%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
-%{?filter_setup}
-%endif
%description
-Bitsets manipulation library.
+The BitSet extension assists by providing a mechanism to manage sets of bits.
+
+This provides a similar API (object-based) to java.util.BitSet with some
+PHP-specific flavoring.
Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
%prep
%setup -q -c
-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
-
+cd %{sources}
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_BITSET_VERSION/{s/.* "//;s/".*$//;p}' php_bitset.h)
if test "x${extver}" != "x%{version}"; then
@@ -97,9 +69,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
@@ -112,17 +84,18 @@ EOF
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
%configure \
- --with-php-config=%{_bindir}/php-config
+ --with-php-config=%{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
- --with-php-config=%{_bindir}/zts-php-config
+ --with-php-config=%{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -146,7 +119,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
@@ -171,41 +144,38 @@ fi
%check
-cd NTS
+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}
+%if %{with tests}
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
-TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \
-NO_INTERACTION=1 \
+TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
-%{__php} -n run-tests.php --show-diff
+%{__php} -n run-tests.php -q --show-diff
%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}
+%if %{with tests}
: Upstream test suite for ZTS extension
-TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \
-TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \
-NO_INTERACTION=1 \
+TEST_PHP_EXECUTABLE=%{__ztsphp} \
+TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
-%{_bindir}/zts-php -n run-tests.php --show-diff
+%{__ztsphp} -n run-tests.php -q --show-diff
%endif
%endif
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -219,6 +189,30 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 3.2.0-3
+- rebuild for PHP 8.3.0RC1
+
+* Fri May 26 2023 Remi Collet <remi@remirepo.net> - 3.2.0-2
+- build out of sources tree
+- improve description
+
+* Fri May 26 2023 Remi Collet <remi@remirepo.net> - 3.2.0-1
+- update to 3.2.0
+
+* Thu May 25 2023 Remi Collet <remi@remirepo.net> - 3.1.0-1
+- update to 3.1.0
+- drop patch merged upstream
+
+* Fri Sep 9 2022 Remi Collet <remi@remirepo.net> - 3.0.1-6
+- add patch for PHP 8.2 from
+ https://github.com/php/pecl-numbers-bitset/pull/14
+
+* Wed Sep 30 2020 Remi Collet <remi@remirepo.net> - 3.0.1-5
+- rebuild for PHP 8.0.0RC1
+
+* Tue Sep 03 2019 Remi Collet <remi@remirepo.net> - 3.0.1-4
+- rebuild for 7.4.0RC1
+
* Thu Aug 16 2018 Remi Collet <remi@remirepo.net> - 3.0.1-3
- rebuild for 7.3.0beta2 new ABI