[packages/php-xcache] add web bcond

glen glen at pld-linux.org
Mon Jul 7 11:51:44 CEST 2014


commit e38e6ee197d6f08c845dce084e2c2dfb9a64ae50
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Jul 7 12:51:42 2014 +0300

    add web bcond

 php-xcache.spec | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/php-xcache.spec b/php-xcache.spec
index 30c9d7f..62b49da 100644
--- a/php-xcache.spec
+++ b/php-xcache.spec
@@ -1,12 +1,21 @@
 # TODO
 # - verify %lang codes
+#
+# Conditional build:
+%bcond_without	web		# make web package
+
+# don't build for php53
+%if 0%{?_pld_builder:1} && "%{?php_suffix}" != "55"
+%undefine	web
+%endif
+
 %define		php_name	php%{?php_suffix}
 %define		modname	xcache
 Summary:	%{modname} - PHP opcode cacher
 Summary(pl.UTF-8):	%{modname} - buforowanie opcodów PHP
 Name:		%{php_name}-%{modname}
 Version:	3.1.0
-Release:	2
+Release:	3
 License:	BSD
 Group:		Development/Languages/PHP
 Source0:	http://xcache.lighttpd.net/pub/Releases/%{version}/xcache-%{version}.tar.bz2
@@ -95,7 +104,7 @@ cp -p xcache.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
 # The cache directory where pre-compiled files will reside
 install -d $RPM_BUILD_ROOT/var/cache/php-%{modname}
 
-# web app
+%if %{with web}
 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}
 cp -a htdocs/* $RPM_BUILD_ROOT%{_appdir}
 %{__rm} $RPM_BUILD_ROOT%{_appdir}/diagnosis/lang/*.po
@@ -109,6 +118,7 @@ ln -s %{_sysconfdir}/coverager.config.php $RPM_BUILD_ROOT%{_appdir}/coverager/co
 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -151,6 +161,7 @@ fi
 # XXX: what for this dir is used?
 %dir %attr(775,root,http) /var/cache/php-xcache
 
+%if %{with web}
 %files web
 %defattr(644,root,root,755)
 %doc config*.example.php
@@ -198,3 +209,4 @@ fi
 %{_appdir}/diagnosis/lang/en.php
 %lang(zh_CN) %{_appdir}/diagnosis/lang/zh-simplified.php
 %lang(zh_CN) %{_appdir}/diagnosis/lang/zh-traditional.php
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-xcache.git/commitdiff/e38e6ee197d6f08c845dce084e2c2dfb9a64ae50



More information about the pld-cvs-commit mailing list