summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json14
-rw-r--r--php-pecl-mailparse.spec59
2 files changed, 44 insertions, 29 deletions
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..2a92302
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,14 @@
+{
+ "name": "pecl/mailparse",
+ "type": "php-ext",
+ "license": "PHP-3.01",
+ "description": "Email message manipulation",
+ "require": {
+ "php": ">= 7.3.0",
+ "ext-mbstring": "*"
+ },
+ "php-ext": {
+ "extension-name": "mailparse",
+ "configure-options": []
+ }
+}
diff --git a/php-pecl-mailparse.spec b/php-pecl-mailparse.spec
index 40031a5..97c0bb1 100644
--- a/php-pecl-mailparse.spec
+++ b/php-pecl-mailparse.spec
@@ -3,7 +3,7 @@
#
# Fedora spec file for php-pecl-mailparse
#
-# Copyright (c) 2008-2024 Remi Collet
+# Copyright (c) 2008-2026 Remi Collet
# Copyright (c) 2004-2007 Matthias Saou
#
# License: MIT
@@ -16,26 +16,34 @@
%bcond_without tests
-%global pie_vend pecl
-%global pie_proj mailparse
-%global pecl_name mailparse
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%global ini_name 40-%{pecl_name}.ini
-%global sources %{pecl_name}-%{version}
-%global _configure ../%{sources}/configure
+%global pie_vend pecl
+%global pie_proj mailparse
+%global pecl_name mailparse
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
+%global ini_name 40-%{pecl_name}.ini
+%global sources %{archivename}
+%global _configure ../%{sources}/configure
+
+# Github forge
+%global gh_vend php
+%global gh_proj pecl-mail-mailparse
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+%global tag v%{version}
+# for EL-8 to avoid TAG usage
+%global archivename %{gh_proj}-%{version}
-Summary: PHP PECL package for parsing and working with email messages
Name: %{?scl_prefix}php-pecl-mailparse
-Version: 3.1.9
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Summary: PHP PECL package for parsing and working with email messages
License: PHP-3.01
-URL: https://pecl.php.net/package/mailparse
-Source0: https://pecl.php.net/get/%{sources}.tgz
+Version: 3.1.9
+Release: 2%{?dist}
+%forgemeta
+URL: %{forgeurl}
+Source0: %{forgesource}
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.3
-BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-mbstring
# Required by phpize
BuildRequires: autoconf, automake, libtool
@@ -67,11 +75,6 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -c
-# Don't install/register tests
-sed -e 's/role="test"/role="src"/' \
- -e '/LICENSE/s/role="doc"/role="src"/' \
- -i package.xml
-
cd %{sources}
# avoid re2c
touch php_mailparse_rfc822.c
@@ -129,14 +132,6 @@ install -Dpm 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
install -Dpm 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
-# Install XML package description
-install -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
-
-# Documentation
-for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
-done
-
%check
cd %{sources}
@@ -167,8 +162,10 @@ TEST_PHP_EXECUTABLE=%{__php} \
%files
%license %{sources}/LICENSE
-%doc %{pecl_docdir}/%{pecl_name}
-%{pecl_xmldir}/%{name}.xml
+%doc %{sources}/composer.json
+%doc %{sources}/CREDITS
+%doc %{sources}/*.md
+%doc %{sources}/try.php
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
@@ -180,6 +177,10 @@ TEST_PHP_EXECUTABLE=%{__php} \
%changelog
+* Tue Mar 17 2026 Remi Collet <remi@remirepo.net> - 3.1.9-2
+- drop pear/pecl dependency
+- sources from github
+
* Tue Sep 30 2025 Remi Collet <remi@remirepo.net> - 3.1.9-1
- update to 3.1.9