1#!/usr/bin/python 2 3import os 4from autotest_lib.client.bin import utils 5 6version = 1 7 8def setup(tarball, topdir): 9 # FIXME - Waiting to be able to specify dependency. 10 #self.job.setup_dep(['pgsql']) 11 srcdir = os.path.join(topdir, 'src') 12 if not os.path.exists(tarball): 13 utils.get_file('http://pgfoundry.org/frs/download.php/1083/pgpool-II-1.0.1.tar.gz', tarball) 14 utils.extract_tarball_to_dir(tarball, 'src') 15 os.chdir(srcdir) 16 # FIXEME - Waiting to be able to use self.autodir instead of 17 # os.environ['AUTODIR'] 18 utils.configure('--prefix=%s/pgpool --with-pgsql=%s/deps/pgsql/pgsql' \ 19 % (topdir, os.environ['AUTODIR'])) 20 utils.make('-j %d' % utils.count_cpus()) 21 utils.make('install') 22 23 os.chdir(topdir) 24 25pwd = os.getcwd() 26tarball = os.path.join(pwd, 'pgpool-II-1.0.1.tar.gz') 27utils.update_version(pwd+'/src', False, version, setup, tarball, pwd) 28