eAccelerator (fork of abandoned MMCache)

Support/Development for PHP
hotgazpacho

eAccelerator (fork of abandoned MMCache)

Unread post by hotgazpacho »

For those who don't know, Zend (The PHP Company) bought out TurckSoft and hired Dimitry Stogov, the maker of Turck MMCache. Dimitry has not done any work on MMCache (since it competes with the Zend Performance Sweet) in the last year, though unofficial development has continued. Recently, Dimitry has indicated his prefernce for a Fork of MMCache rather than handing over the reigns to someone else. So, a few developers, who have contributed to MMCache in the past, created a fork and called it eAccelerator. In version 0.9.1 right now, it is based off of MMCache 2.4.7-CVS, plus some recent patches, so it is quite mature. It supports PHP 4 and 5.

I have created an RPM for it using the latest release on SourceForge, and ART's php-devel 4.3.10 version. The RPM SPEC file I used is below. Scott can use this to compile an ART eAccelerator RPM (if he pleases), or I can figure out a way to post the RPM publicly. Note that I have NOT signed it with a GPG key, but I'd be willing to learn how if someone were to teach me!

Direct any RPM bug reports to me.
Direct any eAccelerator bug reports to the SourceForge Bug Tracking system for this project.

Have fun!

Code: Select all

%define php_version 4.3.10
%define php_prefix "/usr"

Version: 0.9.1
Release: %{php_version}
Summary: eAccelerator (fork of Turck MMCache) for PHP %{php_version}
Name: eaccelerator
Url: http://sourceforge.net/projects/eaccelerator/
Group: Development/Languages
License: GPL
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
Prefix: %{php_prefix}
Requires: php = %{php_version}
BuildPrereq: php-devel = %{php_version}

Source: eaccelerator-0.9.1.tar.gz

%description
eAccelerator is a fork of Turck MMCache.
Turck MMCache is a free open source PHP accelerator, optimizer,
encoder and dynamic content cache for PHP.


%prep
%setup -q

%build
export PHP_PREFIX=%{php_prefix}
$PHP_PREFIX/bin/phpize

%configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config

make

%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
# make DESTDIR=$RPM_BUILD_ROOT install
install -D modules/eaccelerator.so ${RPM_BUILD_ROOT}%{_libdir}/php4/eaccelerator.so
install -D eaccelerator.ini ${RPM_BUILD_ROOT}/etc/php.d/eaccelerator.ini
install -d ${RPM_BUILD_ROOT}%{_datadir}/eaccelerator
install -d ${RPM_BUILD_ROOT}/var/cache/eaccelerator
install *.php ${RPM_BUILD_ROOT}%{_datadir}/eaccelerator

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%attr(0600,root,root) /etc/php.d/eaccelerator.ini
%doc AUTHORS README NEWS COPYING
%{_libdir}/php4/*
%{_datadir}/eaccelerator/*
%config(noreplace) /etc/php.d/eaccelerator.ini
%dir /var/cache/eaccelerator

%changelog
Brent
Forum User
Forum User
Posts: 68
Joined: Tue Dec 21, 2004 11:40 pm

Unread post by Brent »

Cool hopefully we will see this in a art file
hotgazpacho

Updated Spec

Unread post by hotgazpacho »

In the Spec file above, you should be able to replace:

Code: Select all

Source: eaccelerator-0.9.1.tar.gz
with

Code: Select all

Source: http://prdownloads.sourceforge.net/eaccelerator/eaccelerator-%{version}.tar.gz
Brent
Forum User
Forum User
Posts: 68
Joined: Tue Dec 21, 2004 11:40 pm

Unread post by Brent »

I don't know what to do with that code above :oops:

Do I copy it and save it with vi as..?

Sorry hehe
hotgazpacho

rpmbuild

Unread post by hotgazpacho »

Well, first you have to set up your system to build RPMs as a non-root user. I don't have the details at hand, but you can Google rpmbuild.

Once you set up your environment, save the above code as eaccelerator.spec in your SPECS directory. Then, do a

Code: Select all

rpmbuild -bb eaccelerator.spec
That last part will make A LOT of sense once you figure out how to set up your environment to build RPMs as a non-root user.

Good luck!
Post Reply