rendered paste bodyloadInstalled('python')
class Bongo(CPackageRecipe):
name = 'bongo'
version = '0.3.1'
buildRequires = ['clucene:devel', 'curl:devel', 'e2fsprogs:devel', 'gnutls:devel', 'krb5:devel', 'libgcrypt:devel', 'libgpg-error:devel', 'libstdc++:devel', 'openldap', 'openldap:devel', 'openssl:devel', 'python:devel', 'sqlite:devel', 'zlib:devel', 'doxygen:runtime', 'flex:runtime', 'gcc-c++:runtime', 'httpd:devel', 'libgpg-error:devel', 'libstdc++:devel', 'mod_python:python', 'perl:runtime', 'pkgconfig:devel', 'python:test', 'python', 'bison:runtime', 'gettext', 'unixODBC:devel', 'elementtree:python', 'lxml:python']
def setup(r):
r.macros.pydir = 'python' + Python.majversion
r.addArchive('http://download.gna.org/bongo/release/')
r.Run('./configure --prefix=%(prefix)s --localstatedir=%(localstatedir)s --libdir=%(libdir)s --with-user=bongo --enable-debug-cflags --with-clucene=%(prefix)s --with-apache-modules=%(libdir)s/httpd/modules')
r.Make()
r.MakeInstall()
r.addSource('raa-custom.cfg.in')
r.Install('init/bongo.init.rpl.in', '%(initdir)s/bongo', mode=0755)
r.Replace('@prefix@', '%(prefix)s', '%(initdir)s/bongo')
r.Install('init/bongoinit.conf.rpl.in',
'/etc/default/bongoinit.conf', mode=0755)
r.TagSpec('initscript', '%(initdir)s/')
r.Move('/usr/share/bongo/examples/bongo.conf', '/etc/httpd/conf.d/bongo.conf')
r.Replace('#LoadModule python_module %(libdir)s/httpd/modules/mod_python.so', 'LoadModule python_module %(libdir)s/httpd/modules/mod_python.so', '/etc/httpd/conf.d/bongo.conf')
r.Replace('@PRODUCT_VERSION@', r.version, 'raa-custom.cfg.in')
r.Install('raa-custom.cfg.in', '/etc/raa/custom.cfg', mode = 0644)
if Arch.x86_64:
r.Move('%(prefix)s/lib/%(pydir)s/site-packages/bongo', '%(libdir)s/%(pydir)s/site-packages/bongo')
r.Requires('openldap:runtime', '/usr/sbin/bongo-setup')
r.Requires('httpd:runtime', '%(initdir)s/bongo')
r.Requires('mod_python:runtime', '%(initdir)s/bongo')