瀏覽代碼

php-ext-mailparse-3.1.2-2

Tomohiro "Tomo-p" KATO 3 年之前
父節點
當前提交
fa4de0b653
共有 1 個文件被更改,包括 61 次插入1 次删除
  1. 61 1
      p/php-ext-mailparse/php-ext-mailparse-vl.spec

+ 61 - 1
p/php-ext-mailparse/php-ext-mailparse-vl.spec

@@ -1,3 +1,4 @@
+%bcond_without php81
 %bcond_without php80
 %bcond_without php74
 
@@ -7,7 +8,7 @@ Summary: Email message manipulation for PHP
 Summary(ja): PHP用e-mailメッセージ操作拡張
 Name: php-ext-%{extname}
 Version: 3.1.2
-Release: 1%{_dist_release}
+Release: 2%{_dist_release}
 Group: programming
 Vendor: Project Vine
 Distribution: Vine Linux
@@ -64,6 +65,25 @@ It can deal with rfc822 and rfc2045 (MIME) compliant messages.
 rfc822やrfc2045 (MIME)に準拠したメッセージを取り扱うことが可能です。
 %endif
 
+%if %{with php81}
+%package -n php81-ext-mailparse
+Summary: Email message manipulation for PHP-8.0
+Summary(ja): PHP-8.1用e-mailメッセージ操作拡張
+Group: programming
+BuildRequires: php81-devel
+%if "%{?req_php81_api}" != ""
+Requires: %{req_php81_api}
+%endif
+
+%description -n php81-ext-mailparse
+ Mailparse is an extension for parsing and working with email messages.
+It can deal with rfc822 and rfc2045 (MIME) compliant messages.
+
+%description -n php81-ext-mailparse -l ja
+ Mailparseモジュールは、e-mailメッセージの解析・操作を行うPHP拡張です。
+rfc822やrfc2045 (MIME)に準拠したメッセージを取り扱うことが可能です。
+%endif
+
 
 %debug_package
 
@@ -86,6 +106,13 @@ phpize80
 popd
 %endif
 
+%if %{with php81}
+cp -a %{extname}-%{version} php81
+pushd php81
+phpize81
+popd
+%endif
+
 
 %build
 %if %{with php74}
@@ -102,6 +129,13 @@ pushd php80
 popd
 %endif
 
+%if %{with php81}
+pushd php81
+%configure --with-php-config=%{_bindir}/php-config81
+%__make %{?_smp_mflags}
+popd
+%endif
+
 
 %install
 rm -rf %{buildroot}
@@ -133,6 +167,20 @@ extension=%{extname}.so
 EOF
 %endif
 
+%if %{with php81}
+mkdir -p %{buildroot}%{_libdir}/php81/
+mkdir -p %{buildroot}%{_sysconfdir}/php81/php.d
+pushd php81
+%makeinstall INSTALL_ROOT=%{buildroot}
+popd
+
+cat > %{buildroot}%{_sysconfdir}/php81/php.d/%{extname}.ini <<EOF
+; Enable %{extname} extension module
+extension=%{extname}.so
+
+EOF
+%endif
+
 
 %clean
 rm -rf %{buildroot}
@@ -155,8 +203,20 @@ rm -rf %{buildroot}
 %config(noreplace) %{_sysconfdir}/php80/php.d/*
 %endif
 
+%if %{with php81}
+%files -n php81-ext-mailparse
+%defattr(-,root,root)
+%license LICENSE
+%doc README CREDITS
+%{_libdir}/php81/*
+%config(noreplace) %{_sysconfdir}/php81/php.d/*
+%endif
+
 
 %changelog
+* Fri Nov 26 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.1.2-2
+- added php81 support.
+
 * Mon Nov 22 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.1.2-1
 - new upstream release.