mbligh | dff2245 | 2009-04-17 20:21:21 +0000 | [diff] [blame^] | 1 | #!/usr/bin/python |
| 2 | |
| 3 | import os |
| 4 | import common |
| 5 | import shutil |
| 6 | from autotest_lib.client.bin import utils |
| 7 | |
| 8 | version = 1 |
| 9 | |
| 10 | def setup(tarball_systemtap, tarball_elfutils, topdir): |
| 11 | srcdir = os.path.join(topdir, 'src') |
| 12 | |
| 13 | utils.extract_tarball_to_dir(tarball_systemtap, 'src') |
| 14 | utils.extract_tarball_to_dir(tarball_elfutils, 'elfutils') |
| 15 | shutil.move('elfutils', 'src') |
| 16 | |
| 17 | os.chdir(srcdir) |
| 18 | |
| 19 | utils.system('./configure --with-elfutils=elfutils ' \ |
| 20 | '--prefix=%s/systemtap' % topdir) |
| 21 | utils.system('make -j %d' % utils.count_cpus()) |
| 22 | utils.system('make install') |
| 23 | |
| 24 | os.chdir(topdir) |
| 25 | |
| 26 | pwd = os.getcwd() |
| 27 | # http://sourceware.org/systemtap/ftp/releases/systemtap-0.9.5.tar.gz |
| 28 | tarball_systemtap = os.path.join(pwd, 'systemtap-0.9.5.tar.gz') |
| 29 | # https://fedorahosted.org/releases/e/l/elfutils/elfutils-0.140.tar.bz2 |
| 30 | tarball_elfutils = os.path.join(pwd, 'elfutils-0.140.tar.bz2') |
| 31 | utils.update_version(pwd+'/src', False, version, setup, tarball_systemtap, |
| 32 | tarball_elfutils, pwd) |