SPECS: php-xcache.spec - webapps integration; rel 2

glen glen at pld-linux.org
Mon Jul 2 21:59:54 CEST 2007


Author: glen                         Date: Mon Jul  2 19:59:54 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- webapps integration; rel 2

---- Files affected:
SPECS:
   php-xcache.spec (1.13 -> 1.14) 

---- Diffs:

================================================================
Index: SPECS/php-xcache.spec
diff -u SPECS/php-xcache.spec:1.13 SPECS/php-xcache.spec:1.14
--- SPECS/php-xcache.spec:1.13	Mon Jul  2 21:35:36 2007
+++ SPECS/php-xcache.spec	Mon Jul  2 21:59:48 2007
@@ -4,7 +4,7 @@
 Summary(pl.UTF-8):	%{_modname} - buforowanie opcodów PHP
 Name:		php-%{_modname}
 Version:	1.2.1
-Release:	1
+Release:	2
 License:	BSD
 Group:		Development/Languages/PHP
 URL:		http://xcache.lighttpd.net/
@@ -17,6 +17,11 @@
 Requires:	php-common >= 4:5.0.4
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define		_webapps	/etc/webapps
+%define		_webapp		xcache
+%define		_sysconfdir	%{_webapps}/%{_webapp}
+%define		_appdir		%{_datadir}/%{_webapp}
+
 %description
 XCache is a fast, stable PHP opcode cacher that has been tested and is
 now running on production servers under high load.
@@ -32,6 +37,13 @@
 	s,zend_extension_ts = .*,zend_extension_ts = %{php_extensiondir}/xcache.so,
 ' xcache.ini
 
+cat > apache.conf <<'EOF'
+Alias /xcache %{_appdir}
+<Directory %{_appdir}>
+	Allow from all
+</Directory>
+EOF
+
 %build
 phpize
 %configure \
@@ -42,18 +54,21 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
+install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{_sysconfdir}}
 
 %{__make} install \
 	INSTALL_ROOT=$RPM_BUILD_ROOT
 
 # The cache directory where pre-compiled files will reside
 install -d $RPM_BUILD_ROOT/var/cache/php-xcache
-install -d $RPM_BUILD_ROOT%{_datadir}/xcache
+install -d $RPM_BUILD_ROOT%{_appdir}
 
 # Drop in the bit of configuration
 install xcache.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_modname}.ini
-install -D admin/* $RPM_BUILD_ROOT%{_datadir}/xcache
+install admin/* $RPM_BUILD_ROOT%{_appdir}
+
+install apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
+install apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -66,12 +81,26 @@
 	%php_webserver_restart
 fi
 
+%triggerin -- apache1 < 1.3.37-3, apache1-base
+%webapp_register apache %{_webapp}
+
+%triggerun -- apache1 < 1.3.37-3, apache1-base
+%webapp_unregister apache %{_webapp}
+
+%triggerin -- apache < 2.2.0, apache-base
+%webapp_register httpd %{_webapp}
+
+%triggerun -- apache < 2.2.0, apache-base
+%webapp_unregister httpd %{_webapp}
+
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS README THANKS
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_modname}.ini
 %attr(755,root,root) %{php_extensiondir}/%{_modname}.so
-%{_datadir}/xcache
+%{_appdir}
 %dir %attr(775,root,http) /var/cache/php-xcache
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -80,6 +109,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.14  2007/07/02 19:59:48  glen
+- webapps integration; rel 2
+
 Revision 1.13  2007/07/02 19:35:36  glen
 - update to 1.2.1
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/php-xcache.spec?r1=1.13&r2=1.14&f=u



More information about the pld-cvs-commit mailing list