From ffc457110aeb095631ce3e7fd16433c9186c12ae Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 8 Nov 2013 15:05:03 +0100 Subject: php-twig-ctwig: install doc in pecl doc_dir --- php-twig-ctwig.spec | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/php-twig-ctwig.spec b/php-twig-ctwig.spec index cb1d87b..8dc1140 100644 --- a/php-twig-ctwig.spec +++ b/php-twig-ctwig.spec @@ -9,6 +9,7 @@ %{?scl: %scl_package php-twig-ctwig} %{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d} %{!?__pecl: %global __pecl %{_bindir}/pecl} +%{!?__php: %global __php %{_bindir}/php} %global with_zts 0%{?__ztsphp:1} %global pecl_name CTwig @@ -115,6 +116,11 @@ make -C ZTS install INSTALL_ROOT=%{buildroot} install -D -m 644 %{ext_name}.ini %{buildroot}%{php_ztsinidir}/%{ext_name}.ini %endif +# Documentation +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 + %post %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : @@ -128,7 +134,7 @@ fi %check : Minimal load test for NTS extension -%{_bindir}/php --no-php-ini \ +%{__php} --no-php-ini \ --define extension=NTS/modules/%{ext_name}.so \ --modules | grep %{ext_name} @@ -146,7 +152,7 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) -%doc NTS/LICENSE +%doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ext_name}.ini %{php_extdir}/%{ext_name}.so @@ -160,6 +166,7 @@ rm -rf %{buildroot} %changelog * Wed Oct 30 2013 Remi Collet - 1.14.2-1 - Update to 1.14.2 (no change) +- install doc in pecl doc_dir * Fri Oct 18 2013 Remi Collet - 1.14.1-2 - rename from php-twig-CTwig to php-twig-ctwig -- cgit