summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-pecl-swoole6.spec18
1 files changed, 9 insertions, 9 deletions
diff --git a/php-pecl-swoole6.spec b/php-pecl-swoole6.spec
index 9a55593..e85b430 100644
--- a/php-pecl-swoole6.spec
+++ b/php-pecl-swoole6.spec
@@ -265,11 +265,12 @@ peclbuild() {
--with-libdir=%{_lib} \
--with-php-config=$*
-make %{?_smp_mflags}
+%make_build
}
cd %{sources}
%{__phpize}
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global
cd ../NTS
peclbuild %{__phpconfig}
@@ -283,8 +284,7 @@ peclbuild %{__ztsphpconfig} --enable-swoole-thread
%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}
@@ -293,18 +293,18 @@ 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
# Test and Documentation
-for i in $(grep 'role="test"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i
+cd %{sources}
+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 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
+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
# code not compatible with Python 3