summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-pecl-imagick.spec79
1 files changed, 44 insertions, 35 deletions
diff --git a/php-pecl-imagick.spec b/php-pecl-imagick.spec
index 85b3a23..f8c0dfb 100644
--- a/php-pecl-imagick.spec
+++ b/php-pecl-imagick.spec
@@ -1,8 +1,8 @@
# remirepo spec file for php-pecl-imagick
#
-# Copyright (c) 2008-2024 Remi Collet
-# License: CC-BY-SA-4.0
-# http://creativecommons.org/licenses/by-sa/4.0/
+# SPDX-FileCopyrightText: Copyright 2008-2024 Remi Collet
+# SPDX-License-Identifier: CECILL-2.1
+# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
@@ -13,16 +13,16 @@
%if 0%{?fedora} >= 38 || 0%{?rhel} >= 10
%global default 7
%bcond_with im6
-%bcond_with im7
%else
%global default 6
%bcond_with im6
-%bcond_with im7
%endif
-# 2 builds needed to get the full set
-# --with im6
-# --with im7
+# NOTICE: 2 builds needed to get the full set
+# All distro
+# default (im7)
+# On Fedora < 40 and EL < 10
+# --with im6
# we don't want -z defs linker flag
%undefine _strict_symbol_defs_build
@@ -50,19 +50,19 @@
%endif
%global _configure ../%{sources}/configure
-%if %{with im7}
-Summary: Extension to create and modify images using ImageMagick 7
-Name: %{?scl_prefix}php-pecl-imagick-im7
-%else
+%if %{with im6}
Summary: Extension to create and modify images using ImageMagick 6
Name: %{?scl_prefix}php-pecl-imagick-im6
+%else
+Summary: Extension to create and modify images using ImageMagick 7
+Name: %{?scl_prefix}php-pecl-imagick-im7
%endif
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
%if 0%{?gh_date}
Release: 0.11.%{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: 12.1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 13%{?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-3.01
@@ -75,44 +75,40 @@ BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel
BuildRequires: %{?scl_prefix}php-pear
-%if %{with im7}
-BuildRequires: ImageMagick7-devel
-%else
%if %{with im6}
BuildRequires: ImageMagick6-devel
%else
-BuildRequires: ImageMagick-devel
-%endif
+BuildRequires: ImageMagick7-devel
%endif
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-%if %{with im7}
-Provides: %{?scl_prefix}php-%{pecl_name} = 1:%{version}
-Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = 1:%{version}
-Provides: %{?scl_prefix}php-pecl-imagick = 1:%{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-imagick%{?_isa} = 1:%{version}-%{release}
-%else
+%if %{with im6}
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl-imagick = %{version}-%{release}
Provides: %{?scl_prefix}php-pecl-imagick%{?_isa} = %{version}-%{release}
+%else
+Provides: %{?scl_prefix}php-%{pecl_name} = 1:%{version}
+Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = 1:%{version}
+Provides: %{?scl_prefix}php-pecl-imagick = 1:%{version}-%{release}
+Provides: %{?scl_prefix}php-pecl-imagick%{?_isa} = 1:%{version}-%{release}
%endif
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
Conflicts: %{?scl_prefix}php-pecl-gmagick
-%if %{with im7}
-Conflicts: %{?scl_prefix}php-pecl-imagick-im6 <= %{version}-%{release}
-%if %{default} == 7
+%if %{with im6}
+Conflicts: %{?scl_prefix}php-pecl-imagick-im7 <= %{version}-%{release}
+%if %{default} == 6
Obsoletes: %{?scl_prefix}php-pecl-imagick <= %{version}-%{release}
%else
Conflicts: %{?scl_prefix}php-pecl-imagick <= %{version}-%{release}
%endif
%else
-Conflicts: %{?scl_prefix}php-pecl-imagick-im7 <= %{version}-%{release}
-%if %{default} == 6
+Conflicts: %{?scl_prefix}php-pecl-imagick-im6 <= %{version}-%{release}
+%if %{default} == 7
Obsoletes: %{?scl_prefix}php-pecl-imagick <= %{version}-%{release}
%else
Conflicts: %{?scl_prefix}php-pecl-imagick <= %{version}-%{release}
@@ -125,10 +121,10 @@ using the ImageMagick API.
Documentation: https://www.php.net/imagick
-%if %{with im7}
-Package built using ImageMagick version 7
-%else
+%if %{with im6}
Package built using ImageMagick version 6
+%else
+Package built using ImageMagick version 7
%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})}.
@@ -139,11 +135,20 @@ 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
+%if %{with im6}
Conflicts: %{?scl_prefix}php-pecl-imagick-im7-devel
+%if %{default} == 6
+Obsoletes: %{?scl_prefix}php-pecl-imagick-devel < %{version}-%{release}
+%else
+Conflicts: %{?scl_prefix}php-pecl-imagick-devel < %{version}-%{release}
+%endif
+%else
+Conflicts: %{?scl_prefix}php-pecl-imagick-im6-devel
+%if %{default} == 7
Obsoletes: %{?scl_prefix}php-pecl-imagick-devel < %{version}-%{release}
+%else
+Conflicts: %{?scl_prefix}php-pecl-imagick-devel < %{version}-%{release}
+%endif
%endif
Provides: %{?scl_prefix}php-pecl-imagick-devel = %{version}-%{release}
Provides: %{?scl_prefix}php-pecl-imagick-devel%{?_isa} = %{version}-%{release}
@@ -347,6 +352,10 @@ fi
%changelog
+* Mon Dec 23 2024 Remi Collet <remi@remirepo.net> - 3.7.0-13
+- re-license spec file to CECILL-2.1
+- im7 by default, change using --with im6 build option
+
* Thu Nov 21 2024 Remi Collet <remi@remirepo.net> - 3.7.0-12
- drop unneeded build dependency