summaryrefslogtreecommitdiffstats
path: root/php-pecl-skywalking-agent.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-skywalking-agent.spec')
-rw-r--r--php-pecl-skywalking-agent.spec60
1 files changed, 33 insertions, 27 deletions
diff --git a/php-pecl-skywalking-agent.spec b/php-pecl-skywalking-agent.spec
index e7769e7..351ead5 100644
--- a/php-pecl-skywalking-agent.spec
+++ b/php-pecl-skywalking-agent.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-skywalking-agent
#
-# SPDX-FileCopyrightText: Copyright 2022-2025 Remi Collet
+# SPDX-FileCopyrightText: Copyright 2022-2026 Remi Collet
# SPDX-License-Identifier: CECILL-2.1
# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
@@ -14,24 +14,32 @@
%endif
# notice: ZTS not supported by upstream
-%global pecl_name skywalking_agent
-%global ini_name 40-%{pecl_name}.ini
-%global sources %{pecl_name}-%{version}
+%global pecl_name skywalking_agent
+%global ini_name 40-%{pecl_name}.ini
+%global sources %{archivename}
+
+# Github forge
+%global gh_vend apache
+%global gh_proj skywalking-php
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+%global tag v%{version}
+# for EL-8 to avoid TAG usage
+%global archivename %{gh_proj}-%{version}
## BUILD: Fedora / no EL-8 (rust too old) / EL-9 and EL-10 using --enablerepo=stream if needed
-Summary: Apache SkyWalking PHP Agent
Name: %{?scl_prefix}php-pecl-skywalking-agent
-Version: 1.0.0
-Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Summary: Apache SkyWalking PHP Agent
License: Apache-2.0
-URL: https://pecl.php.net/package/%{pecl_name}
-
-Source0: https://pecl.php.net/get/%{sources}.tgz
+Version: 1.1.0
+Release: 1%{?dist}
+%forgemeta
+URL: %{forgeurl}
+Source0: %{forgesource}
# awfull hack, use a bundled rust registry
Source1: makedeps.sh
-Source2: %{pecl_name}-deps-%{version}.tgz
+Source2: %{gh_proj}-deps-%{version}.tar.gz
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -39,6 +47,7 @@ BuildRequires: %{?dtsprefix}gcc-c++
BuildRequires: %{?scl_prefix}php-devel >= 7.2
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: cargo >= 1.85
+BuildRequires: rust >= 1.85
BuildRequires: rustfmt
BuildRequires: protobuf-compiler
BuildRequires: clang-devel
@@ -54,12 +63,15 @@ BuildRequires: rust-packaging
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
+# Extension
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
+# PECL
Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
+# No PIE for now
%description
@@ -72,11 +84,6 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -c -a2
-# Don't install/register tests
-sed -e 's/role="test"/role="src"/' \
- -e '/LICENSE/s/role="doc"/role="src"/' \
- -i package.xml
-
# Create cargo configuration to use vendor directory
mkdir .cargo
cat << EOF | tee .cargo/config.toml
@@ -127,7 +134,7 @@ extension=%{pecl_name}.so
;skywalking_agent.ssl_cert_chain_path =
;skywalking_agent.heartbeat_period = 30
;skywalking_agent.properties_report_period_factor = 10
-;skywalking_agent.enable_zend_observer = 0
+;skywalking_agent.enable_zend_observer = 1
;skywalking_agent.reporter_type = grpc
;skywalking_agent.kafka_bootstrap_servers =
;skywalking_agent.kafka_producer_config = {}
@@ -170,14 +177,6 @@ make install INSTALL_ROOT=%{buildroot}
# install config file
install -D -m 644 ../%{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
-# Install XML package description
-install -D -m 644 ../package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
-
-# Documentation
-for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
-done
-
%check
# Minimal load test for the extension
@@ -188,14 +187,21 @@ done
%files
%license %{sources}/LICENSE %{sources}/dist-material/licenses/LICENSE*
-%doc %{pecl_docdir}/%{pecl_name}
-%{pecl_xmldir}/%{name}.xml
+#%%doc %%{sources}/composer.json
+%doc %{sources}/*.md
+%doc %{sources}/NOTICE
+%doc %{sources}/docs
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
%changelog
+* Mon Mar 16 2026 Remi Collet <remi@remirepo.net> - 1.1.0-1
+- update to 1.1.0
+- drop pear/pecl dependency
+- sources from github
+
* Tue Apr 22 2025 Remi Collet <remi@remirepo.net> - 1.0.0-1
- update to 1.0.0