summaryrefslogtreecommitdiffstats
path: root/php-pecl-hdr-histogram.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-hdr-histogram.spec')
-rw-r--r--php-pecl-hdr-histogram.spec64
1 files changed, 32 insertions, 32 deletions
diff --git a/php-pecl-hdr-histogram.spec b/php-pecl-hdr-histogram.spec
index b1730d2..3e8b3d5 100644
--- a/php-pecl-hdr-histogram.spec
+++ b/php-pecl-hdr-histogram.spec
@@ -1,34 +1,32 @@
# remirepo spec file for php-pecl-hdr-histogram
#
-# Copyright (c) 2016-2023 Remi Collet
+# Copyright (c) 2016-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-hdr-histogram
-%endif
-%bcond_without tests
+%{?scl:%scl_package php-pecl-hdr-histogram}
+
+%bcond_without tests
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%global proj_name hdr_histogram
-%global pecl_name hdrhistogram
-%global ini_name 40-%{pecl_name}.ini
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
+%global proj_name hdr_histogram
+%global pecl_name hdrhistogram
+%global ini_name 40-%{pecl_name}.ini
+%global sources %{proj_name}-%{version}
+%global _configure ../%{sources}/configure
Summary: PHP extension wrapper for the C hdrhistogram API
Name: %{?scl_prefix}php-pecl-hdr-histogram
-Version: 0.4.2
-Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-License: MIT
+Version: 0.5.0
+Release: 0%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+License: BSD-2-Clause
Group: Development/Languages
URL: https://pecl.php.net/package/%{proj_name}
-Source: https://pecl.php.net/get/%{proj_name}-%{version}.tgz
-
-Patch0: %{proj_name}-arginfo.patch
-Patch1: %{proj_name}-lib0114.patch
+Source: https://pecl.php.net/get/%{sources}.tgz
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -40,7 +38,6 @@ BuildRequires: HdrHistogram_c6php-devel >= 0.11.7
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}
@@ -63,17 +60,13 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -c -q
-mv %{proj_name}-%{version} NTS
# Remove test file to avoid regsitration
sed -e 's/role="test"/role="src"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
-cd NTS
-%patch -P0 -p1 -b .pr13
-%patch -P1 -p1 -b .pr15
-
+cd %{sources}
# Check upstream version (often broken)
extver=$(sed -n '/#define PHP_HDR_HISTOGRAM_VERSION/{s/.* "//;s/".*$//;p}' php_hdrhistogram.h)
if test "x${extver}" != "x%{version}"; then
@@ -87,25 +80,26 @@ cat << 'EOF' | tee %{ini_name}
extension=%{pecl_name}.so
EOF
-cp -pr NTS ZTS
+mkdir NTS ZTS
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
%configure \
--with-libdir=%{_lib} \
- --with-php-config=%{_bindir}/php-config
+ --with-php-config=%{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
--with-libdir=%{_lib} \
- --with-php-config=%{_bindir}/zts-php-config
+ --with-php-config=%{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -127,14 +121,14 @@ install -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
# Documentation
-cd NTS
+cd %{sources}
for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{proj_name}/$i
done
%check
-cd NTS
+cd %{sources}
OPT="-n"
[ -f %{php_extdir}/json.so ] && OPT="$OPT -d extension=json.so"
@@ -152,7 +146,6 @@ REPORT_EXIT_STATUS=1 \
%endif
%if %{with_zts}
-cd ../ZTS
: Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
@@ -189,7 +182,7 @@ fi
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{proj_name}
%{pecl_xmldir}/%{name}.xml
@@ -203,6 +196,13 @@ fi
%changelog
+* Tue Apr 23 2024 Remi Collet <remi@remirepo.net> - 0.5.0-0
+- test build for upcoming 0.5.0
+- drop patches merged upstream
+
+* Fri Sep 1 2023 Remi Collet <remi@remirepo.net> - 0.4.2-4
+- build out of sources tree
+
* Thu Apr 27 2023 Remi Collet <remi@remirepo.net> - 0.4.2-3
- improved patch for libhdr_histogram 0.11.7