SPECS: php4-xcache.spec (NEW) - new, based on php-xcache.spec

glen glen at pld-linux.org
Thu Jul 5 13:11:45 CEST 2007


Author: glen                         Date: Thu Jul  5 11:11:45 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- new, based on php-xcache.spec

---- Files affected:
SPECS:
   php4-xcache.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SPECS/php4-xcache.spec
diff -u /dev/null SPECS/php4-xcache.spec:1.1
--- /dev/null	Thu Jul  5 13:11:45 2007
+++ SPECS/php4-xcache.spec	Thu Jul  5 13:11:40 2007
@@ -0,0 +1,114 @@
+# $Revision$, $Date$
+%define		_modname	xcache
+Summary:	%{_modname} - PHP opcode cacher
+Summary(pl.UTF-8):	%{_modname} - buforowanie opcodów PHP
+Name:		php4-%{_modname}
+Version:	1.2.1
+Release:	1
+License:	BSD
+Group:		Development/Languages/PHP
+URL:		http://xcache.lighttpd.net/
+Source0:	http://xcache.lighttpd.net/pub/Releases/1.2.1/xcache-%{version}.tar.bz2
+# Source0-md5:	42133468871c573c397b8375dc8c19b6
+BuildRequires:	php4-devel >= 3:4.3.0
+BuildRequires:	rpmbuild(macros) >= 1.344
+BuildRequires:	sed >= 4.0
+%{?requires_zend_extension}
+Requires:	php4-common >= 3:4.4.0-3
+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.
+
+%description -l pl.UTF-8
+XCache to szybkie, stabilne buforowanie opcodów PHP, przetestowane i
+działające na produkcyjnych serwerach o dużym obciążeniu.
+
+%prep
+%setup -q -n xcache-%{version}
+%{__sed} -i -e '
+	s,zend_extension =.*,zend_extension = %{php_extensiondir}/xcache.so,
+	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 \
+	--enable-xcache \
+	--enable-xcache-optimizer \
+	--enable-xcache-coverager
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+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%{_appdir}
+
+# Drop in the bit of configuration
+install xcache.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_modname}.ini
+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
+
+%post
+%php4_webserver_restart
+
+%postun
+if [ "$1" = 0 ]; then
+	%php4_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
+%{_appdir}
+%dir %attr(775,root,http) /var/cache/php-xcache
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2007/07/05 11:11:40  glen
+- new, based on php-xcache.spec
+
================================================================


More information about the pld-cvs-commit mailing list