summaryrefslogtreecommitdiffstats
path: root/php-pecl-imagick.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-06-16 14:25:50 +0200
committerRemi Collet <remi@remirepo.net>2021-06-16 14:25:50 +0200
commit38acc4f0998012852bea97c2aad1224badde86e6 (patch)
treec2339abb7ecaafd4eac090247d29d9c7114a6abb /php-pecl-imagick.spec
parent562f84b239bcc69367b43c9ac9c1d7767bc92fa3 (diff)
test build for upcoming RC2
update to 3.5.0RC2 rename to php-pecl-imagick-im6 or php-pecl-imagick-im7 drop all patches, all merged upstream including https://github.com/Imagick/imagick/pull/428 add stubs in package https://github.com/Imagick/imagick/pull/426 typo in type name https://github.com/Imagick/imagick/pull/425 fix pass by ref usage
Diffstat (limited to 'php-pecl-imagick.spec')
-rw-r--r--php-pecl-imagick.spec59
1 files changed, 48 insertions, 11 deletions
diff --git a/php-pecl-imagick.spec b/php-pecl-imagick.spec
index f4eed8a..fe3a8a6 100644
--- a/php-pecl-imagick.spec
+++ b/php-pecl-imagick.spec
@@ -7,7 +7,8 @@
# Please, preserve the changelog entries
#
-%bcond_with im7
+%bcond_with im7
+%bcond_without tests
# we don't want -z defs linker flag
%undefine _strict_symbol_defs_build
@@ -30,24 +31,26 @@
%global ini_name 40-%{pecl_name}.ini
%endif
%global upstream_version 3.5.0
-%global upstream_prever RC1
+%global upstream_prever RC2
-Summary: Extension to create and modify images using ImageMagick
-Name: %{?sub_prefix}php-pecl-imagick
+%if %{with im7}
+Summary: Extension to create and modify images using ImageMagick 7
+Name: %{?sub_prefix}php-pecl-imagick-im7
+%else
+Summary: Extension to create and modify images using ImageMagick 6
+Name: %{?sub_prefix}php-pecl-imagick-im6
+%endif
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
%if 0%{?gh_date}
Release: 0.9.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz
%else
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 0%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
%endif
License: PHP
URL: https://pecl.php.net/package/imagick
-# From https://github.com/Imagick/imagick/pull/421
-Patch0: %{pecl_name}-arginfo.patch
-
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel
@@ -78,6 +81,14 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{relea
%endif
Conflicts: %{?scl_prefix}php-pecl-gmagick
+%if %{with im7}
+Conflicts: %{?scl_prefix}php-pecl-imagick-im6
+%else
+Conflicts: %{?scl_prefix}php-pecl-imagick-im7
+Obsoletes: %{?scl_prefix}php-pecl-imagick < %{version}
+%endif
+Provides: %{?scl_prefix}php-pecl-imagick = %{version}-%{release}
+Provides: %{?scl_prefix}php-pecl-imagick%{?_isa} = %{version}-%{release}
%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
@@ -125,6 +136,13 @@ Obsoletes: php81-pecl-%{pecl_name} <= %{version}
Imagick is a native php extension to create and modify images
using the ImageMagick API.
+Documentation: https://www.php.net/imagick
+
+%if %{with im7}
+Package built using ImageMagick version 7
+%else
+Package built using ImageMagick version 6
+%endif
Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
@@ -134,6 +152,15 @@ Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{?scl_prefix}php-devel%{?_isa}
+%if %{with im7}
+Conflicts: %{?scl_prefix}php-pecl-imagick-im6-devel
+%else
+Conflicts: %{?scl_prefix}php-pecl-imagick-im7-devel
+Obsoletes: %{?scl_prefix}php-pecl-imagick-devel < %{version}
+%endif
+Provides: %{?scl_prefix}php-pecl-imagick-devel = %{version}-%{release}
+Provides: %{?scl_prefix}php-pecl-imagick%{?_isa}-devel = %{version}-%{release}
+
%description devel
These are the files needed to compile programs using %{pecl_name} extension.
@@ -151,8 +178,6 @@ mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
# don't install any font (and test using it)
# don't install empty file (d41d8cd98f00b204e9800998ecf8427e)
-# fix tests role
-# https://github.com/mkoppanen/imagick/commit/64ef2a7991c2cdc22b9b2275e732439dc21cede8
sed -e '/anonymous_pro_minus.ttf/d' \
-e '/015-imagickdrawsetresolution.phpt/d' \
-e '/OFL.txt/d' \
@@ -165,7 +190,8 @@ then : "Font files detected!"
fi
cd NTS
-%patch0 -p1 -b .pr421
+: Fix permission for archive generated on Windows
+find . -type f -exec chmod -x {} \;
extver=$(sed -n '/#define PHP_IMAGICK_VERSION/{s/.* "//;s/".*$//;p}' php_imagick.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
@@ -281,6 +307,7 @@ cd NTS
--define extension=%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
+%if %{with tests}
: upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
@@ -289,6 +316,7 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
%else
%{__php} -n run-tests.php -q --show-diff
%endif
+%endif
%if %{with_zts}
: simple module load test for ZTS extension
@@ -323,6 +351,15 @@ cd ../ZTS
%changelog
+* Wed Jun 16 2021 Remi Collet <remi@remirepo.net> - 3.5.0~RC2-0
+- test build for upcoming RC2
+- update to 3.5.0RC2
+- rename to php-pecl-imagick-im6 or php-pecl-imagick-im7
+- drop all patches, all merged upstream including
+ https://github.com/Imagick/imagick/pull/428 add stubs in package
+ https://github.com/Imagick/imagick/pull/426 typo in type name
+ https://github.com/Imagick/imagick/pull/425 fix pass by ref usage
+
* Tue Jun 15 2021 Remi Collet <remi@remirepo.net> - 3.5.0~RC1-1
- update to 3.5.0RC1
- drop all patches, all merged upstream