summaryrefslogtreecommitdiffstats
path: root/php-pecl-dio.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-dio.spec')
-rw-r--r--php-pecl-dio.spec40
1 files changed, 7 insertions, 33 deletions
diff --git a/php-pecl-dio.spec b/php-pecl-dio.spec
index 40c808d..1ce66ca 100644
--- a/php-pecl-dio.spec
+++ b/php-pecl-dio.spec
@@ -56,7 +56,7 @@ more than adequate.
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -e '/LICENSE/s/role="doc"/role="src"/' \
-i package.xml
cd %{sources}
@@ -85,13 +85,14 @@ EOF
cd %{sources}
%{__phpize}
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global
cd ../NTS
%configure \
--with-libdir=%{_lib} \
--with-php-config=%{__phpconfig}
-make %{?_smp_mflags}
+%make_build
%if %{with_zts}
cd ../ZTS
@@ -99,14 +100,14 @@ cd ../ZTS
--with-libdir=%{_lib} \
--with-php-config=%{__ztsphpconfig}
-make %{?_smp_mflags}
+%make_build
%endif
%install
%{?dtsenable}
-make -C NTS install INSTALL_ROOT=%{buildroot}
+%make_install -C NTS
# install config file
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
@@ -115,7 +116,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
%if %{with_zts}
-make -C ZTS install INSTALL_ROOT=%{buildroot}
+%make_install -C ZTS
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
@@ -126,26 +127,6 @@ do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
-%if 0%{?fedora} < 24 && 0%{?rhel} < 8
-# when pear installed alone, after us
-%triggerin -- %{?scl_prefix}php-pear
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-# posttrans as pear can be installed after us
-%posttrans
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-%postun
-if [ $1 -eq 0 -a -x %{__pecl} ] ; then
- %{pecl_uninstall} %{pecl_name} >/dev/null || :
-fi
-%endif
-
-
%check
cd %{sources}
@@ -166,18 +147,11 @@ REPORT_EXIT_STATUS=1 \
%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
-
-: Upstream test suite for ZTS extension
-TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
-REPORT_EXIT_STATUS=1 \
-%{__ztsphp} -n run-tests.php -q --show-diff
%endif
%files
-%{?_licensedir:%license %{sources}/LICENSE}
-%{!?_licensedir:%doc %{pecl_docdir}/%{pecl_name}}
+%license %{sources}/LICENSE
%{pecl_xmldir}/%{name}.xml
%config(noreplace) %{php_inidir}/%{ini_name}