浏览代码

php-ext-clearsilver-0.4-13

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@11980 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 6 年之前
父节点
当前提交
985923f961
共有 1 个文件被更改,包括 79 次插入18 次删除
  1. 79 18
      p/php-ext-clearsilver/php-ext-clearsilver-vl.spec

+ 79 - 18
p/php-ext-clearsilver/php-ext-clearsilver-vl.spec

@@ -1,5 +1,6 @@
 %bcond_without php5
 %bcond_without php72
+%bcond_without php73
 
 %define modname clearsilver
 
@@ -7,7 +8,7 @@ Summary: ClearSilver extension for PHP
 Summary(ja): PHP用ClearSilverモジュール
 Name: php-ext-%{modname}
 Version: 0.4
-Release: 12%{_dist_release}
+Release: 13%{_dist_release}
 URL: http://www.geodata.soton.ac.uk/software/php_clearsilver/
 Source: php-%{modname}-%{version}.tar.gz
 Patch0: php-clearsilver-0.4-php5.6.0.patch
@@ -17,14 +18,6 @@ Group: Development/Languages
 BuildRequires: clearsilver, zlib-devel
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 
-%if %{with php5}
-BuildRequires: php5-devel
-%endif
-
-%if %{with php72}
-BuildRequires: php72-devel
-%endif
-
 Vendor: Project Vine
 Distribution: Vine Linux
 Packager: tomop
@@ -38,8 +31,9 @@ This module adds ClearSilver functions to PHP.
 %if %{with php5}
 %package -n php5-ext-%{modname}
 Summary: ClearSilver extension for PHP-5.6.x
-Summary(ja): PHP-5.6.x用ClearSilverモジュール
+Summary(ja): PHP-5.6用ClearSilverモジュール
 Group: Development/Languages
+BuildRequires: php5-devel
 %if "%{?req_php5_api}" != ""
 Requires: %{req_php5_api}
 %endif
@@ -55,9 +49,10 @@ This module adds ClearSilver functions to PHP.
 
 %if %{with php72}
 %package -n php72-ext-%{modname}
-Summary: ClearSilver extension for PHP-7.0.x
-Summary(ja): PHP-7.0.x用ClearSilverモジュール
+Summary: ClearSilver extension for PHP-7.2
+Summary(ja): PHP-7.2用ClearSilverモジュール
 Group: Development/Languages
+BuildRequires: php72-devel
 %if "%{?req_php72_api}" != ""
 Requires: %{req_php72_api}
 %endif
@@ -70,6 +65,24 @@ This module adds ClearSilver functions to PHP.
 
 %endif
 
+%if %{with php73}
+%package -n php73-ext-%{modname}
+Summary: ClearSilver extension for PHP-7.3
+Summary(ja): PHP-7.3用ClearSilverモジュール
+Group: Development/Languages
+BuildRequires: php73-devel
+%if "%{?req_php73_api}" != ""
+Requires: %{req_php73_api}
+%endif
+
+%description -n php73-ext-%{modname}
+This module adds ClearSilver functions to PHP.
+
+%description -n php73-ext-%{modname} -l ja
+このモジュールはPHPにClearSilverテンプレート機能を追加します。
+
+%endif
+
 %prep
 %setup -q -c -n php-%{modname}-%{version}
 
@@ -83,8 +96,16 @@ popd
 %endif
 
 %if %{with php72}
-cp -a php-clearsilver-%{version} php-clearsilver-%{version}-php7
-pushd php-clearsilver-%{version}-php7
+cp -a php-clearsilver-%{version} php-clearsilver-%{version}-php72
+pushd php-clearsilver-%{version}-php72
+%patch0 -p1 -b .php56
+%patch2 -p1 -b .php72
+popd
+%endif
+
+%if %{with php73}
+cp -a php-clearsilver-%{version} php-clearsilver-%{version}-php73
+pushd php-clearsilver-%{version}-php73
 %patch0 -p1 -b .php56
 %patch2 -p1 -b .php72
 popd
@@ -103,7 +124,7 @@ popd
 %endif
 
 %if %{with php72}
-pushd php-clearsilver-%{version}-php7
+pushd php-clearsilver-%{version}-php72
 phpize72
 aclocal
 autoconf
@@ -113,6 +134,17 @@ libtoolize --copy --force
 popd
 %endif
 
+%if %{with php73}
+pushd php-clearsilver-%{version}-php73
+phpize73
+aclocal
+autoconf
+libtoolize --copy --force
+%configure --with-php-config=/usr/bin/php-config73
+%__make %{_smp_mflags}
+popd
+%endif
+
 %install
 rm -rf %{buildroot}
 %if %{with php5}
@@ -130,7 +162,7 @@ popd
 %endif
 
 %if %{with php72}
-pushd php-clearsilver-%{version}-php7
+pushd php-clearsilver-%{version}-php72
 mkdir -p %{buildroot}%{_libdir}/php72/
 mkdir -p %{buildroot}%{_sysconfdir}/php72/php.d
 
@@ -143,14 +175,32 @@ EOF
 popd
 %endif
 
+%if %{with php73}
+pushd php-clearsilver-%{version}-php73
+mkdir -p %{buildroot}%{_libdir}/php73/
+mkdir -p %{buildroot}%{_sysconfdir}/php73/php.d
+
+install -m644 modules/%{modname}.so %{buildroot}%{_libdir}/php73/
+
+cat > %{buildroot}%{_sysconfdir}/php73/php.d/%{modname}.ini <<EOF
+; Enable %{modname} extension module
+extension=%{modname}.so
+EOF
+popd
+%endif
+
 %check
 
 pushd php-clearsilver-%{version}-php5
 make test NO_INTERACTION=1
 popd
 
-pushd php-clearsilver-%{version}-php7
-make test NO_INTERACTION=1
+pushd php-clearsilver-%{version}-php72
+make test TEST_PHPDBG_EXECUTABLE=/usr/bin/phpdbg72 NO_INTERACTION=1
+popd
+
+pushd php-clearsilver-%{version}-php73
+make test TEST_PHPDBG_EXECUTABLE=/usr/bin/phpdbg73 NO_INTERACTION=1
 popd
 
 %clean
@@ -172,7 +222,18 @@ rm -rf %{buildroot}
 %{_sysconfdir}/php72/php.d/*
 %endif
 
+%if %{with php73}
+%files -n php73-ext-%{modname}
+%defattr(-,root,root)
+%doc CREDITS INSTALL LICENSE README doc
+%{_libdir}/php73/*
+%{_sysconfdir}/php73/php.d/*
+%endif
+
 %changelog
+* Sat Dec 08 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-13
+- added php73 support.
+
 * Fri Dec 22 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-12
 - updated Patch0.
 - updated Patch2.