summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-12-22 15:51:31 +0100
committerRemi Collet <remi@php.net>2021-12-22 15:51:31 +0100
commita40a6f293af46f48a29e414f308bad190a86ee4e (patch)
treeda3f6cc12ec2f10b73b2bc7a171d9b1ab9e8bd64
parentce86a93f1929233cb6fcc235f418cd7decf03cb0 (diff)
cleanup spec file
-rw-r--r--php-pecl-selinux.spec29
1 files changed, 13 insertions, 16 deletions
diff --git a/php-pecl-selinux.spec b/php-pecl-selinux.spec
index f2d6faf..8d629c4 100644
--- a/php-pecl-selinux.spec
+++ b/php-pecl-selinux.spec
@@ -17,13 +17,12 @@
%undefine _strict_symbol_defs_build
%if 0%{?scl:1}
-%global sub_prefix %{scl_prefix}
%scl_package php-pecl-selinux
%endif
%global pecl_name selinux
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
+%global with_tests 0%{!?_without_tests:1}
%if "%{php_version}" < "5.6"
%global ini_name %{pecl_name}.ini
%else
@@ -31,16 +30,16 @@
%endif
Summary: SELinux binding for PHP scripting language
-Name: %{?sub_prefix}php-pecl-selinux
+Name: %{?scl_prefix}php-pecl-selinux
Version: 0.5.0
-Release: 5%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 7%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel > 7
+BuildRequires: %{?scl_prefix}php-devel >= 7.0
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: libselinux-devel >= 2.0.80
@@ -53,14 +52,9 @@ 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}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-%endif
%if "%{php_version}" > "7.4"
Obsoletes: php74-pecl-%{pecl_name} <= %{version}
%endif
@@ -119,14 +113,16 @@ cp -pr NTS ZTS
cd NTS
%{_bindir}/phpize
%configure \
- --with-php-config=%{_bindir}/php-config
+ --with-php-config=%{_bindir}/php-config \
+ --enable-selinux
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
%{_bindir}/zts-phpize
%configure \
- --with-php-config=%{_bindir}/zts-php-config
+ --with-php-config=%{_bindir}/zts-php-config \
+ --enable-selinux
make %{?_smp_mflags}
%endif
@@ -157,24 +153,22 @@ done
%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}$'
%if %{with_tests}
+cd NTS
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \
-NO_INTERACTION=1 \
REPORT_EXIT_STATUS=0 \
-%{__php} -n run-tests.php --show-diff
+%{__php} -n run-tests.php -q --show-diff
: Ignore result as unreliable in mock
%endif
%if %{with_zts}
-cd ../ZTS
: Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
@@ -218,6 +212,9 @@ fi
%changelog
+* Wed Dec 22 2021 Remi Collet <remi@remirepo.net> - 0.5.0-7
+- cleanup spec file
+
* Wed Sep 01 2021 Remi Collet <remi@remirepo.net> - 0.5.0-5
- rebuild for 8.1.0RC1