Skip to content

Instantly share code, notes, and snippets.

@kingel
Created October 29, 2012 10:22
Show Gist options
  • Save kingel/3972793 to your computer and use it in GitHub Desktop.
Save kingel/3972793 to your computer and use it in GitHub Desktop.
phpbuildout
# ===================================================================
# Builds PHP as an Apache module (Apache profile needed)
[buildout]
extends =
apache.cfg
mysql.cfg
# Buildout parts
parts +=
png-build
jpeg-build
freetype-build
curl-build
php-build
php-conf
# ===================================================================
[config]
png-source-url = http://prdownloads.sourceforge.net/libpng/libpng-1.5.10.tar.gz
jpeg-source-url = http://www.ijg.org/files/jpegsrc.v8d.tar.gz
freetype-source-url = http://prdownloads.sourceforge.net/freetype/freetype-2.1.9.tar.bz2
gettext-source-url = ftp://ftp.gnu.org/gnu/gettext/gettext-0.18.1.1.tar.gz
curl-source-url = http://curl.haxx.se/download/curl-7.28.0.tar.gz
libiconv-source-url = http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
#php-source-url = http://us3.php.net/get/php-5.3.8.tar.gz/from/ua.php.net/mirror
php-source-url = http://nl1.php.net/get/php-5.3.17.tar.gz/from/this/mirror
php-conf-dir = ${buildout:directory}/etc/php
# ===================================================================
[png-build]
recipe = hexagonit.recipe.cmmi
directory = ${buildout:parts-directory}/${:_buildout_section_name_}
keep-compile-dir = false
url = ${config:png-source-url}
prefix = ${:directory}
[jpeg-build]
recipe = hexagonit.recipe.cmmi
directory = ${buildout:parts-directory}/${:_buildout_section_name_}
keep-compile-dir = false
url = ${config:jpeg-source-url}
prefix = ${:directory}
[freetype-build]
recipe = hexagonit.recipe.cmmi
directory = ${buildout:parts-directory}/${:_buildout_section_name_}
keep-compile-dir = false
url = ${config:freetype-source-url}
prefix = ${:directory}
[gettext-build]
recipe = hexagonit.recipe.cmmi
directory = ${buildout:parts-directory}/${:_buildout_section_name_}
keep-compile-dir = false
url = ${config:gettext-source-url}
configure-options =
--prefix=${:directory}
--disable-dependency-tracking
--disable-debug
--without-included-gettext
--without-included-glib
--without-included-libcroco
--without-included-libxml
--without-emacs
--without-git
--without-cvs
[curl-build]
recipe = hexagonit.recipe.cmmi
directory = ${buildout:parts-directory}/${:_buildout_section_name_}
keep-compile-dir = false
url = ${config:curl-source-url}
prefix = ${:directory}
[libiconv-build]
recipe = hexagonit.recipe.cmmi
directory = ${buildout:parts-directory}/${:_buildout_section_name_}
keep-compile-dir = false
url = ${config:libiconv-source-url}
prefix = ${:directory}
[php-build]
recipe = hexagonit.recipe.cmmi
directory = ${buildout:parts-directory}/${:_buildout_section_name_}
keep-compiler-dir = false
url = ${config:php-source-url}
configure-options =
--prefix=${:directory}
--with-config-file-path=${config:php-conf-dir}
--with-apxs2=${apache-build:directory}/bin/apxs
--enable-cli
--disable-cgi
--with-zlib
--with-gd
--enable-gd-native-ttf
--enable-ftp
--enable-mbstring
--enable-xml
--enable-bcmath
--with-sqlite
--enable-sqlite-utf8
--enable-soap
--with-png-dir=${png-build:directory}
--with-jpeg-dir=${jpeg-build:directory}
--with-freetype-dir=${freetype-build:directory}
--with-mysql=${mysql-build:directory}
--with-mysqli=${mysql-build:directory}/bin/mysql_config
--with-curl=${curl-build:directory}
--with-iconv-dir=${libiconv-build:directory}
[php-conf]
recipe = plone.recipe.command
command =
echo ""
[php-post]
recipe = plone.recipe.command
command =
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment