OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 import os | 3 import os |
4 import common | 4 import common |
5 from autotest_lib.client.bin import utils | 5 from autotest_lib.client.bin import utils |
6 | 6 |
7 version = 1 | 7 version = 1 |
8 | 8 |
9 def setup(tarball, topdir): | 9 def setup(tarball, topdir): |
10 srcdir = os.path.join(topdir, 'src') | 10 srcdir = os.path.join(topdir, 'src') |
11 utils.extract_tarball_to_dir(tarball, srcdir) | 11 utils.extract_tarball_to_dir(tarball, srcdir) |
12 os.chdir(srcdir) | 12 os.chdir(srcdir) |
13 # This binary is not necessary and breaks non-x86 autotest builds | 13 # This binary is not necessary and breaks non-x86 autotest builds |
14 os.remove('contrib/fix_standby') | 14 os.remove('contrib/fix_standby') |
15 utils.system('make') | 15 utils.make() |
16 utils.system('make binprefix=%s manprefix=%s install' % (topdir, topdir)) | 16 utils.system('make binprefix=%s manprefix=%s install' % (topdir, topdir)) |
17 os.chdir(topdir) | 17 os.chdir(topdir) |
18 | 18 |
19 | 19 |
20 # The source is grabbed from | 20 # The source is grabbed from |
21 # http://sourceforge.net/projects/hdparm/files/hdparm/hdparm-9.27.tar.gz | 21 # http://sourceforge.net/projects/hdparm/files/hdparm/hdparm-9.27.tar.gz |
22 pwd = os.getcwd() | 22 pwd = os.getcwd() |
23 tarball = os.path.join(pwd, 'hdparm-9.27.tar.gz') | 23 tarball = os.path.join(pwd, 'hdparm-9.27.tar.gz') |
24 utils.update_version(pwd+'/src', False, version, setup, tarball, pwd) | 24 utils.update_version(pwd+'/src', False, version, setup, tarball, pwd) |
OLD | NEW |