File php8-imagick.spec of Package php8-imagick
#
# spec file for package php8-imagick
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2021 Aareon Deutschland GmbH, Mainz, 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.
Name: php8-imagick
Version: 3.8.0
Release: 0
Summary: Wrapper to the ImageMagick library
License: PHP-3.01
Group: Productivity/Networking/Web/Servers
Url: https://pecl.php.net/package/imagick
Source0: https://pecl.php.net/get/imagick-%{version}.tgz
Source1: imagick.ini
Patch0: imagick-reproducible.patch
#PATCH-FIX-UPSTREAM test_150_to_follow_upstream_change.patch bnc#1091929
#Patch1: imagic-3.4.3-relax_test_150_to_follow_upstream_change.patch
BuildRequires: php8-devel
BuildRequires: autoconf
BuildRequires: ImageMagick-devel >= 6.5.3.10
BuildRequires: ghostscript-fonts-std
BuildRequires: re2c
Provides: php-imagick = %{version}
Requires: php83(api) = %{php_core_api}
Requires: php83(zend-abi) = %{php_zend_api}
Requires: php83
%description
PHP extension to create, modify and obtain meta information of images using
the ImageMagick API
%prep
%setup -q -n imagick-%{version}
%patch0 -p1
#%patch1 -p1
mkdir %{name}
# Ignore know failed test on OBS with timeout
rm tests/229_Tutorial_fxAnalyzeImage_case1.phpt
%build
%{_bindir}/phpize
export CFLAGS="%optflags -fvisibility=hidden"
%configure --with-imagick=%{_usr}
make %{?_smp_mflags}
%check
make %{?_smp_mflags} PHP_EXECUTABLE=%{__php} NO_INTERACTION=1 test \
|| { for f in tests/*.out; do cat $f; echo '------'; done; exit 1; }
%install
make DESTDIR=%{buildroot} install INSTALL_ROOT=%{buildroot}
mkdir -p %{buildroot}%{_sysconfdir}/php8/conf.d
install --mode=0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/php8/conf.d/imagick.ini
# remove unused header file(s)
rm -rf %{buildroot}/%{_includedir}/php8/ext/imagick/
%files
%defattr(0644,root,root,-)
%{_libdir}/php8/extensions/imagick.so
%config(noreplace) %{_sysconfdir}/php8/conf.d/imagick.ini
%license LICENSE
%doc ChangeLog CREDITS
%changelog