summaryrefslogtreecommitdiffstats
path: root/php-pecl-crypto.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-crypto.spec')
-rw-r--r--php-pecl-crypto.spec58
1 files changed, 28 insertions, 30 deletions
diff --git a/php-pecl-crypto.spec b/php-pecl-crypto.spec
index c82beed..d775069 100644
--- a/php-pecl-crypto.spec
+++ b/php-pecl-crypto.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-crypto
#
-# Copyright (c) 2013-2023 Remi Collet
+# Copyright (c) 2013-2024 Remi Collet
# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -23,11 +23,14 @@
Summary: Wrapper for OpenSSL Crypto Library
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 0.3.2
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP-3.01
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{sources}.tgz
+Patch0: 0001-Fix-Wincompatible-pointer-types.patch
+Patch1: 0001-fix-for-PHP-8.4.patch
+
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel
@@ -55,10 +58,13 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -e '/LICENSE/s/role="doc"/role="src"/' \
-i package.xml
cd %{sources}
+%patch -P0 -p1
+%patch -P1 -p1
+
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_CRYPTO_VERSION/{s/.* "//;s/".*$//;p}' php_crypto.h)
if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then
@@ -84,26 +90,30 @@ EOF
cd %{sources}
%{__phpize}
+[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL
cd ../NTS
%configure \
--with-crypto \
--with-php-config=%{__phpconfig}
-make %{?_smp_mflags}
+
+%make_build
%if %{with_zts}
cd ../ZTS
%configure \
--with-crypto \
--with-php-config=%{__ztsphpconfig}
-make %{?_smp_mflags}
+
+%make_build
%endif
%install
%{?dtsenable}
-make -C NTS install INSTALL_ROOT=%{buildroot}
+%make_install -C NTS
# install config file
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
@@ -112,7 +122,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
%if %{with_zts}
-make -C ZTS install INSTALL_ROOT=%{buildroot}
+%make_install -C ZTS
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
@@ -123,33 +133,13 @@ do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
-%if 0%{?fedora} < 24 && 0%{?rhel} < 8
-# when pear installed alone, after us
-%triggerin -- %{?scl_prefix}php-pear
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-# posttrans as pear can be installed after us
-%posttrans
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-%postun
-if [ $1 -eq 0 -a -x %{__pecl} ] ; then
- %{pecl_uninstall} %{pecl_name} >/dev/null || :
-fi
-%endif
-
-
%check
cd %{sources}
: Minimal load test for NTS extension
%{__php} --no-php-ini \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
%if %{with tests}
: Upstream test suite for NTS extension
@@ -163,7 +153,7 @@ REPORT_EXIT_STATUS=1 \
: Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}//%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
%if %{with tests}
: Upstream test suite for ZTS extension
@@ -176,7 +166,7 @@ REPORT_EXIT_STATUS=1 \
%files
-%{?_licensedir:%license %{sources}/LICENSE}
+%license %{sources}/LICENSE
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
%config(noreplace) %{php_inidir}/%{ini_name}
@@ -190,6 +180,14 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Wed Sep 25 2024 Remi Collet <remi@remirepo.net> - 0.3.2-4
+- fix build with PHP 8.4 using patch from
+ https://github.com/bukka/php-crypto/pull/42
+
+* Fri Feb 16 2024 Remi Collet <remi@remirepo.net> - 0.3.2-3
+- fix [-Wincompatible-pointer-types] using patch from
+ https://github.com/bukka/php-crypto/pull/40
+
* Thu Aug 31 2023 Remi Collet <remi@remirepo.net> - 0.3.2-2
- build out of sources tree