# Description: PHP5 module for the apache 2.0.x HTTP server  
# URL:         http://www.php.net
# Maintainer:  Jürgen Daubert, juergen dot daubert at t-online dot de
# Depends on:  mysql, apache, libxml2
# Group:       apache

name=mod_php
version=5.1.2
release=1
source=(http://www.php.net/distributions/php-$version.tar.bz2) 

build () {
    cd php-$version
    sed -i "s/-i -a/-i/" configure
    ./configure --prefix=/usr \
                --with-apxs2=/usr/sbin/apxs \
                --with-config-file-path=/etc \
                --with-mysql=/usr \
                --with-zlib-dir=/usr/lib \
		--without-pear \
                --disable-pdo
    make
    make INSTALL_ROOT=$PKG install
    rm -r $PKG/etc/apache
    sed -i "/^extension_dir/s|\./|/usr/lib/php/extensions|" php.ini-dist
    install -D -m 644 php.ini-dist $PKG/etc/php.ini
}
