summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json20
-rw-r--r--php-pecl-mcrypt.spec52
2 files changed, 45 insertions, 27 deletions
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..767f666
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,20 @@
+{
+ "name": "pecl/mcrypt",
+ "type": "php-ext",
+ "license": "PHP-3.01",
+ "description": "Bindings for the libmcrypt library.",
+ "require": {
+ "php": ">= 7.2.0, <= 8.6.0"
+ },
+ "php-ext": {
+ "priority": 20,
+ "extension-name": "mcrypt",
+ "configure-options": [
+ {
+ "name": "with-mcrypt",
+ "description": "Include mcrypt support",
+ "needs-value": true
+ }
+ ]
+ }
+}
diff --git a/php-pecl-mcrypt.spec b/php-pecl-mcrypt.spec
index 42b4d3a..9d10ee3 100644
--- a/php-pecl-mcrypt.spec
+++ b/php-pecl-mcrypt.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-mcrypt
#
-# SPDX-FileCopyrightText: Copyright 2017-2025 Remi Collet
+# SPDX-FileCopyrightText: Copyright 2017-2026 Remi Collet
# SPDX-License-Identifier: CECILL-2.1
# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
@@ -16,34 +16,42 @@
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name mcrypt
%global ini_name 30-%{pecl_name}.ini
-%global sources %{pecl_name}-%{version}
+%global sources %{gh_proj}-%{version}
%global _configure ../%{sources}/configure
-Summary: Bindings for the libmcrypt library
+# Github forge
+%global gh_vend php
+%global gh_proj pecl-encryption-mcrypt
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+%global tag %{version}
+
Name: %{?scl_prefix}php-pecl-mcrypt
-Version: 1.0.9
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Summary: Bindings for the libmcrypt library
License: PHP-3.01
-URL: https://pecl.php.net/package/mcrypt
-
-Source0: https://pecl.php.net/get/%{sources}.tgz
+Version: 1.0.9
+Release: 2%{?dist}
+%forgemeta
+URL: %{forgeurl}
+Source0: %{forgesource}
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.2
BuildRequires: libmcrypt-devel
-BuildRequires: %{?scl_prefix}php-pear
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
-Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-Provides: %{?scl_prefix}php-pie(%{pie_vend}/%{pie_proj}) = %{version}
# Set epoch so provides is > 0:7.1
Obsoletes: %{?scl_prefix}php-%{pecl_name} < 7.2
+# Extension
Provides: %{?scl_prefix}php-%{pecl_name} = 1:%{version}-%{release}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = 1:%{version}-%{release}
+# PECL
+Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
+# PIE
+Provides: %{?scl_prefix}php-pie(%{pie_vend}/%{pie_proj}) = %{version}
%description
@@ -55,11 +63,6 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -c -q
-# Don't install/register tests
-sed -e 's/role="test"/role="src"/' \
- -e '/LICENSE/s/role="doc"/role="src"/' \
- -i package.xml
-
cd %{sources}
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_MCRYPT_VERSION/{s/.* "//;s/".*$//;p}' php_mcrypt.h)
@@ -112,20 +115,11 @@ cd ../ZTS
%make_install -C NTS
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
-# Install XML package description
-install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
-
%if %{with_zts}
%make_install -C ZTS
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
-# Documentation
-cd %{sources}
-for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
-done
-
%check
cd %{sources}
@@ -160,7 +154,7 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
%files
%license %{sources}/LICENSE
-%{pecl_xmldir}/%{name}.xml
+%doc %{sources}/composer.json
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
@@ -172,6 +166,10 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
%changelog
+* Wed Mar 25 2026 Remi Collet <remi@remirepo.net> - 1.0.9-2
+- drop pear/pecl dependency
+- sources from github
+
* Tue Aug 5 2025 Remi Collet <remi@remirepo.net> - 1.0.9-1
- update to 1.0.9
- drop patch merged upstream