summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-pecl-xpass.spec86
1 files changed, 20 insertions, 66 deletions
diff --git a/php-pecl-xpass.spec b/php-pecl-xpass.spec
index 7f062e0..81b6925 100644
--- a/php-pecl-xpass.spec
+++ b/php-pecl-xpass.spec
@@ -1,3 +1,6 @@
+# Fedora spec file for php-pecl-xpass
+# without SCL compatibility from:
+#
# remirepo spec file for php-pecl-xpass
#
# Copyright (c) 2024 Remi Collet
@@ -9,18 +12,18 @@
%bcond_without tests
-%{?scl:%scl_package php-pecl-xpass}
+# For EPEL-9
+%{!?__phpize: %global __phpize %{_bindir}/phpize}
+%{!?__phpconfig: %global __phpconfig %{_bindir}/php-config}
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name xpass
%global ini_name 40-%{pecl_name}.ini
%global upstream_version 1.0.0
%global upstream_prever RC2
%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
-%global _configure ../%{sources}/configure
-Summary: RPM information
-Name: %{?scl_prefix}php-pecl-%{pecl_name}
+Summary: Extended password extension
+Name: php-pecl-%{pecl_name}
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: PHP-3.01
@@ -28,18 +31,18 @@ URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{sources}.tgz
BuildRequires: make
-BuildRequires: %{?dtsprefix}gcc
+BuildRequires: gcc
BuildRequires: pkgconfig(libxcrypt) >= 4.4
-BuildRequires: %{?scl_prefix}php-devel >= 8.0
-BuildRequires: %{?scl_prefix}php-pear
+BuildRequires: php-devel >= 8.0
+BuildRequires: php-pear
-Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
-Requires: %{?scl_prefix}php(api) = %{php_core_api}
+Requires: php(zend-abi) = %{php_zend_api}
+Requires: 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}
+Provides: php-%{pecl_name} = %{version}
+Provides: php-%{pecl_name}%{?_isa} = %{version}
+Provides: php-pecl(%{pecl_name}) = %{version}
+Provides: php-pecl(%{pecl_name})%{?_isa} = %{version}
%description
@@ -50,9 +53,6 @@ distributions, using extended crypt library (libxcrypt):
* yescrypt used on modern distributions
-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 -q -c
@@ -70,11 +70,6 @@ if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
fi
cd ..
-mkdir NTS
-%if %{with_zts}
-mkdir ZTS
-%endif
-
# Create configuration file
cat << 'EOF' | tee %{ini_name}
; Enable '%{summary}' extension module
@@ -83,33 +78,18 @@ EOF
%build
-%{?dtsenable}
-
cd %{sources}
%{__phpize}
-cd ../NTS
%configure \
--enable-xpass \
--with-libdir=%{_lib} \
--with-php-config=%{__phpconfig}
make %{?_smp_mflags}
-%if %{with_zts}
-cd ../ZTS
-%configure \
- --enable-xpass \
- --with-libdir=%{_lib} \
- --with-php-config=%{__ztsphpconfig}
-make %{?_smp_mflags}
-%endif
-
%install
-%{?dtsenable}
-
-make -C NTS \
- install INSTALL_ROOT=%{buildroot}
+make -C %{sources} install INSTALL_ROOT=%{buildroot}
# install config file
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
@@ -117,13 +97,6 @@ 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
-%if %{with_zts}
-make -C ZTS \
- install INSTALL_ROOT=%{buildroot}
-
-install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
-%endif
-
# Documentation
for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
@@ -132,44 +105,25 @@ done
%check
cd %{sources}
-# Minimal load test for NTS extension
+# Minimal load test
%{__php} --no-php-ini \
--define extension=%{buildroot}/%{php_extdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
%if %{with tests}
-# Upstream test suite for NTS extension
+# Upstream test suite
TEST_PHP_ARGS="-n -d extension=%{buildroot}/%{php_extdir}/%{pecl_name}.so" \
%{__php} -n run-tests.php -q --show-diff %{?_smp_mflags}
%endif
-%if %{with_zts}
-# Minimal load test for ZTS extension
-%{__ztsphp} --no-php-ini \
- --define extension=%{buildroot}/%{php_ztsextdir}/%{pecl_name}.so \
- --modules | grep '^%{pecl_name}$'
-
-%if %{with tests}
-# Upstream test suite for ZTS extension
-TEST_PHP_ARGS="-n -d extension=%{buildroot}/%{php_ztsextdir}/%{pecl_name}.so" \
-%{__ztsphp} -n run-tests.php -q --show-diff %{?_smp_mflags}
-%endif
-%endif
-
%files
%license %{sources}/LICENSE
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
-
%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
-
%changelog
* Mon Sep 2 2024 Remi Collet <remi@remirepo.net> - 1.0.0~RC2-1