pgsql.py revision c69530b170d60b913131a2a65cf0e3c8b81bc700
1#!/usr/bin/python 2from check_version import check_python_version 3check_python_version() 4 5import os 6from autotest_utils import * 7 8version = 1 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.1.4/postgresql-8.1.4.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.1.4.tar.bz2') 24update_version(pwd+'/src', False, version, setup, tarball, pwd) 25 26 27