summaryrefslogtreecommitdiffstats
path: root/php-pinba.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2026-06-19 11:57:32 +0200
committerRemi Collet <remi@php.net>2026-06-19 11:57:32 +0200
commit1ebdca26999d8a308b9920301713749d8a860f6b (patch)
tree40b4e968fcc8d53779d3039fa9afdd64b4ba9c1e /php-pinba.spec
parent220c72bc19d8c2d323695d71a9ae98839ef2d9cb (diff)
update to 1.4.0
switch to XOlegator fork drop ZTS build re-license spec file to CECILL-2.1 add pie virtual provides
Diffstat (limited to 'php-pinba.spec')
-rw-r--r--php-pinba.spec164
1 files changed, 56 insertions, 108 deletions
diff --git a/php-pinba.spec b/php-pinba.spec
index fdeec54..e5c98fd 100644
--- a/php-pinba.spec
+++ b/php-pinba.spec
@@ -1,95 +1,67 @@
# remirepo spec file for php-pinba
#
-# Copyright (c) 2017-2020 Remi Collet
-# License: CC-BY-SA
-# http://creativecommons.org/licenses/by-sa/4.0/
+# SPDX-FileCopyrightText: Copyright 2017-2026 Remi Collet
+# SPDX-License-Identifier: CECILL-2.1
+# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
-# we don't want -z defs linker flag
-%undefine _strict_symbol_defs_build
-
%{?scl: %scl_package php-pinba}
-%global gh_commit 98c01fb5cde068426aae61d239205db75c507cbf
-%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
-%global gh_owner tony2001
+%global gh_owner XOlegator
%global gh_project pinba_extension
-%global pecl_name pinba
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%global ini_name 40-%{pecl_name}.ini
+%global pie_vend xolegator
+%global pie_proj %{gh_project}
+%global ext_name pinba
+%global ini_name 40-%{ext_name}.ini
+%global forgeurl https://github.com/%{gh_owner}/%{gh_project}
-Summary: Client extension for Pinba statistics server
Name: %{?scl_prefix}php-pinba
-Version: 1.1.2
-%if 0%{?gh_date:1}
-Release: 1%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-%else
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-%endif
-License: LGPLv2+
-URL: https://github.com/%{gh_owner}/%{gh_project}
-Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
-
+Summary: Client extension for Pinba statistics server
+Version: 1.4.0
+Release: 1%{?dist}
+License: LGPL-2.1-or-later
+%forgemeta
+URL: %{forgeurl}
+Source0: %{forgesource}
+
+BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel > 7
-BuildRequires: %{?scl_prefix}php-tokenizer
+BuildRequires: %{?scl_prefix}php-devel > 8.2
+BuildRequires: protobuf-c-devel
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
-
-%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-%if "%{php_version}" > "7.2"
-Obsoletes: php72u-%{pecl_name} <= %{version}
-Obsoletes: php72w-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-%{pecl_name} <= %{version}
-Obsoletes: php73w-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-%{pecl_name} <= %{version}
-Obsoletes: php74w-%{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
+
+# PIE
+Provides: %{?scl_prefix}php-pie(%{pie_vend}/%{pie_proj}) = %{version}
+Provides: %{?scl_prefix}php-%{pie_vend}-%{pie_proj} = %{version}
%description
-Client extension for Pinba statistics server.
+Pinba Extension is the PHP client extension for the Pinba monitoring stack.
+
+It collects timing and request metrics inside PHP, serializes them with
+protobuf, and sends them over UDP to Pinba Engine.
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 -qc
-mv %{gh_project}-%{gh_commit} NTS
+%forgesetup
-cd NTS
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_PINBA_VERSION/{s/.* "//;s/".*$//;p}' php_pinba.h)
if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then
: Error: Upstream extension version is ${extver}, expecting %{version}%{?gh_date:-dev}.
exit 1
fi
-cd ..
-
-%if %{with_zts}
-# duplicate for ZTS build
-cp -pr NTS ZTS
-%endif
# Drop in the bit of configuration
cat << 'EOF' | tee %{ini_name}
; Enable '%{summary}' extension module
-extension = %{pecl_name}.so
+extension = %{ext_name}.so
; Configuration
;pinba.server = ''
@@ -102,83 +74,59 @@ EOF
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
-%configure \
- --with-php-config=%{_bindir}/php-config \
- --enable-pinba
-make %{?_smp_mflags}
+%{__phpize}
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global
-%if %{with_zts}
-cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
- --with-php-config=%{_bindir}/zts-php-config \
+ --with-php-config=%{__phpconfig} \
--enable-pinba
-make %{?_smp_mflags}
-%endif
+
+%make_build
%install
%{?dtsenable}
-# Install the NTS stuff
-make -C NTS install INSTALL_ROOT=%{buildroot}
-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 -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
-%endif
+# Install the extension
+%make_install
+# Install the configuration file
+install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
%check
-cd NTS
: Minimal load test for NTS extension
%{__php} --no-php-ini \
- --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --define extension=%{buildroot}%{php_extdir}/%{ext_name}.so \
+ --modules | grep '^%{ext_name}$'
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
-TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
+TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{ext_name}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
-%{__php} -n run-tests.php --show-diff || : ignore
-
-%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}
-
-: Upstream test suite for ZTS extension
-TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
-NO_INTERACTION=1 \
-REPORT_EXIT_STATUS=1 \
-%{__ztsphp} -n run-tests.php --show-diff
-%endif
+%{__php} -n run-tests.php --show-diff
%files
-%{!?_licensedir:%global license %%doc}
-#license NTS/LICENSE
-%doc NTS/{CREDITS,NEWS,README}
+%license LICENSE
+%doc composer.json
+%doc AUTHORS
+%doc NOTICE
+%doc *.md
%config(noreplace) %{php_inidir}/%{ini_name}
-%{php_extdir}/%{pecl_name}.so
-
-%if %{with_zts}
-%config(noreplace) %{php_ztsinidir}/%{ini_name}
-%{php_ztsextdir}/%{pecl_name}.so
-%endif
+%{php_extdir}/%{ext_name}.so
%changelog
+* Fri Jun 19 2026 Remi Collet <remi@remirepo.net> - 1.4.0-1
+- update to 1.4.0
+- switch to XOlegator fork
+- drop ZTS build
+- re-license spec file to CECILL-2.1
+- add pie virtual provides
+
* Sun Aug 2 2020 Remi Collet <remi@remirepo.net> - 1.1.2-1
- update to 1.1.2