Search
j0ke.net Open Build Service
>
Projects
>
internetx
:
php5
:
EL6
:
5.4.38
:
extensions
>
php-eaccelerator
> php-eaccelerator.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File php-eaccelerator.spec of Package php-eaccelerator
%global php_extdir %(php-config --extension-dir 2>/dev/null || echo "undefined") %global php_zendabiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP Extension => //p') | tail -1) %global php_version %((echo 0; php-config --version 2>/dev/null) | tail -1) # This is the apache userid, only used for sysvipc semaphores which is the # default on ppc since spinlock is not detected (not supported?) %define userid 48 Summary: PHP accelerator, optimizer, encoder and dynamic content cacher Name: php-eaccelerator Version: 0.9.6.1 Release: 1%{?dist} Epoch: 1 # The eaccelerator module itself is GPLv2+ # The PHP control panel is under the Zend license (control.php and dasm.php) License: GPLv2+ and Zend Group: Development/Languages URL: http://eaccelerator.net/ Source: http://bart.eaccelerator.net/source/%{version}/eaccelerator-%{version}.tar.bz2 Patch0: eaccelerator-0.9.6.1-config.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %if %{defined php_zend_api} # Require clean ABI/API versions if available (Fedora) Requires: php(zend-abi) = %{php_zend_api} Requires: php(api) = %{php_core_api} %else %if "%{rhel}" == "5" # RHEL5 where we have php-common providing the Zend ABI the "old way" Requires: php-zend-abi = %{php_zendabiver} %else # RHEL4 where we have no php-common and nothing providing the Zend ABI... Requires: php = %{php_version} %endif %endif Provides: php-zend_extension Conflicts: php-mmcache BuildRequires: php, php-devel # Required by phpize BuildRequires: autoconf, automake, libtool %description eAccelerator is a further development of the MMCache PHP Accelerator & Encoder. It increases performance of PHP scripts by caching them in compiled state, so that the overhead of compiling is almost completely eliminated. %prep %setup -q -n eaccelerator-%{version} %patch0 -p1 -b .config # Change paths in the example config, other values are changed by a patch %{__sed} -i 's|/usr/lib/php4/|%{php_extdir}/|g; s|/tmp/eaccelerator|%{_var}/cache/php-eaccelerator|g' \ eaccelerator.ini %build phpize %configure \ %ifnarch %{ix86} x86_64 --with-eaccelerator-userid="%{userid}" \ %endif --with-eaccelerator-shared-memory \ --with-eaccelerator-sessions \ --with-eaccelerator-content-caching %{__make} %{?_smp_mflags} %install %{__rm} -rf %{buildroot} %{__make} install INSTALL_ROOT=%{buildroot} # The cache directory where pre-compiled files will reside %{__mkdir_p} %{buildroot}%{_var}/cache/php-eaccelerator # Drop in the bit of configuration %{__install} -D -m 0644 eaccelerator.ini \ %{buildroot}%{_sysconfdir}/php.d/eaccelerator.ini %clean %{__rm} -rf %{buildroot} %preun # Upon last removal (not update), clean all cache files if [ $1 -eq 0 ]; then %{__rm} -rf %{_var}/cache/php-eaccelerator/* &>/dev/null || : fi %files %defattr(-,root,root,-) %doc AUTHORS ChangeLog COPYING NEWS README* %doc eaccelerator.ini *.php %config(noreplace) %{_sysconfdir}/php.d/eaccelerator.ini %{php_extdir}/eaccelerator.so %attr(0750,apache,apache) %{_var}/cache/php-eaccelerator/ %changelog