summaryrefslogtreecommitdiffstats
path: root/php-pecl-mailparse.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-mailparse.spec')
-rw-r--r--php-pecl-mailparse.spec88
1 files changed, 41 insertions, 47 deletions
diff --git a/php-pecl-mailparse.spec b/php-pecl-mailparse.spec
index 09c6027..137f7eb 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-2017 Remi Collet
+# Copyright (c) 2008-2018 Remi Collet
# Copyright (c) 2004-2007 Matthias Saou
#
# License: MIT
@@ -12,40 +12,23 @@
# Please, preserve the changelog entries
#
%if 0%{?scl:1}
-%if "%{scl}" == "rh-php56"
-%global sub_prefix more-php56-
-%else
%global sub_prefix %{scl_prefix}
+%scl_package php-pecl-mailparse
%endif
-%endif
-
-%{?scl: %scl_package php-pecl-mailparse}
%global pecl_name mailparse
-%global with_zts 0%{?__ztsphp:1}
-%if "%{php_version}" < "5.6"
-# After mbstring
-%global ini_name z-%{pecl_name}.ini
-%else
-# After 20-mbstring
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
-%endif
Summary: PHP PECL package for parsing and working with email messages
Name: %{?sub_prefix}php-pecl-mailparse
-Version: 2.1.6
-Release: 10%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Version: 3.0.2
+Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
-Group: Development/Languages
URL: http://pecl.php.net/package/mailparse
Source0: http://pecl.php.net/get/mailparse-%{version}.tgz
-# https://bugs.php.net/65861 - Please Provides LICENSE file
-# URL from mailparse.c header
-Source1: http://www.php.net/license/2_02.txt
-
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-BuildRequires: %{?scl_prefix}php-devel
+BuildRequires: %{?scl_prefix}php-devel > 7
BuildRequires: %{?scl_prefix}php-pear
# mbstring need for tests
BuildRequires: %{?scl_prefix}php-mbstring
@@ -57,12 +40,14 @@ Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
-Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
-Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
-Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
-Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
+Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
+Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
+%if "%{?scl_prefix}" != "%{?sub_prefix}"
+Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
+Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
+%endif
%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
@@ -70,13 +55,15 @@ Obsoletes: php53-pecl-%{pecl_name} <= %{version}
Obsoletes: php53u-pecl-%{pecl_name} <= %{version}
Obsoletes: php54-pecl-%{pecl_name} <= %{version}
Obsoletes: php54w-pecl-%{pecl_name} <= %{version}
-%if "%{php_version}" > "5.5"
Obsoletes: php55u-pecl-%{pecl_name} <= %{version}
Obsoletes: php55w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "5.6"
Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
+Obsoletes: php70u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php70w-pecl-%{pecl_name} <= %{version}
+%if "%{php_version}" > "7.1"
+Obsoletes: php71u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php71w-pecl-%{pecl_name} <= %{version}
%endif
%endif
@@ -100,10 +87,11 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
mv %{pecl_name}-%{version} NTS
# Don't install/register tests
-sed -e 's/role="test"/role="src"/' -i package.xml
+sed -e 's/role="test"/role="src"/' \
+ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -i package.xml
cd NTS
-cp %{SOURCE1} LICENSE
extver=$(sed -n '/#define PHP_MAILPARSE_VERSION/{s/.* "//;s/".*$//;p}' php_mailparse.h)
if test "x${extver}" != "x%{version}"; then
: Error: Upstream version is ${extver}, expecting %{version}.
@@ -119,8 +107,6 @@ extension = mailparse.so
;mailparse.def_charset = us-ascii
EOF
-chmod -x NTS/*.{php,c,h}
-
%if %{with_zts}
cp -pr NTS ZTS
%endif
@@ -141,7 +127,6 @@ make %{?_smp_mflags}
%install
-rm -rf %{buildroot}
make -C NTS install INSTALL_ROOT=%{buildroot}
# Drop in the bit of configuration
install -Dpm 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
@@ -159,7 +144,6 @@ install -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
-%{!?_licensedir:install -Dpm 644 NTS/LICENSE %{buildroot}%{pecl_docdir}/%{pecl_name}/LICENSE}
%check
@@ -173,7 +157,7 @@ done
cd NTS
TEST_PHP_EXECUTABLE=%{__php} \
NO_INTERACTION=1 \
-%{__php} -n run-tests.php \
+%{__php} run-tests.php \
-n -q \
-d extension=mbstring.so \
-d extension=$PWD/modules/%{pecl_name}.so
@@ -189,18 +173,14 @@ NO_INTERACTION=1 \
cd ../ZTS
TEST_PHP_EXECUTABLE=%{__ztsphp} \
NO_INTERACTION=1 \
-php -n run-tests.php \
+php run-tests.php \
-n -q \
-d extension=mbstring.so \
-d extension=$PWD/modules/%{pecl_name}.so
%endif
-%clean
-rm -rf %{buildroot}
-
-
-%if 0%{?fedora} < 24
+%if 0%{?fedora} < 24 && 0%{?rhel} < 8
# when pear installed alone, after us
%triggerin -- %{?scl_prefix}php-pear
if [ -x %{__pecl} ] ; then
@@ -221,7 +201,6 @@ fi
%files
-%defattr(-,root,root,-)
%{?_licensedir:%license NTS/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -236,9 +215,24 @@ fi
%changelog
-* Wed Mar 9 2016 Remi Collet <remi@fedoraproject.org> - 2.1.6-10
+* Wed Dec 7 2016 Remi Collet <remi@fedoraproject.org> - 3.0.2-1
+- update to 3.0.2
+
+* Thu Dec 1 2016 Remi Collet <remi@fedoraproject.org> - 3.0.1-4
+- rebuild with PHP 7.1.0 GA
+
+* Wed Sep 14 2016 Remi Collet <remi@fedoraproject.org> - 3.0.1-3
+- rebuild for PHP 7.1 new API version
+
+* Sat Mar 5 2016 Remi Collet <remi@fedoraproject.org> - 3.0.1-2
- adapt for F24
+* Fri Jan 29 2016 Remi Collet <remi@fedoraproject.org> - 3.0.1-1
+- update to 3.0.1 (php 7, stable)
+
+* Sat Dec 26 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-1
+- update to 3.0.0 for PHP 7
+
* Tue Jun 23 2015 Remi Collet <rcollet@redhat.com> - 2.1.6-9
- allow build against rh-php56 (as more-php56)
- don't install/register tests