]> git.pld-linux.org Git - packages/php-xcache.git/blobdiff - php-xcache.spec
- unconditional noarch subpackages
[packages/php-xcache.git] / php-xcache.spec
index f8d8583473b73a3654a762d515fd4be900c9baa3..08054890e76eab195a39079f7588648fc92c60bc 100644 (file)
@@ -1,19 +1,32 @@
 # TODO
 # - verify %lang codes
+#
+# Conditional build:
+%bcond_without web             # make web package
+
+# build "web" only for 5.5 version
+%if 0%{?_pld_builder:1} && "%{?php_suffix}" != "55"
+%undefine      with_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.0.1
-Release:       3
+# 3.2.0 leaks fds, use xcache-3.1 branch for now
+# http://xcache.lighttpd.net/ticket/363
+Blocker
+Version:       3.2.0
+Release:       0.1
 License:       BSD
 Group:         Development/Languages/PHP
 Source0:       http://xcache.lighttpd.net/pub/Releases/%{version}/xcache-%{version}.tar.bz2
-# Source0-md5: 45086010bc4f82f506c08be1c556941b
+# Source0-md5: 3655bd20483dc23d24f87f9dc924a62e
 Source1:       %{modname}-apache.conf
 Source2:       %{modname}-lighttpd.conf
 Patch0:                config.patch
+Patch1:                ini-settings.patch
 URL:           http://xcache.lighttpd.net/
 BuildRequires: %{php_name}-devel >= 4:5.2.17-8
 BuildRequires: rpmbuild(macros) >= 1.344
@@ -21,6 +34,8 @@ BuildRequires:        sed >= 4.0
 %{?requires_zend_extension}
 Requires:      php(core) >= 5.0.4
 Requires(triggerpostun):       sed >= 4.0
+Provides:      php(xcache) = %{version}
+Obsoletes:     php-xcache < 3.1.0-3
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _webapps        /etc/webapps
@@ -36,18 +51,17 @@ now running on production servers under high load.
 XCache to szybkie, stabilne buforowanie opcodów PHP, przetestowane i
 działające na produkcyjnych serwerach o dużym obciążeniu.
 
-%package web
+%package -n php-xcache-web
 Summary:       WEB interface for xCache
 Group:         Libraries
 Requires:      %{name} = %{version}-%{release}
 Requires:      webapps
 Requires:      webserver(access)
 Requires:      webserver(php) >= 5.0
-%if "%{_rpmversion}" >= "5"
+Obsoletes:     php55-xcache-web < 3.1.0-5
 BuildArch:     noarch
-%endif
 
-%description web
+%description -n php-xcache-web
 Via this web interface script you can manage and view statistics of
 xCache.
 
@@ -56,6 +70,7 @@ More information you can find at %{url}.
 %prep
 %setup -q -n %{modname}-%{version}
 %patch0 -p1
+%patch1 -p1
 %{__sed} -i.bak -e '
        s,@extensiondir@,%{php_extensiondir},
 ' xcache.ini
@@ -93,7 +108,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
@@ -107,6 +122,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
@@ -122,22 +138,22 @@ fi
 %triggerpostun -- %{name} < 3.0.0-0.8
 %{__sed} -i -e 's,zend_extension,extension,' %{php_sysconfdir}/conf.d/%{modname}.ini
 
-%triggerin web -- apache1 < 1.3.37-3, apache1-base
+%triggerin -n php-xcache-web -- apache1 < 1.3.37-3, apache1-base
 %webapp_register apache %{_webapp}
 
-%triggerun web -- apache1 < 1.3.37-3, apache1-base
+%triggerun -n php-xcache-web -- apache1 < 1.3.37-3, apache1-base
 %webapp_unregister apache %{_webapp}
 
-%triggerin web -- apache < 2.2.0, apache-base
+%triggerin -n php-xcache-web -- apache < 2.2.0, apache-base
 %webapp_register httpd %{_webapp}
 
-%triggerun web -- apache < 2.2.0, apache-base
+%triggerun -n php-xcache-web -- apache < 2.2.0, apache-base
 %webapp_unregister httpd %{_webapp}
 
-%triggerin web -- lighttpd
+%triggerin -n php-xcache-web -- lighttpd
 %webapp_register lighttpd %{_webapp}
 
-%triggerun web -- lighttpd
+%triggerun -n php-xcache-web -- lighttpd
 %webapp_unregister lighttpd %{_webapp}
 
 %files
@@ -149,7 +165,8 @@ fi
 # XXX: what for this dir is used?
 %dir %attr(775,root,http) /var/cache/php-xcache
 
-%files web
+%if %{with web}
+%files -n php-xcache-web
 %defattr(644,root,root,755)
 %doc config*.example.php
 %dir %attr(750,root,http) %{_sysconfdir}
@@ -164,6 +181,7 @@ fi
 
 %dir %{_appdir}/common
 %{_appdir}/common/*.css
+%{_appdir}/common/*.js
 %{_appdir}/common/*.php
 %{_appdir}/common/*.png
 %dir %{_appdir}/common/lang
@@ -173,7 +191,6 @@ fi
 
 %dir %{_appdir}/cacher
 %{_appdir}/cacher/*.css
-%{_appdir}/cacher/*.js
 %{_appdir}/cacher/*.php
 %{_appdir}/cacher/sub
 %dir %{_appdir}/cacher/lang
@@ -196,3 +213,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
This page took 0.538339 seconds and 4 git commands to generate.