summaryrefslogtreecommitdiffstats
path: root/php-pecl-hdr-histogram.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-06-15 11:56:14 +0200
committerRemi Collet <remi@remirepo.net>2020-06-15 11:56:14 +0200
commitcfee9b63be194032ffe6b52e3453fc544b454552 (patch)
treec5cc16de9441c88d20b01435076cafc63e307d06 /php-pecl-hdr-histogram.spec
parentd93899e1e718dbdbf466867f918707dab0471574 (diff)
cleanup macro names
Diffstat (limited to 'php-pecl-hdr-histogram.spec')
-rw-r--r--php-pecl-hdr-histogram.spec48
1 files changed, 22 insertions, 26 deletions
diff --git a/php-pecl-hdr-histogram.spec b/php-pecl-hdr-histogram.spec
index 5c3de51..69c5097 100644
--- a/php-pecl-hdr-histogram.spec
+++ b/php-pecl-hdr-histogram.spec
@@ -12,12 +12,12 @@
%endif
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%global pecl_name hdr_histogram
-%global ext_name hdrhistogram
+%global proj_name hdr_histogram
+%global pecl_name hdrhistogram
%if "%{php_version}" < "5.6"
-%global ini_name %{ext_name}.ini
+%global ini_name %{pecl_name}.ini
%else
-%global ini_name 40-%{ext_name}.ini
+%global ini_name 40-%{pecl_name}.ini
%endif
Summary: PHP extension wrapper for the C hdrhistogram API
@@ -26,9 +26,9 @@ Version: 0.3.0
Release: 12%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: MIT
Group: Development/Languages
-URL: https://pecl.php.net/package/%{pecl_name}
+URL: https://pecl.php.net/package/%{proj_name}
-Source: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Source: https://pecl.php.net/get/%{proj_name}-%{version}.tgz
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel
@@ -41,12 +41,8 @@ Requires: %{?scl_prefix}php(api) = %{php_core_api}
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
+Provides: %{?scl_prefix}php-pecl(%{proj_name}) = %{version}
+Provides: %{?scl_prefix}php-pecl(%{proj_name})%{?_isa} = %{version}
%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
@@ -90,7 +86,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -c -q
-mv %{pecl_name}-%{version} NTS
+mv %{proj_name}-%{version} NTS
# Remove test file to avoid regsitration
sed -e 's/role="test"/role="src"/' \
@@ -109,8 +105,8 @@ fi
cd ..
cat << 'EOF' | tee %{ini_name}
-; Enable %{pecl_name} extension module
-extension=%{ext_name}.so
+; Enable %{proj_name} extension module
+extension=%{pecl_name}.so
EOF
cp -pr NTS ZTS
@@ -155,7 +151,7 @@ install -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
# Documentation
cd NTS
for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
+do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{proj_name}/$i
done
@@ -163,12 +159,12 @@ done
cd NTS
: Minimal load test for NTS extension
%{__php} --no-php-ini \
- --define extension=%{buildroot}%{php_extdir}/%{ext_name}.so \
- --modules | grep %{ext_name}
+ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
+ --modules | grep %{pecl_name}
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
-TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{ext_name}.so" \
+TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
%{__php} -n run-tests.php --show-diff
@@ -177,12 +173,12 @@ REPORT_EXIT_STATUS=1 \
cd ../ZTS
: Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \
- --define extension=%{buildroot}%{php_ztsextdir}/%{ext_name}.so \
- --modules | grep %{ext_name}
+ --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}/%{ext_name}.so" \
+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
@@ -205,22 +201,22 @@ fi
%postun
if [ $1 -eq 0 -a -x %{__pecl} ] ; then
- %{pecl_uninstall} %{pecl_name} >/dev/null || :
+ %{pecl_uninstall} %{proj_name} >/dev/null || :
fi
%endif
%files
%{?_licensedir:%license NTS/LICENSE}
-%doc %{pecl_docdir}/%{pecl_name}
+%doc %{pecl_docdir}/%{proj_name}
%{pecl_xmldir}/%{name}.xml
%config(noreplace) %{php_inidir}/%{ini_name}
-%{php_extdir}/%{ext_name}.so
+%{php_extdir}/%{pecl_name}.so
%if %{with_zts}
%config(noreplace) %{php_ztsinidir}/%{ini_name}
-%{php_ztsextdir}/%{ext_name}.so
+%{php_ztsextdir}/%{pecl_name}.so
%endif