Skip to content

Instantly share code, notes, and snippets.

@krisanalfa
Created October 31, 2013 10:10
Show Gist options
  • Save krisanalfa/7247299 to your computer and use it in GitHub Desktop.
Save krisanalfa/7247299 to your computer and use it in GitHub Desktop.
eAccelerator PHP for Arch Linux
# Maintainer: Krisan Alfa Timur <krisan47@gmail.com>
pkgname=eaccelerator-git
pkgver=1.0
pkgrel=2
pkgdesc="A free open-source PHP accelerator, optimizer, and dynamic content cache."
arch=('i686' 'x86_64')
url="http://eaccelerator.net/"
license=('GPL')
depends=('php')
makedepends=('git')
conflicts=('xcache' 'turck-mmcache' 'phpexpress' 'eaccelerator' 'eaccelerator-svn')
source=(https://gist.github.com/krisanalfa/7247152/raw/32b19caa0ef912556fdf36bdcb790a92db5d53a6/eaccelerator.patch)
md5sums=(db840ea56fc6014ea1d7603c0094d9c7)
package() {
msg "Connecting to GIT server..."
cd "$srcdir"
if [ -d "$pkgname" ]; then
cd "$pkgname"
git fetch https://github.com/eaccelerator/eaccelerator.git
msg "The local files are updated."
else
git clone --depth=1 https://github.com/eaccelerator/eaccelerator.git "$pkgname"
cd "$pkgname"
fi
msg "GIT checkout done or server timeout"
msg "Patching eaccelerator.c file"
patch eaccelerator.c ../eaccelerator.patch
msg "Building..."
phpize
./configure --prefix=/usr --with-eaccelerator-userid=http
make
make INSTALL_ROOT="$pkgdir" install
mkdir -p "$pkgdir"/etc/php/conf.d/
mkdir -p "$pkgdir"/var/cache/eaccelerator
chmod 777 "$pkgdir"/var/cache/eaccelerator
cat "$srcdir"/"$pkgname"/eaccelerator.ini | gawk 'gsub("eaccelerator.cache_dir = \"/tmp/eaccelerator\"","eaccelerator.cache_dir = \"/var/cache/eaccelerator\"")1' > "$pkgdir"/etc/php/conf.d/eaccelerator.ini
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment