# remirepo/fedora spec file for php-pear-crypt-gpg # # Copyright (c) 2015-2023 Remi Collet # License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %{!?__pear: %global __pear %{_bindir}/pear} %global pear_name Crypt_GPG %bcond_with tests Name: php-pear-crypt-gpg Version: 1.6.7 Release: 1%{?dist} Summary: GNU Privacy Guard (GnuPG) License: LGPLv2+ URL: http://pear.php.net/package/%{pear_name} Source0: http://pear.php.net/get/%{pear_name}-%{version}.tgz # Use /usr/bin/gpg1 if available Patch0: %{pear_name}-gpg1.patch BuildArch: noarch BuildRequires: php-pear(PEAR) %if %{with tests} # for tests BuildRequires: phpunit7 BuildRequires: %{_bindir}/gpg1 BuildRequires: %{_bindir}/gpg-agent BuildRequires: %{_bindir}/ps %endif BuildRequires: php-fedora-autoloader-devel Requires(post): %{__pear} Requires(postun): %{__pear} Requires: php-pear(PEAR) Requires: %{_bindir}/gpg1 # From package.pear Requires: php(language) >= 5.4.8 Requires: php-pear(Console_CommandLine) >= 1.1.10 Requires: php-mbstring # From phpcompatinfo report for version 1.4.1 Requires: php-ctype Requires: php-date Requires: php-json Requires: php-pcre Requires: php-spl # Optional Requires: php-posix Requires: php-composer(fedora/autoloader) Provides: php-pear(%{pear_name}) = %{version} Provides: php-composer(pear/crypt_gpg) = %{version} Provides: php-autoloader(pear/crypt_gpg) = %{version} %description This package provides an object oriented interface to GNU Privacy Guard (GnuPG). Though GnuPG can support symmetric-key cryptography, this package is intended only to facilitate public-key cryptography. Autoloader: %{pear_phpdir}/Crypt/GPG/autoload.php %prep %setup -q -c %{?_licensedir:sed -e '/LICENSE/d' -i package.xml} cd %{pear_name}-%{version} if [ -x %{_bindir}/gpg1 ]; then %patch -P0 -p1 -b .rpm sed -e '/Engine.php/s/md5sum="[^"]*"//' \ -i ../package.xml fi mv ../package.xml %{name}.xml %build cd %{pear_name}-%{version} # Empty build section, most likely nothing required. phpab --template fedora --output Crypt/GPG/autoload.php Crypt %install cd %{pear_name}-%{version} %{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml # Clean up unnecessary files rm -rf %{buildroot}%{pear_metadir}/.??* # Install XML package description mkdir -p %{buildroot}%{pear_xmldir} install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir} # Autoloader install -pm 644 Crypt/GPG/autoload.php %{buildroot}/%{pear_phpdir}/Crypt/GPG/autoload.php %if %{with tests} %check cd %{pear_name}-%{version}/tests : Upstream test suite ret=0 for cmd in php php74 php80 php81 php82 php83; do if which $cmd; then $cmd %{_bindir}/phpunit8 \ --include-path=%{buildroot}%{pear_phpdir} \ --verbose . || ret=1 fi done exit $ret %endif %post %{__pear} install --nodeps --soft --force --register-only \ %{pear_xmldir}/%{name}.xml >/dev/null || : %postun if [ $1 -eq 0 ] ; then %{__pear} uninstall --nodeps --ignore-errors --register-only \ pear.php.net/%{pear_name} >/dev/null || : fi %files %{?_licensedir:%license %{pear_name}-%{version}/LICENSE} %doc %{pear_docdir}/%{pear_name} %{pear_xmldir}/%{name}.xml %{pear_testdir}/%{pear_name} %{pear_datadir}/%{pear_name} %{_bindir}/crypt-gpg-pinentry %dir %{pear_phpdir}/Crypt %{pear_phpdir}/Crypt/GPG* %changelog * Sat Sep 23 2023 Remi Collet - 1.6.7-1 - update to 1.6.7 * Wed Sep 8 2021 Remi Collet - 1.6.6-1 - update to 1.6.6 * Wed Mar 17 2021 Remi Collet - 1.6.5-1 - update to 1.6.5 - open https://pear.php.net/bugs/27013 test failure with GnuPG 2.2.27 * Mon Mar 23 2020 Remi Collet - 1.6.4-2 - add classmap autoloader * Mon Mar 23 2020 Remi Collet - 1.6.4-1 - update to 1.6.4 * Tue Feb 5 2019 Remi Collet - 1.6.3-3 - fix FTBFS, use gpg1 * Mon Jun 4 2018 Remi Collet - 1.6.3-1 - update to 1.6.3 * Mon Sep 4 2017 Remi Collet - 1.6.2-1 - Update to 1.6.2 - open https://pear.php.net/bugs/bug.php?id=21240 - PHP 7.2 test failure * Sun Aug 27 2017 Remi Collet - 1.6.1-1 - Update to 1.6.1 * Mon Feb 27 2017 Remi Collet - 1.6.0-1 - Update to 1.6.0 * Fri Oct 07 2016 Remi Collet - 1.4.3-1 - Update to 1.4.3 * Mon Jun 20 2016 Remi Collet - 1.4.2-1 - Update to 1.4.2 - always use gnupg v1 * Sun Apr 17 2016 Remi Collet - 1.4.1-1 - Update to 1.4.1 * Fri Dec 18 2015 Remi Collet - 1.4.0-1 - Initial package, version 1.4.0 (stable) - open https://github.com/pear/Crypt_GPG/pull/19 for fsf address