SHA256
1
0
forked from pool/php-gnupg
php-gnupg/php-gnupg.spec
Arjen de Korte 331c096cd0 - Update to 1.5.0RC1
* Added support for PHP 8
  * Added support for GnuPG 2.1+
  * Added argument info for all functions and methods (reflection support)
  * Added new function `gnupg_getengineinfo`
  * Added new function `gnupg_geterrorinfo`
  * Added init array argument for setting home dir and gpg binary file name
  * Added additional fields to `gnupg_keyinfo` returned array
  * Added parameter to `gnupg_keyinfo` to use `secret_only`
  * Fixed `gnupg_deletekey` to use boolean for `allow_secret` parameter
- Update to 1.4.0
  * No changes since 1.4.0RC2
- Update to 1.4.0RC2
  * Fixed ZTS issue with invalid context for a password callback
- Update to 1.4.0RC1
  * Added support for PHP 7
  * Fixed various compilation issues
- Use _multibuild to build for php7 and php8
- Use php_cfgdir and php_extdir macros to determine location of files
- Run unit tests
- Add files missing from the PECL tarball
  + gnupgt.inc
  + vars.inc

OBS-URL: https://build.opensuse.org/package/show/server:php:extensions/php-gnupg?expand=0&rev=2
2021-02-21 12:12:21 +00:00

85 lines
2.5 KiB
RPMSpec

#
# spec file for package php5-gnupg
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define pkg_name gnupg
%define flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == ""
%define php_name php
ExclusiveArch: do-not-build
%else
%define php_name %{flavor}
%endif
%if 0%{?suse_version} <= 1500
%define php_extdir %(%{__php_config} --extension-dir)
%define php_cfgdir %{_sysconfdir}/%{php_name}/conf.d
%endif
Name: %{php_name}-%{pkg_name}
Version: 1.5.0RC1
Release: 0
Summary: PHP wrapper around the gpgme library
License: BSD-2-Clause
Group: Productivity/Networking/Web/Servers
Url: https://pecl.php.net/gnupg
Source0: https://pecl.php.net/get/%{pkg_name}-%{version}.tgz
Source1: php-%{pkg_name}-rpmlintrc
# https://github.com/php-gnupg/php-gnupg/issues/28
Source2: gnupgt.inc
Source3: vars.inc
BuildRequires: %{php_name}-devel
BuildRequires: gpgme-devel
Requires: php(api) = %{php_core_api}
Requires: php(zend-abi) = %{php_zend_api}
Provides: php-gnupg = %{version}
Obsoletes: php-gnupg < %{version}
%description
This extension provides methods to interact with gnupg.
%prep
%setup -q -n %{pkg_name}-%{version}
cp %{SOURCE2} %{SOURCE3} tests/
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
export CXXFLAGS="%{optflags} -fno-strict-aliasing"
%{__phpize}
%configure --disable-rpath --with-gnupg=%{_usr} --with-libdir=%{_lib}
%make_build
%check
%make_build PHP_EXECUTABLE=%{__php} NO_INTERACTION=1 test
%install
%make_install INSTALL_ROOT=%{buildroot}
mkdir -p %{buildroot}%{php_cfgdir}
cat >> %{buildroot}%{php_cfgdir}/%{pkg_name}.ini << EOF
; comment out next line to disable %{pkg_name} extension in php
extension=%{pkg_name}.so"
EOF
%files
%license LICENSE
%doc README
%config(noreplace) %{php_cfgdir}/%{pkg_name}.ini
%{php_extdir}/%{pkg_name}.so
%changelog