summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2022-09-19 16:08:41 +0200
committerRemi Collet <remi@php.net>2022-09-19 16:08:41 +0200
commit7df56eb394fe565f8c1f29acc378a14592cc4887 (patch)
tree4de3f8936eb4daf37d1c1fb43160c1b83b6874fb
parenta51874008c21a462cf8a48f2d095c1ff80f5d43e (diff)
fix SCL build
-rw-r--r--php-pecl-skywalking.spec13
1 files changed, 6 insertions, 7 deletions
diff --git a/php-pecl-skywalking.spec b/php-pecl-skywalking.spec
index 958ef0b..4344f27 100644
--- a/php-pecl-skywalking.spec
+++ b/php-pecl-skywalking.spec
@@ -7,8 +7,9 @@
# Please, preserve the changelog entries
#
%if 0%{?scl:1}
-%global sub_prefix %{scl_prefix}
%scl_package php-pecl-skywalking
+%else
+%global _root_bindir %{_bindir}
%endif
%global pecl_name skywalking
@@ -17,7 +18,7 @@
%global ini_name 40-%{pecl_name}.ini
Summary: The PHP instrument agent for Apache SkyWalking
-Name: %{?sub_prefix}php-pecl-%{pecl_name}
+Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 5.0.1
Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: ASL 2.0
@@ -44,7 +45,9 @@ BuildRequires: %{?scl_prefix}php-pcre
BuildRequires: libcurl-devel
BuildRequires: cargo
BuildRequires: rustfmt
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 9
BuildRequires: rust-packaging
+%endif
# Using system rust registry
#BuildRequires: (crate(anyhow/default) >= 1.0.57 with crate(anyhow/default) < 2.0.0~)
#BuildRequires: (crate(cbindgen/default) >= 0.23.0 with crate(cbindgen/default) < 0.24.0~)
@@ -78,10 +81,6 @@ 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
%description
@@ -105,7 +104,7 @@ pushd NTS
mkdir .cargo
cat << EOF | tee .cargo/config.toml
[build]
-rustc = "%{__rustc}"
+rustc = "%{_root_bindir}/rustc"
[env]
CFLAGS = "%{build_cflags}"