diff options
| -rw-r--r-- | php-pecl-inotify.spec | 32 | 
1 files changed, 26 insertions, 6 deletions
| diff --git a/php-pecl-inotify.spec b/php-pecl-inotify.spec index ffd7f51..d5346cb 100644 --- a/php-pecl-inotify.spec +++ b/php-pecl-inotify.spec @@ -6,8 +6,9 @@  #  # Please, preserve the changelog entries  # -%{!?php_inidir:  %{expand: %%global php_inidir  %{_sysconfdir}/php.d}} -%{!?__pecl:      %{expand: %%global __pecl      %{_bindir}/pecl}} +%{!?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 inotify @@ -15,7 +16,7 @@  Summary:        Inotify  Name:           php-pecl-%{pecl_name}  Version:        0.1.6 -Release:        1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release:        2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}  License:        PHP  Group:          Development/Languages  URL:            http://pecl.php.net/package/%{pecl_name} @@ -50,6 +51,10 @@ The inotify extension allows to use inotify functions in a PHP script.  %setup -q -c  mv %{pecl_name}-%{version} NTS +sed -e '/inotify.php/s/role="php"/role="doc"/' \ +    -e '/tail.php/s/role="php"/role="doc"/' \ +    -i package.xml +  cd NTS  # Fix version - http://svn.php.net/viewvc?view=revision&revision=331778 @@ -112,6 +117,15 @@ make -C ZTS install INSTALL_ROOT=%{buildroot}  install -D -m 644 %{pecl_name}.ini %{buildroot}%{php_ztsinidir}/%{pecl_name}.ini  %endif +# Test & Documentation +cd NTS +for i in $(grep 'role="test"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') +do install -Dpm 644 $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 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +done +  %post  %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : @@ -126,12 +140,12 @@ fi  %check  : Minimal load test for NTS extension  cd NTS -%{_bindir}/php --no-php-ini \ +%{__php} --no-php-ini \      --define extension=modules/%{pecl_name}.so \      --modules | grep %{pecl_name}  : Upstream test suite for NTS extension -TEST_PHP_EXECUTABLE=%{_bindir}/php \ +TEST_PHP_EXECUTABLE=%{__php} \  TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \  NO_INTERACTION=1 \  REPORT_EXIT_STATUS=1 \ @@ -160,7 +174,8 @@ rm -rf %{buildroot}  %files  %defattr(-,root,root,-) -%doc NTS/{LICENSE,CREDITS,README,inotify.php,tail.php} +%doc %{pecl_docdir}/%{pecl_name} +%doc %{pecl_testdir}/%{pecl_name}  %{pecl_xmldir}/%{name}.xml  %config(noreplace) %{php_inidir}/%{pecl_name}.ini  %{php_extdir}/%{pecl_name}.so @@ -172,5 +187,10 @@ rm -rf %{buildroot}  %changelog +* Sun Nov 24 2013 Remi Collet <remi@fedoraproject.org> - 0.1.6-2 +- install doc in pecl doc_dir +- install tests in pecl test_dir (in devel) +- cleanups for Copr +  * Sun Oct  6 2013 Remi Collet <remi@fedoraproject.org> - 0.1.6-1  - initial package, version 0.1.6 (stable) | 
