pgsql.py revision 56f719b242ac5524fd85fb0bf8b4418092c2c99a
1#!/usr/bin/python 2from common.check_version import check_python_version 3check_python_version() 4 5import os 6from autotest_utils import * 7 8version = 2 9 10def setup(tarball, topdir): 11 srcdir = os.path.join(topdir, 'src') 12 if not os.path.exists(tarball): 13 get_file('ftp://ftp.us.postgresql.org/pub/mirrors/postgresql/v8.2.5/postgresql-8.2.5.tar.bz2', tarball) 14 extract_tarball_to_dir(tarball, 'src') 15 os.chdir(srcdir) 16 system ('./configure --enable-debug --prefix=%s/pgsql' % topdir) 17 system('make -j %d' % count_cpus()) 18 system('make install') 19 20 os.chdir(topdir) 21 22pwd = os.getcwd() 23tarball = os.path.join(pwd, 'postgresql-8.2.5.tar.bz2') 24update_version(pwd+'/src', False, version, setup, tarball, pwd) 25 26 27