summaryrefslogtreecommitdiffstats
path: root/php-pecl-swoole.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-swoole.spec')
-rw-r--r--php-pecl-swoole.spec19
1 files changed, 14 insertions, 5 deletions
diff --git a/php-pecl-swoole.spec b/php-pecl-swoole.spec
index 68f1b16..e7624e4 100644
--- a/php-pecl-swoole.spec
+++ b/php-pecl-swoole.spec
@@ -33,7 +33,7 @@
Summary: PHP's asynchronous concurrent distributed networking framework
Name: %{?sub_prefix}php-pecl-%{pecl_name}
Version: 1.9.17
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: BSD
Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
@@ -147,8 +147,7 @@ These are the files needed to compile programs using %{name}.
mv %{pecl_name}-%{version} NTS
# Don't install/register tests, install examples as doc
-sed -e 's/role="test"/role="src"/' \
- -e '/examples/s/role="src"/role="doc"/' \
+sed -e '/examples/s/role="src"/role="doc"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
@@ -235,7 +234,10 @@ make -C ZTS \
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
-# Documentation
+# Test and Documentation
+for i in $(grep 'role="test"' package.xml | sed -e 's/^.*name="//;s/".*$//')
+do install -Dpm 644 NTS/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i
+done
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
@@ -285,7 +287,9 @@ cd ../ZTS
%files
%{?_licensedir:%license NTS/LICENSE}
-%doc %{pecl_docdir}/%{pecl_name}
+%{!?_licensedir:%{pecl_docdir}/%{pecl_name}/LICENSE}
+%doc %{pecl_docdir}/%{pecl_name}/*md
+%doc %{pecl_docdir}/%{pecl_name}/CREDITS
%{pecl_xmldir}/%{name}.xml
%config(noreplace) %{php_inidir}/%{ini_name}
@@ -297,6 +301,8 @@ cd ../ZTS
%endif
%files devel
+%doc %{pecl_testdir}/%{pecl_name}
+%doc %{pecl_docdir}/%{pecl_name}/examples
%{php_incldir}/ext/%{pecl_name}
%if %{with_zts}
@@ -306,6 +312,9 @@ cd ../ZTS
%changelog
+* Fri Aug 4 2017 Remi Collet <remi@remirepo.net> - 1.9.17-2
+- add test and examples to devel sub-package
+
* Tue Aug 1 2017 Remi Collet <remi@remirepo.net> - 1.9.17-1
- Update to 1.9.17