Skip to content

Instantly share code, notes, and snippets.

@seanupton
Created April 1, 2014 17:27
Show Gist options
  • Save seanupton/9918888 to your computer and use it in GitHub Desktop.
Save seanupton/9918888 to your computer and use it in GitHub Desktop.
LDAP client example bulidout
[buildout]
extensions = buildout.extensionscripts
extension-scripts = ${buildout:directory}/src/osdetect.py:osdetect
parts =
opt
bdb-source
bdb-build
openssl-build
zlib
sasl-build
openldap-build
ldap.conf
python-ldap
download-cache = downloads
[build-env]
CPPFLAGS = -D_GNU_SOURCE
[opt]
recipe = plone.recipe.command
location = ${buildout:parts-directory}/opt
command =
mkdir -p ${opt:location} && mkdir -p ${opt:location}/bin && mkdir -p ${opt:location}/man/man1
update-command = ${opt:command}
stop-on-error = yes
[bdb-source]
recipe = hexagonit.recipe.download
url = http://gentoo.cs.utah.edu/distfiles/db-4.8.30.tar.gz
md5sum = f80022099c5742cd179343556179aa8c
[bdb-build]
recipe = hexagonit.recipe.cmmi
path = ${buildout:parts-directory}/bdb-source/db-4.8.30/build_unix
configure-command = ../dist/configure --prefix=${bdb-build:prefix}
prefix = ${buildout:parts-directory}/opt
[openssl-build]
recipe = hexagonit.recipe.cmmi
url = http://gentoo.cs.utah.edu/distfiles/openssl-0.9.8p.tar.gz
md5sum = 7f24047f70364c9eabc94899e356ce39
configure-command = ./config --prefix=${openssl-build:prefix}
prefix = ${buildout:parts-directory}/opt
[zlib:default]
recipe = hexagonit.recipe.cmmi
url = http://www.zlib.net/zlib-1.2.5.tar.bz2
prefix = ${opt:location}
[zlib:darwin-snowleopard-64]
<= zlib:default
environment =
CFLAGS=-arch x86_64
[zlib:x86_64]
<= zlib:default
environment =
CFLAGS=-fPIC
[sasl-build:default]
recipe = hexagonit.recipe.cmmi
url = http://gentoo.cs.utah.edu/distfiles/cyrus-sasl-2.1.23.tar.gz
md5sum = 2eb0e48106f0e9cd8001e654f267ecbc
configure-options =
--with-openssl=${openssl-build:prefix}
--with-rc4=openssl
prefix = ${buildout:parts-directory}/opt
[sasl-build:darwin]
<= sasl-build:default
# patch sourced from MacPorts via:
# http://trac.macports.org/browser/trunk/dports/security/cyrus-sasl2/files/patch-config_ltconfig
patches = ${buildout:directory}/src/sasl-mac.patch
[openldap-build]
recipe = hexagonit.recipe.cmmi
url = ftp://ftp.openldap.org/pub/OpenLDAP/openldap-stable/openldap-stable-20100719.tgz
md5sum = 90150b8c0d0192e10b30157e68844ddf
prefix = ${buildout:parts-directory}/opt
environment-section = build-env
make-targets =
depend
all
install
configure-options =
--with-sasl=${sasl-build:prefix}
--with-tls
--enable-crypt
--enable-slapd=no
--enable-slurpd=no
--localstatedir=${openldap-build:prefix}/var
--mandir=${openldap-build:prefix}/share/man
[ldap.conf]
recipe = collective.recipe.template
depends = ${openldap-build:location}
input = ${buildout:directory}/etc/ldap.conf.in
output = ${openldap-build:location}/etc/openldap/ldap.conf
[python-ldap]
recipe = zc.recipe.egg:custom
egg = python-ldap
include-dirs = ${openldap-build:prefix}/include
library-dirs = ${openldap-build:prefix}/lib
rpath = ${openldap-build:prefix}/lib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment