[packages/php-pecl-xhprof] disable web package when built with secondary php
glen
glen at pld-linux.org
Tue Aug 26 13:30:01 CEST 2014
commit 1037f25a2a384426d76fdb2d5e216838e2a8ad6f
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Aug 26 14:29:58 2014 +0300
disable web package when built with secondary php
php-pecl-xhprof.spec | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/php-pecl-xhprof.spec b/php-pecl-xhprof.spec
index bcee7aa..79a6681 100644
--- a/php-pecl-xhprof.spec
+++ b/php-pecl-xhprof.spec
@@ -1,9 +1,18 @@
+#
+# Conditional build:
+%bcond_without web # make web package
+
+# don't build for php53
+%if 0%{?_pld_builder:1} && "%{?php_suffix}" != "55"
+%undefine with_web
+%endif
+
%define php_name php%{?php_suffix}
%define modname xhprof
Summary: PHP extension for XHProf, a Hierarchical Profiler
Name: %{php_name}-pecl-xhprof
Version: 0.9.4
-Release: 3
+Release: 4
License: Apache v2.0
Group: Development/Languages/PHP
Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
@@ -95,12 +104,14 @@ install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
# Install the web interface
+%if %{with web}
install -d $RPM_BUILD_ROOT%{_sysconfdir}
cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
install -d $RPM_BUILD_ROOT%{_datadir}/xhprof
cp -a xhprof_html $RPM_BUILD_ROOT%{_datadir}/xhprof/xhprof_html
cp -a xhprof_lib $RPM_BUILD_ROOT%{_datadir}/xhprof/xhprof_lib
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
@@ -126,9 +137,11 @@ fi
%attr(755,root,root) %{php_extensiondir}/%{modname}.so
%{_examplesdir}/%{name}-%{version}
+%if %{with web}
%files -n xhprof
%defattr(644,root,root,755)
%doc docs/*
%dir %attr(750,root,http) %{_sysconfdir}
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
%{_datadir}/xhprof
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-xhprof.git/commitdiff/1037f25a2a384426d76fdb2d5e216838e2a8ad6f
More information about the pld-cvs-commit
mailing list