# Description: A PHP extension for Redis
# URL: https://github.com/phpredis/phpredis
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: liblzf php-igbinary
# Optional: redis

name=php-redis
version=5.3.7
release=1
source=(https://github.com/phpredis/phpredis/archive/$version/$name-$version.tar.gz)

build() {
  cd phpredis-$version
  echo -e "; this extension requires igbinary to be activated as well\n;extension=redis" > "redis.ini"
  phpize
  ./configure --prefix=/usr \
    --enable-redis-igbinary \
    --enable-redis-lzf \
    --with-liblzf=/usr/lib/
  make
  make INSTALL_ROOT=$PKG/ install
  install -vDm 644 redis.ini -t $PKG/etc/php/conf.d/
}
