summaryrefslogtreecommitdiffstats
path: root/php-pecl-rnp.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2025-07-31 10:42:07 +0200
committerRemi Collet <remi@php.net>2025-07-31 10:42:07 +0200
commitc1503b10626b78b063996e8b58b654373b05b13a (patch)
treed0209ec31452a9f515034411ea6009ec2822f577 /php-pecl-rnp.spec
parentad922b9a6cad49ebcae8a29e08fee61e45aac067 (diff)
fix behavior change with librnp 0.18 using patch fromHEADmaster
https://github.com/rnpgp/php-rnp/pull/11 fix segfault in php_rnp_password_callback using patch from https://github.com/rnpgp/php-rnp/pull/13 re-license spec file to CECILL-2.1
Diffstat (limited to 'php-pecl-rnp.spec')
-rw-r--r--php-pecl-rnp.spec52
1 files changed, 20 insertions, 32 deletions
diff --git a/php-pecl-rnp.spec b/php-pecl-rnp.spec
index fce6fee..b85bf72 100644
--- a/php-pecl-rnp.spec
+++ b/php-pecl-rnp.spec
@@ -1,18 +1,13 @@
# remirepo spec file for php-pecl-rnp
#
-# Copyright (c) 2022-2023 Remi Collet
-# License: CC-BY-SA-4.0
-# http://creativecommons.org/licenses/by-sa/4.0/
+# SPDX-FileCopyrightText: Copyright 2022-2025 Remi Collet
+# SPDX-License-Identifier: CECILL-2.1
+# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
-# we don't want -z defs linker flag
-%undefine _strict_symbol_defs_build
-
-%if 0%{?scl:1}
-%scl_package php-pecl-rnp
-%endif
+%{?scl:%scl_package php-pecl-rnp}
%bcond_without tests
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
@@ -27,12 +22,15 @@
Summary: wrapper around the RNP library
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 3%{?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: BSD-2-Clause
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+Patch0: 11.patch
+Patch1: 13.patch
+
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 8.0
@@ -58,10 +56,13 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%setup -qc
# 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
pushd %{sources}
+%patch -P0 -p1
+%patch -P1 -p1
+
# Check version as upstream often forget to update this
extver=$(sed -n '/define PHP_RNP_VERSION/{s/.* "//;s/".*$//;p}' php_rnp.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}%{?gh_date:-dev}"; then
@@ -149,28 +150,8 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
%endif
-%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
-
-
%files
-%{?_licensedir:%license %{sources}/LICENSE}
+%license %{sources}/LICENSE
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -184,6 +165,13 @@ fi
%changelog
+* Thu Jul 31 2025 Remi Collet <remi@remirepo.net> - 0.2.0-4
+- fix behavior change with librnp 0.18 using patch from
+ https://github.com/rnpgp/php-rnp/pull/11
+- fix segfault in php_rnp_password_callback using patch from
+ https://github.com/rnpgp/php-rnp/pull/13
+- re-license spec file to CECILL-2.1
+
* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 0.2.0-3
- rebuild for PHP 8.3.0RC1